I have got an Xpage with an Restservice (viewJsonService). If I test the RestService with the pathInfo I can see all Documents of the pointing view.
I bind the RestService to a DataGrid with 3 DataGridColumns. The DataGridColumns are pointing to the programmatical name of 3 default columns.
If I preview the Xpage in the Browser I can't see any data. Does anyone has got an idea where the problem can be?
<xe:restService id="restService1" pathInfo="data">
<xe:this.service>
<xe:viewJsonService
databaseName="Bewerbermanagement.nsf"
defaultColumns="true" viewName="($AllDocuments)">
</xe:viewJsonService>
</xe:this.service>
</xe:restService>
<xe:djxDataGrid id="djxDataGrid1" storeComponentId="restService1"
rowsPerPage="30">
<xe:this.dojoAttributes>
<xp:dojoAttribute name="autoWidth" value="true"></xp:dojoAttribute>
<xp:dojoAttribute name="columnReordering" value="true"></xp:dojoAttribute>
</xe:this.dojoAttributes>
<xe:djxDataGridColumn id="djxDataGridColumn1" label="Datum"
width="100px" field="$4">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn2" label="Absender"
field="$2" width="100px">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn3" label="Subject"
field="SUBJECT" width="100px">
</xe:djxDataGridColumn>
</xe:djxDataGrid>
Example Json-Entry:
{
"#entryid":"1-0590EED09824B814C1257D80003A68C8",
"#unid":"0590EED09824B814C1257D80003A68C8",
"#noteid":"8F6",
"#position":"1",
"#siblings":7,
"#form":"Appointment",
"$4":"2014-10-27T17:27:39Z",
"$2":"Joe Doe",
"SUBJECT":"V\u00D6"
},
I found the error. I changed the Application theme from OneUI V3.02 to OneUI. But I don't know why this has got an effect on building the DataGrid
Related
I am trying to write a fileUpload/fileDownload custom control with a Bootstrap like look. I am fairly happy with the look (see below).
However, I am getting very inconsistent behavior. I would very much like the user to be able to click the delete button and the attachment is removed and the repeat control is refreshed. In a similar fashion if the user selects "Upload" I think the attachment should be uploaded to the document and the repeat control refreshed as well.
I am storing the attachments in a single document that is separate from the main document [it is stored in a separate db from the code].
I am using the js fileInput library with the upload control.
I am using a repeat control to roll my own file download viewer.
The code works some of the time, but not always. When the page fails I get this error message (see below).
Any suggestions would be greatly appreciated.
Context Path: /scoApps/OTM1/OTM1.nsf
Page Name: /xpTest.xsp
javax.faces.FacesException
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:96)
at com.ibm.xsp.controller.FacesControllerImpl.execute(FacesControllerImpl.java:256)
at com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:228)
at com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:157)
at com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
at com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
at com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:853)
at com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
at com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
at com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319)
at com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)
at com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:357)
at com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:313)
at com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
Caused by: java.lang.IllegalArgumentException
at javax.faces.model.ListDataModel.getRowData(ListDataModel.java:141)
at com.ibm.xsp.component.UIRepeatContainer.addIndexedDataContext(UIRepeatContainer.java:173)
at com.ibm.xsp.component.UIRepeatContainer.getDataContexts(UIRepeatContainer.java:86)
at com.ibm.xsp.util.DataPublisher.getDataContextList(DataPublisher.java:349)
at com.ibm.xsp.util.DataPublisher.revokeControlData(DataPublisher.java:271)
at com.ibm.xsp.component.UIDataPanelBase.revokeControlData(UIDataPanelBase.java:319)
at com.ibm.xsp.component.UIDataPanelBase.processDecodes(UIDataPanelBase.java:334)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1177)
at com.ibm.xsp.component.UIRepeat.processDecodes(UIRepeat.java:526)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1177)
at com.ibm.xsp.component.UIDataPanelBase.processDecodes(UIDataPanelBase.java:331)
at javax.faces.component.UIForm.processDecodes(UIForm.java:166)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1177)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1177)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:343)
at com.ibm.xsp.component.UIViewRootEx._processDecodes(UIViewRootEx.java:1438)
at com.ibm.xsp.component.UIViewRootEx.processDecodes(UIViewRootEx.java:1399)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:98)
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom">
<xp:this.data>
<xp:dominoDocument var="document1" databaseName="scoApps\OTM1\OTM1Data.nsf" formName="attachment" action="editDocument" documentId="349CDB2FB259D5D3862581090076AC50" />
</xp:this.data>
<script src="fileinput/js/fileinput.js" type="text/javascript" />
<link href="fileinput/css/fileinput.min.css" media="all" rel="stylesheet" type="text/css" />
<xp:scriptBlock id="scriptBlockInitFile">
<xp:this.value><![CDATA[$(document).ready(
function() {
$('input[type=file]').fileinput({
previewFileType: "image",
browseClass: "btn btn-primary",
browseLabel: "Browse...",
browseIcon: '<i class="glyphicon glyphicon-plus"></i>',
removeClass: "btn btn-danger",
removeLabel: "Delete",
removeIcon: '<i class="glyphicon glyphicon-trash"></i>',
uploadClass: "btn btn-info",
});
}
);]]></xp:this.value>
</xp:scriptBlock>
<xp:div themeId="container" style="width:800px">
<xp:br />
<xp:fileUpload id="fileUpload1" value="#{document1.attachments}">
<xp:this.attrs>
<xp:attr name="multiple" value="true" />
<xp:attr name="data-show-preview" value="false" />
</xp:this.attrs>
</xp:fileUpload>
<xp:br />
<xp:button value="Save Changes" id="button1" styleClass="btn btn-primary">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" disableValidators="true">
<xp:this.action>
<xp:actionGroup>
<xp:save />
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
</xp:button>
</xp:div>
<xp:repeat rows="30" id="attrepeat" first="0" var="att" indexVar="attachmentIndex">
<xp:this.facets>
<xp:text disableTheme="true" xp:key="header" escape="false">
<xp:this.value><![CDATA[<table class="table table-striped table-bordered table-hover"><col width="150"><col width="450"><th>File Name</th><th style="text-align:right">Delete</th>]]></xp:this.value>
</xp:text>
<xp:text disableTheme="true" xp:key="footer" escape="false">
<xp:this.value><![CDATA[</table>]]></xp:this.value>
</xp:text>
</xp:this.facets>
<xp:this.value><![CDATA[#{javascript:var bckDoc = document1.getDocument()
var attachments:java.util.Vector = session.evaluate("#AttachmentNames",bckDoc);
attachments}]]></xp:this.value>
<xp:tr>
<xp:td>
<xp:link escape="true" id="link1" target="_blank" text="#{javascript:att.toString();}">
<xp:this.value><![CDATA[#{javascript:var tmpStr:String;
var str:String;
var bckDoc = document1.getDocument()
var attachments:java.util.Vector = session.evaluate("#AttachmentNames",bckDoc);
tmpStr = attachments.toString;
tmpStr
var bckDoc = document1.getDocument()
var attachments:java.util.Vector = session.evaluate("#AttachmentNames",bckDoc);
tmpStr = attachments.elementAt(0);
var unid = "349CDB2FB259D5D3862581090076AC50"
var dbPath = "scoApps/OTM1/OTM1.nsf/"
var dbDataPath = "scoApps/OTM1/OTM1Data.nsf/"
var url = "http://localhost/";
url += dbPath;
url += "/xsp/.ibmmodres/domino/OpenAttachment/";
url += dbDataPath + "/";
url += unid
url += "/" + "attachments" + "/";
url += tmpStr;
url}]]></xp:this.value>
<xp:image id="image1" rendered="false">
<xp:this.url><![CDATA[#{javascript:var pdfImage = 'pdf.gif';
//if(attachment.indexOf("pdf")> 0)
return pdfImage; }]]></xp:this.url>
</xp:image>
 
