• calenderStoreCustomRestService not ready

    By Thomas Adrian 1 decade ago

     

    I am to trying to get the calenderStoreCustomRestService custom control to work that is provided in the Extlib application.
    
     
    
    the reason I use this control instead of the normal inotes rest control is because I need to filter the data based on which team room is opened in my application. so I search the "viewJsonLegacyService" to return the calendar entries.
    
     
    
    I can see comments in the CalenderStore.js to what looks like you tried to something similar with another team room application but the code seem have a few TBD's.
    
     
    
    I have managed to get the code working for appointments/meetings but could not get it to work for repeating all day events because I get errors from the calendarStore.js script.
    
     
    
    I also noticed a few other errors showing up from time to time depending on which language I am using, the refrence seem wrong for default lanuage., but I am not really sure what is causing this. I read somewhere on internet that if the nls\.. lang files is not available it default to the nls root which it probably does as it works even if I see a lot of 404 errors.
    
     
    
    example:this file is references but not found
    
    <a href="http://localhost/xsp/.ibmxspres/.dwa/cv/nls/en/calendarView.js">http://localhost/xsp/.ibmxspres/.dwa/cv/nls/en/calendarView.js</a></div>
    
    &nbsp;
    
    &nbsp;
    
    I hope you finalize this custom control and make a working example in the extlib application for all types of events, like appointments, all day events etc.
    
    &nbsp;
    
    this beta code is the only refrence I have found so far for filtering calendar entries and creating dynamic calendars so it would be really nice it this could be fixed.
    
    &nbsp;
    
    I have tried both 8.5.3 and 9 beta1
    
    &nbsp;
    
    you can see my result if you login to <a href="http://www.intrapages.com">http://www.intrapages.com</a> and go to the events section in the left pane<br/>
    &nbsp;</div>
    
    &nbsp;
    
    &nbsp;
    
    &nbsp;
    
    Thank you
    
    Thomas Adrian
    
    &nbsp;
    
    &nbsp;
    
    &nbsp;
    
    &nbsp;
    
    &nbsp;
    

     

    here is the calenderStoreCustomRestService custom control from the xpagesext.nsf (latest extlib)

     

     

    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
    
    &lt;xp:view xmlns:xp=&quot;http://www.ibm.com/xsp/core&quot;
    
    xmlns:xe=&quot;http://www.ibm.com/xsp/coreex&quot; dojoParseOnLoad=&quot;true&quot;
    
    xmlns:xc=&quot;http://www.ibm.com/xsp/custom&quot;&gt;
    
    &lt;xp:this.resources&gt;
    
    &lt;xp:script clientSide=&quot;true&quot;&gt;
    
    &lt;xp:this.contents&gt;&lt;![CDATA[
    
    var path = &quot; ${javascript:// compute the path serverside
    
    var value = &#39;/&#39;;// path relative to the application
    
    var viewHandler:com.ibm.xsp.application.ViewHandlerEx = facesContext.getApplication().getViewHandler();
    
    value = viewHandler.getResourceURL(facesContext,value);
    
    value = facesContext.getExternalContext().encodeResourceURL(value);
    
    if( value.endsWith(&#39;/&#39;) ){
    
    value = value.substring(0, value.length - 1);
    
    }
    
    return value;
    
    } &quot;.trim();
    
    dojo.registerModulePath(&#39;xpagesext&#39;, path);
    
    ]]&gt;&lt;/xp:this.contents&gt;
    
    &lt;/xp:script&gt;
    
    &lt;!--
    
    ensure the dwa module path is registered before attempt to load from
    
    xpagesext module path
    
    --&gt;
    
    &lt;xp:dojoModule name=&quot;dwa.cv.calendarView&quot;&gt;&lt;/xp:dojoModule&gt;
    
    &lt;!--
    
    Just referencing .js files just for ease of firebug debugging - not
    
    needed because the modules auto-include.
    
    --&gt;
    
    &lt;xp:script clientSide=&quot;true&quot;
    
    src=&quot;/.ibmxspres/.dwa/cv/calendarView.js&quot;&gt;
    
    &lt;/xp:script&gt;
    
    &lt;xp:script clientSide=&quot;true&quot;
    
    src=&quot;/.ibmxspres/.dwa/cv/calendarDataStore.js&quot;&gt;
    
    &lt;/xp:script&gt;
    
    &lt;xp:script clientSide=&quot;true&quot;
    
    src=&quot;/.ibmxspres/.dwa/date/calendar.js&quot;&gt;
    
    &lt;/xp:script&gt;
    
    &lt;xp:script clientSide=&quot;true&quot; src=&quot;/CalendarStore.js&quot;&gt;&lt;/xp:script&gt;
    
    &lt;/xp:this.resources&gt;
    
    &nbsp;
    
    &nbsp;
    
    &lt;xe:restService id=&quot;restService2&quot; pathInfo=&quot;inoteslegacyjson&quot;&gt;
    
    &lt;xe:this.service&gt;
    
    &lt;xe:viewJsonLegacyService
    
    databaseName=&quot;${compositeData.databaseName}&quot; viewName=&quot;${compositeData.viewName}&quot;
    
    defaultColumns=&quot;false&quot; var=&quot;entry&quot; contentType=&quot;text/plain&quot;&gt;
    
    &lt;xp:this.columns&gt;
    
    &lt;!-- &nbsp;Cal Date --&gt;
    
    &lt;xe:restViewColumn name=&quot;$134&quot; columnName=&quot;$134&quot;&gt;&lt;/xe:restViewColumn&gt;
    
    &lt;!-- &nbsp;Icon --&gt;
    
    &lt;xe:restViewColumn name=&quot;$149&quot; columnName=&quot;$149&quot;&gt;&lt;/xe:restViewColumn&gt;
    
    &lt;!-- &nbsp;Start Date --&gt;
    
    &lt;xe:restViewColumn name=&quot;$144&quot; columnName=&quot;$144&quot;&gt;&lt;/xe:restViewColumn&gt;
    
    &lt;!-- &nbsp;End Date --&gt;
    
    &lt;xe:restViewColumn name=&quot;$146&quot; columnName=&quot;$146&quot;&gt;&lt;/xe:restViewColumn&gt;
    
    &lt;!-- &nbsp;Description --&gt;
    
    &lt;xe:restViewColumn name=&quot;$147&quot; columnName=&quot;$147&quot;&gt;&lt;/xe:restViewColumn&gt;
    
    &lt;!-- &nbsp;Alt Description --&gt;
    
    &lt;xe:restViewColumn name=&quot;$151&quot; columnName=&quot;$151&quot;&gt;&lt;/xe:restViewColumn&gt;
    
    &lt;!-- &nbsp;Type --&gt;
    
    &lt;xe:restViewColumn name=&quot;$152&quot; columnName=&quot;$152&quot;&gt;&lt;/xe:restViewColumn&gt;
    
    &lt;!-- &nbsp;Chair --&gt;
    
    &lt;xe:restViewColumn name=&quot;$153&quot; columnName=&quot;$153&quot;&gt;&lt;/xe:restViewColumn&gt;
    
    &lt;!-- &nbsp;Confidential --&gt;
    
    &lt;xe:restViewColumn name=&quot;$154&quot; columnName=&quot;$154&quot;&gt;&lt;/xe:restViewColumn&gt;
    
    &lt;!-- &nbsp;Status --&gt;
    
    &lt;xe:restViewColumn name=&quot;$160&quot; columnName=&quot;$160&quot;&gt;&lt;/xe:restViewColumn&gt;
    
    &lt;xe:restViewColumn name=&quot;$UserData&quot; columnName=&quot;$UserData&quot;&gt; &lt;/xe:restViewColumn&gt;
    
    &lt;/xp:this.columns&gt;
    
    &lt;xe:this.compact&gt;&lt;![CDATA[#{javascript:sessionScope.CompactJson2==&quot;true&quot;}]]&gt;&lt;/xe:this.compact&gt;
    
    &lt;/xe:viewJsonLegacyService&gt;
    
    &lt;/xe:this.service&gt;
    
    &lt;/xe:restService&gt;
    
    &nbsp;
    
    &nbsp;
    
    &lt;xe:notesCalendarStore id=&quot;${compositeData.storeComponentId}&quot;
    
    jsId=&quot;nstore1&quot; dojoType=&quot;xpagesext.CalendarStore&quot;&gt;
    
    &lt;xe:this.dojoAttributes&gt;
    
    &lt;xp:dojoAttribute name=&quot;pathInfo&quot;
    
    value=&quot;/inoteslegacyjson&quot;&gt;
    
    &lt;/xp:dojoAttribute&gt;
    
    &lt;/xe:this.dojoAttributes&gt;
    
    &nbsp;
    
    &lt;/xe:notesCalendarStore&gt;
    
    &nbsp;
    
    &lt;/xp:view&gt;
    
    &nbsp;
    
    &nbsp;
    
    &nbsp;
    
    &nbsp;