This content has been marked as final.
Show 3 replies
-
1. Re: Sharing an Entity Between JSP's
johnurban Nov 7, 2006 1:18 AM (in response to johnurban)I should have posted the code:
JSF with the call that needs to get me to the other screen:<h:column> <f:facet name="header"> <h:outputText value="Print"/> </f:facet> <h:commandLink value="print" action="#{personFinder.print}"> <f:param name="id" value="#{id}"/> </h:commandLink> </h:column>
When I click on Print, I can see that I get the System.out in the server.log file:
00:12:42,820 INFO [STDOUT] inside print..:531
Here is the code for personFinder.print:... @DataModelSelection @Out(required=false) private Person selectedPerson; ... @LoggedIn public String print() { System.out.println("inside print..:"+selectedPerson.getId()); return "/uPrintLabel.jsp"; }
It does indeed get to my uPrintLabel.jsp. But my firstName and lastName don't have anything in them:<h:form> <table> <tr> <td><h:outputText value="#{selectedPerson.firstName}"/></td> </tr> <tr> <td><h:outputText value="#{selectedPerson.lastName}"/></td> </tr> </table> </h:form>
This page contains nothing, even though selectedPerson has valid data inside of it. I need to display in this screen information about the selectedPerson. -
2. Re: Sharing an Entity Between JSP's
newlukai Nov 7, 2006 3:33 AM (in response to johnurban)In my app I've a similar use-case. I think I had the same problem, too. My solution was to integrate the "detailed code" like your getFirstName() method in the component which manages the list and the selected item.
I would prefer separated components, but I didn't find out how. -
3. Re: Sharing an Entity Between JSP's
johnurban Nov 7, 2006 10:28 PM (in response to johnurban)Are seperated components possible with seam? Old school way is the save the person object to the session or store it in a SFSB, then using the JSP's usebean, retrieve the data for display. How do you do this in Seam?