</xp:link>
</xp:td>
<xp:td style="text-align:right">
<xp:button value="Delete" id="button2" styleClass="btn btn-danger">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:function removeAttachment(targDB,doc_Url,fileName,docUnid2) {
//passing parameters by reference
var docUrl:String= doc_Url;
var targetDB:NotesDatabase = session.getDatabase(session.getCurrentDatabase().getServer(),targDB);
var attachmentName:String =fileName;
//deducing the document's unid from the document's url
//docUrl=#Left(docUrl,"?");
//var docUnid=#RightBack(docUrl,"/");
print (docUnid2);
//setting the handle to the document
var docContext:NotesDocument=targetDB.getDocumentByUNID(docUnid2);
if (docContext==null) {
viewScope.CodeError="Either the UNID is invalid or the target db does not contain the doc or both";
return;
}
//getting the handle to the concerned attachment
var embObj:NotesEmbeddedObject=docContext.getAttachment(attachmentName);
if (embObj==null) {
viewScope.CodeError="No attachment is found by the name "+ attachmentName;
return;
}
//remove the attachment
embObj.remove()
docContext.save(true,false);
}
var fleNme = att.toString();
print (fleNme);
removeAttachment("scoApps/OTM1/OTM1Data.nsf","http://localhost/scoApps/OTM1/OTM1.nsf//xsp/.ibmmodres/domino/OpenAttachment/scoApps/OTM1/OTM1Data.nsf//349CDB2FB259D5D3862581090076AC50/attachments/ITReport.xlsx",fleNme,"349CDB2FB259D5D3862581090076AC50");}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
</xp:td>
</xp:tr>
</xp:repeat>
</xp:view>
It's failing in the ApplyRequestValues phase, something related to running code for rows within the repeat. I've had that before in a Data View with using the caching was ID only. The key is identifying which component's code is failing (the value of the repeat, the link, the image or the button - if it's a component, which property) and whether it needs to run in that phase. It may not.
Looking at the stack trace, the "caused by" bit failing on getRowData() implies it might be a problem with value of the repeat, but I'm not totally sure. It could be one of the repeat's child components that's failing.
If it's a read-only bit of code, it could be wrapped in an if (view.isRenderingPhase()) block. Just make sure you output something valid for other phases! E.g. for a rendered property, set the result for other phases to true (I've missed that before and caused myself problems!)
If it's because the document datasource has not been initialised at that phase, wrapping everything in a Panel may solve the problem, by associating the dominoDocument datasource to be a child of the Panel, which may encourage it to be better re-initialised during the restoreView phase. This is a total stab in the dark, but I know during page load a dominoDocument datasource gets loaded at a different time when it's a child of a Panel as opposed to a child of the XPage itself.
I have created an enhanced Dojo Data Grid in an Xpages App. No I want to add an editable column. I get conflicting info on whether you can do this with viewJsonService or if you must use a viewItemFileService. I can't get either way to work. Would prefer to use Json, as everything that I need to do in this code works in Json, but I cannot even get any data to appear with the FileService. I understand to get the Json to work you need to have a site document set up and allow a "GET."
My code for the viewJsonService is below:
<xp:panel style="width:885.0px;height:300px">
<xe:restService pathInfo="gridData" id="restService1"
jsId="restServiceID">
<xe:this.service>
<xe:viewJsonService viewName="(dbAllRspPCTasks)"
var="rstEntry" systemColumns="4">
<xe:this.columns>
<xe:restViewColumn name="ID">
<xe:this.value><![CDATA[#{javascript:return rstEntry.getColumnValue("ID")}]]></xe:this.value>
</xe:restViewColumn>
<xe:restViewColumn name="status">
<xe:this.value><![CDATA[#{javascript:return rstEntry.getColumnValue("status")}]]></xe:this.value>
</xe:restViewColumn>
<xe:restViewColumn name="category">
<xe:this.value><![CDATA[#{javascript:return rstEntry.getColumnValue("category")}]]></xe:this.value>
</xe:restViewColumn>
<xe:restViewColumn name="title">
<xe:this.value><![CDATA[#{javascript:return rstEntry.getColumnValue("title")}]]></xe:this.value>
</xe:restViewColumn>
<xe:restViewColumn name="notes">
<xe:this.value><![CDATA[#{javascript:return rstEntry.getColumnValue("notes")}]]></xe:this.value>
</xe:restViewColumn>
</xe:this.columns>
<xe:this.keys><![CDATA[#{javascript:return viewScope.get("ID");
}]]></xe:this.keys>
</xe:viewJsonService>
</xe:this.service>
</xe:restService>
<xp:button value="Save" id="button4" style="font-weight:bold;font-size:10pt">
<xp:eventHandler event="onclick" submit="true" refreshMode="norefresh">
<xp:this.script><![CDATA[restServiceID.save();]]></xp:this.script>
</xp:eventHandler>
</xp:button>
<xe:djxDataGrid id="djxDataGrid1"
storeComponentId="restService1" initialWidth="100%"
rowSelector="25px" rowsPerPage="100"
dojoType="dojox.grid.EnhancedGrid" autoHeight="10">
<xe:djxDataGridColumn id="djxDataGridColumn1"
field="category" label="Category">
</xe:djxDataGridColumn>
<xe:this.dojoAttributes>
<xp:dojoAttribute name="autoWidth"
value="true">
</xp:dojoAttribute>
<xp:dojoAttribute name="canSort"
value="false">
</xp:dojoAttribute>
</xe:this.dojoAttributes>
<xe:this.errorMessage><![CDATA["Sorry...error loading tasks"]]></xe:this.errorMessage>
<xe:djxDataGridColumn id="djxDataGridColumn2"
field="status" formatter="displayIcon" width="25px" label="Sts">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn3"
label="Task" field="title" width="300px">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn4"
label="Notes..." field="notes" width="auto" editable="true">
</xe:djxDataGridColumn>
<xp:eventHandler event="onFocus" submit="false">
<xe:this.script><![CDATA[dijit.byId('#{id:djxDataGrid1}').canSort = function(col){
return false;
};]]></xe:this.script>
</xp:eventHandler>
</xe:djxDataGrid>
</xp:panel>
Per, OK on a test server I created a Web Site Document and checked PUT in the allowed methods and rebooted the server.
When I check
http:///api/data
I get a
{
"code":403,
"text":"Forbidden"
}
and I do not know why. What are some things that I should look for to ensure that I can enable a put?
Bryan
I have a problem with a pager performing a partial refresh (since we have server side redirection rules, full refresh is not an option here). If I place the pager on the same page rather than in a custom control then it refresh the main panel. But if I place the pager in a custom control, then it only updates the repeat control, which means the pager control itself doesn't get refreshed. Here is a simple example to demonstrate the problem.
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xc="http://www.ibm.com/xsp/custom">
<xp:panel id="mainPanel">
<xc:ccPager pagerFor="repeat1" id="myPager" />
<xp:repeat id="repeat1" rows="3" var="row">
<xp:this.value><![CDATA[#{javascript:var cars = ["Saab", "Volvo", "BMW", "Saab", "Volvo", "BMW"];
return cars; }]]></xp:this.value>
<xp:text escape="true" id="computedField1" value="#{row}">
</xp:text>
</xp:repeat>
</xp:panel>
</xp:view>
And here is the code for the custom control:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:pager layout="Previous Group Next" partialRefresh="true"
id="pager1" for="#{compositeData.pagerFor}" partialExecute="false">
</xp:pager>
</xp:view>
Any tips would be welcome. In this case the pager is simple, but I have a more complex pager and a pagesizes control with 45 lines of source code, so I would prefer to create a re-useable custom component if possible at all.
UPDATE
My current pager custom control:
<div id="page-result" class="pagination pagination-small clearfix">
<div class="col-lg-12 pagination clearfix">
<div class="results form-inline left">
<fieldset>
<xp:pager id="pager1" alwaysCalculateLast="true"
for="#{compositeData.strPagerFor}" styleClass="pag-control"
partialRefresh="true" partialExecute="false">
<xp:pagerControl id="pagerControl1" type="FirstImage"
styleClass="firstPage" image="/PagerArrowhead2-L_d.png">
</xp:pagerControl>
<xp:pagerControl id="pagerControl2" type="PreviousImage"
styleClass="previousPage" image="/PagerArrowhead-L_d.png">
</xp:pagerControl>
<xp:pagerControl id="pagerControl5" type="Group"
currentStyleClass="active" styleClass="pages">
</xp:pagerControl>
<xp:pagerControl id="pagerControl3" type="NextImage"
styleClass="nextPage" image="/PagerArrowhead.png">
</xp:pagerControl>
<xp:pagerControl id="pagerControl4" type="LastImage"
styleClass="lastPage" image="/PagerArrowhead2.png">
</xp:pagerControl>
</xp:pager>
<label>
<xp:text escape="true" id="computedField1" value="#{compositeData.strLabelText}" />
</label>
</fieldset>
</div>
<div class="results form-inline">
<fieldset>
<label> Results per page: </label>
<xe:pagerSizes id="pagerSizes1" for="#{compositeData.strPagerFor}"
sizes="7|15|25|50|all" text="{0}" styleClass="resultPage"
partialRefresh="true" partialExecute="false"
refreshId="#{compositeData.strRefreshPanel}" />
</fieldset>
</div>
</div>
</div>
I've hit this problem before. I think it's because the view container cannot find the pager when it's in a separate custom control. I presume it's using something like getComponent, which can't navigate down into custom controls, so it can't locate the pager to update it.
Can you extract the code for your pagesizes control into a Java dataObject / bean / util or dataContext / SSJS library? Then reference it with one line of SSJS or EL?
The other option would be to use a plugin and build a component that extends the repeat control and adds the pager to the relevant header?
Tim Tripcony gave a great demo of a quick and dirty way of doing it http://www.notesin9.com/2012/04/04/notesin9-064-global-custom-controls-fixed/
I would like to use the Dojo Data Grid/REST service architecture in an application I am building. However, I cannot find the property (or code) to have the REST service point to a view in another application outside the current one.
Can I use a Data Context in the view name of the REST Service? Or is there another property to set to point to a view in another application?
Thanks -- appreciate your help!
--------- EDIT 6/24/2013 ---------
I have tried both the viewItemFileService and viewJSONService and I can only get the viewJSONService to work with the other database. The viewItemFileService just displays "Sorry, an error has occurred" where the rows of data should be. Here is the code -- I am not sure where I am making the mistake:
<xp:panel>
View JSON<xp:br></xp:br>
<xe:restService id="restService1">
<xe:this.service>
<xe:viewJsonService databaseName="voca/vocadatastore.nsf"
defaultColumns="true" viewName="InvoicePersonnel" var="entry1"
contentType="application/json">
</xe:viewJsonService>
</xe:this.service>
</xe:restService>
<xe:djxDataGrid id="djxDataGrid2" autoHeight="10"
storeComponentId="restService1">
<xe:djxDataGridColumn id="djxDataGridColumn5"
label="Description" field="description" width="auto">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn6"
label="Items" field="items" width="auto">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn7"
label="Cost" field="cost" width="auto">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn8"
label="Total" field="total" width="auto">
</xe:djxDataGridColumn>
</xe:djxDataGrid>
</xp:panel>
<xp:br></xp:br>
<xp:br></xp:br>
<xp:panel>View Domino<xp:br></xp:br>
<xe:restService id="restServicePers">
<xe:this.service>
<xe:viewItemFileService databaseName="voca/vocadatastore.nsf"
defaultColumns="true" viewName="InvoicePersonnel" var="entry2">
</xe:viewItemFileService>
</xe:this.service>
</xe:restService>
<xe:djxDataGrid id="djxDataGrid1" autoHeight="10"
storeComponentId="restServicePers">
<xe:djxDataGridColumn id="djxDataGridColumn1"
label="Description" field="description" width="auto">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn2"
label="Items" field="items" width="auto">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn3"
label="Cost" field="cost" width="auto">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn4"
label="Total" field="total" width="auto">
</xe:djxDataGridColumn>
</xe:djxDataGrid>
</xp:panel>
--------- EDIT 7/3/2013 ---------
I moved the view to the same database as the REST service and still received "Sorry, an error occurred" message. The view name is correct since I selected the viewName from the list. The column title/field name is correct also.
<xe:restService id="restServicePers" pathInfo="persInfo">
<xe:this.service>
<xe:viewItemFileService defaultColumns="true"
viewName="InvoicePersonnel" var="entryPers">
</xe:viewItemFileService>
</xe:this.service>
</xe:restService>
<xe:djxDataGrid id="djxDataGrid1" autoHeight="10"
storeComponentId="restServicePers">
<xe:djxDataGridColumn id="djxDataGridColumn1"
label="Description" field="description" width="auto">
</xe:djxDataGridColumn>
</xe:djxDataGrid>
I added the pathInfo property to the REST service to see what is being returned and there was an error:
{
"code":500,
"text":"Internal Error",
"message":"",
"type":"text",
"data":"java.lang.NullPointerException\r\n\tat com.ibm.domino.services.rest.das.view.RestViewNavigatorFactory$ViewNavigatorNavigator.getTopLevelEntryCount(RestViewNavigatorFactory.java:565)\r\n\tat com.ibm.domino.services.rest.das.view.RestViewItemFileService.renderServiceJSONGet(RestViewItemFileService.java:263)\r\n\tat com.ibm.domino.services.rest.das.view.RestViewItemFileService.renderService(RestViewItemFileService.java:77)\r\n\tat com.ibm.domino.services.HttpServiceEngine.processRequest(HttpServiceEngine.java:167)\r\n\tat com.ibm.xsp.extlib.component.rest.UIBaseRestService._processAjaxRequest(UIBaseRestService.java:242)\r\n\tat com.ibm.xsp.extlib.component.rest.UIBaseRestService.processAjaxRequest(UIBaseRestService.java:219)\r\n\tat com.ibm.xsp.util.AjaxUtilEx.renderAjaxPartialLifecycle(AjaxUtilEx.java:206)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.renderAjaxPartial(FacesServletEx.java:225)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:170)\r\n\tat com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)\r\n\tat com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:583)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1281)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:854)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:751)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:572)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1265)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:658)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:481)\r\n\tat com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:341)\r\n\tat com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:297)\r\n\tat com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)\r\n"
}
There is a property databaseName in service definitions
xe:viewItemFileService
xe:viewJsonLegacyService
xe:viewJsonService
xe:viewXmlLegacyService
in xe:restService.
If it's empty then the current database is used but if you put in path and name of a database then those database is used.
The view name is defined in property viewName.
<xe:restService id="restService1">
<xe:this.service>
<xe:viewItemFileService
databaseName="MyFolder/MyOtherDatabase.nsf"
viewName="AllContacts"
...>
I am attempting to double click on a dojo grid to open a document. During this exercise I have found that I cannot execute any events from the dojo grid. Even if I try to execute a relatively simple event such as navigating to a page on the dojo grid events it fails to run at all.
Is there anything that I am missing?
Is there anyway to troubleshoot this?
Thanks,
[edit]
8.5.2
[edit2]
<xe:this.service>
<xe:viewItemFileService contentType="application/json"
defaultColumns="true" var="entry" viewName="RFCID">
</xe:viewItemFileService>
</xe:this.service>
</xe:restService>
<xp:br></xp:br>
<xe:djxDataGrid id="djxDataGrid1" storeComponentId="restService1"
escapeHTMLInData="false" loadingMessage="Loading Data">
<xe:djxDataGridColumn id="djxDataGridColumn1" field="rfcid"
label="RFC ID" width="30" editable="false">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn2"
label="Request Title" field="requesttitle" width="200">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn3" label="Initiator"
field="initiator" width="100">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn4" label="Waiting On"
field="waitingon" width="100">
</xe:djxDataGridColumn>
<xe:djxDataGridColumn id="djxDataGridColumn5" label="Status"
field="rfcstatus" width="150">
</xe:djxDataGridColumn>
<xp:eventHandler event="onRowDblClick" refreshMode="complete"
immediate="true" submit="true">
<xe:this.action>
<xp:openPage name="/Home.xsp" target="newDocument"></xp:openPage>
</xe:this.action>
</xp:eventHandler></xe:djxDataGrid>
<xp:br></xp:br>
</xp:view>
The Extension Library Dojo Data Grid events are client-side, not server-side. That's because it is a Dojo control and the Dojo controls are client-side. See the examples in the demo database or the book for how to get a handle on the current row.