This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 19, 2011, 11:07 PM
57 Posts

How to write a wrapper that can handle request-safe retrieval of the underlying Notes object.

  • Category: Other
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: wrapper
  • Replies: 1
I posted an old question, but it was not well explained. Hopefully someone can help me this time
 
Subject of this post is copied from the first comment of this post
http://www.juliusbuss.de/web/youatnotes/blog-jb.nsf/dx/sorted-view-in-xpages-after-a-fulltext-search.htm?opendocument&comments

 
Follow up here
http://www.juliusbuss.de/web/youatnotes/blog-jb.nsf/dx/follow-up-to-sorted-ftsearch-results-in-xpages-with-code.htm
 
As I understand, his solution in the follow up is to cache the notesviewentry with java object, or else caching a notes resource directly in scopevariable will suffer from the same problem as here
http://www-10.lotus.com/ldd/nd6forum.nsf/0/66951de35ed7ce4885256ebe005e77a0?OpenDocument 
or being explained in more detail under comment 4 in this post
http://www.bleedyellow.com/blogs/patpicos/entry/extending_lotus_domino_document_is_there_a_way1?lang=en_us
but the problem is.....Xpages runtime wrapper is supposed to substitute java bean as data transfer object.....binding notes resource to java bean in this case feels just not right....
 
As binding a viewEntryCollection to a repeat control, without being wrapped.
<xp:repeat id="repeat1" rows="30" indexVar="rowIndex" var="row">
        <xp:this.value><![CDATA[#{javascript:return classInstanceA.getEntryCollection();
}
}]]></xp:this.value>

Entry that "row" refers to is lotus.domino.local.viewentry, instead of being com.ibm.xsp.model.domino.wrapped.DominoViewEntry
 
so back to the question........... How to write a wrapper that can handle request-safe retrieval of the underlying Notes object........so "row" will be wrapped with com.ibm.xsp.model.domino.wrapped.DominoViewEntry when 
com.ibm.xsp.model.domino.DominoViewEntryCollectionDataModel is binded to com.ibm.xsp.component.xp.XspDataIterator
 
 
A little bit add on.....I tried dataContext from http://www.mydominolab.com/2011/03/xpages-difference-between-xpthisdata.html
but it seems that code (compute dynamically, not at load,returning documentcollection or a vector of documents in datacontext is allright, but not notesviewentrycollection )within dataContext runs in every lifecycle phrase, even slower then directly binding a viewentryCollection to repeatcontroll, ( it runs on apply_request_value and render_response)
and row within the repeat controll, which is binded to the dataContext, is just an instance of notesDocument
we have been binding notes resource directly to UIComponent without problem, is this datacontext something new that can solve my original problem? If not, please lead me to the right direction.
regards
wei
May 23, 2011, 10:55 PM
57 Posts
Re: How to write a wrapper that can handle request-safe retrieval of the underlying Notes ...
was reading a little bit more on the relation between datamodel and the real data object class
series from
http://www.ibm.com/developerworks/library/j-jsf1/
and the book Core JavaServer Faces (3rd Edition)
 
examples here,
http://www.mkyong.com/jsf2/jsf-2-datatable-sorting-example-datamodel/
http://cagataycivici.wordpress.com/2006/07/10/jsf_datatable_with_custom_paging/

When I finish the reading, will post my solution here, so if anyone having written any custom datamodel with wrappedData as
com.ibm.xsp.model.domino.wrapped.DominoViewEntry
Please help me out
 
regards
wei
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal