[jboss-user] [JBoss Seam] - Re: Sharing an Entity Between JSP's

johnurban do-not-reply at jboss.com
Tue Nov 7 01:18:36 EST 2006


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:

anonymous wrote : 
  | 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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983640#3983640

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983640



More information about the jboss-user mailing list