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 6, 2011, 7:15 PM
63 Posts

Re: JSF JavaBean does not work for Xpages (What Gives)

  • Category: Managed Beans in NSF
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: JSF Vs Xpages JavaBeans
  • Replies: 10
Thanks Ferry for your input...
 
Yes, I did try your option prior to posting this, and Xpages is unhappy:
 

<xp:dataTable rows="5" id="bookTable" var="book" value="#{Books.getBooks()}"

 
the underline signifies the error.  But I am going to start looking elsewhere, perhaps Xpages wants to load data slighly different from JSF, not sure if that makes sense.
 
In a bit, thanks!
 
Köll 
May 6, 2011, 8:43 PM
39 Posts
Re: JSF JavaBean does not work for Xpages (What Gives)

This would work, but you would have to preface it in the XSP differently.
 
You could say

<xp:dataTable rows="5" id="bookTable" var="book" value="#{javascript:Books.getBooks();}"

But the example below is accurate, if you have a setBooks() method you can use the EL reference.

Let me know if you have any questions, I basically have been trying to treat Xpages as a JSF implementation for Lotus Notes which basically means I almost strictly use Java instead of using SSJS.

Thanks
-Toby

May 7, 2011, 6:14 AM
63 Posts
Re: JSF JavaBean does not work for Xpages (What Gives)
Toby, you're a person after my own heart...  I am actually gearing towards more Java than SSJS, as an attempt to keep Apps scallable; just in case our organization need to mingle with other platforms.  I have been cheating a little by converting SSJS code to Java, been successful thus far;-)  if you have not tried this, I say give it a whirl.
 
Also toying with the idea of throwing JavaAgents or (Java) Script Libs into a jar files, access them through managed beans or some type, feed data into Xpages that way.  
 
Thanks for your input, not sure why I did not think of this... will give it a go...
 
L8ter! 
May 7, 2011, 11:40 PM
63 Posts
Re: JSF JavaBean does not work for Xpages (What Gives)
Greetings Toby!
 
Decided to see what XSP has for me, not sure where to look.  Will attempt to add an attachment, which of the libraries should I use from XSP.  I am currently toying with XSPContext to see what I can achieve.
 
Köll 
May 9, 2011, 2:45 PM
39 Posts
Re: JSF JavaBean does not work for Xpages (What Gives)
Hi,
 
Mark was kind enough to help me out when I was trying to use File Uploads with Managed Beans...He wrote a nice Blog post about it.

http://www.bleedyellow.com/blogs/andyc/entry/intercepting_file_uploads_with_java_example?lang=en
 
This should be enough to get you started.  Let me know if you need some more advice.  Thanks

-Toby
May 10, 2011, 1:00 PM
63 Posts
Re: JSF JavaBean does not work for Xpages (What Gives)
Very cool Sir...  I can truly use this in the current App...  what I meant was, I was going to add an image attachment of the XSP lib items from DDE to tell me what to use with javascript:Books.getBooks();
 
But you accidentally gave me something I needed...  I do have a need to upload the XML file back into the App.  And incidentally, my next lesson with my sons is 'file uploads' (teaching them Information technology), should help show them what goes into the gui that uploads the file...
 
With the current, javascript:Books.getBooks(); return no data, I think you mentioned having to do soemthing in XSP. 
 
Need help to figure out what to use to get it to work:-)

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