Passing Objects as Parameters
Is it possible to send an object as a paramater from one jsp page to another?
I would like to pass an object from a view page to a details page so that the details page can use the object to display all of its properties. I would accept as a solution passing each of the properties as their own parameters since I haven't yet figured out how to do this. I imagine though that if this is possible it would be possible to pass an object as well.
I've been using this page as a reference:
http://balusc.xs4all.nl/srv/dev-jep-com.html
It seems to be the most helpful page I've found on the internet so far for doing this, and is sadly not very well placed in any google searches I did.
I was going to follow through passing parameters the first way it suggested, but I notice that it uses non standard libraries. Are the first two ways possible to do under the JSF API?
I went on to using the managed properties tags in faces-config, but still can't get it to work.
faces-config.xml
<managed-bean>
<managed-bean-name>ProjectsManager</managed-bean-name>
<managed-bean-class>beans.ProjectsManager</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>projObj</property-name>
<value>#{ProjectsManager.projObj}</value>
</managed-property>
</managed-bean>
ProjectsManager.java: This file has the relevant object (projObj) and mutators for the object
Project.java:Project object encapsulating class
view page, projectAll: array with individual Project objects
…
<h:dataTable id="projectsTable" value="#{ProjectsManager.projectAll}" var="item">
<h:column>
<f:facet name="header">
<h:outputText value="Name"/>
</f:facet>
<h:outputLink value="project_edit.jsp">
<f:param name="projObj" value="#{item}"/>
<h:outputText value="#{item.name}"></h:outputText>
</h:outputLink>
</h:column>
I'm hoping the edit page can access the following like so, only one property shown
Name: <h:outputText id="name" value="#{ProjectsManager.projObj.name}"/>
I tried it by passing individual properties like I said. This required that I set the class encapsulating the project objects as a managed bean, and having each of its properties set as managed properties.
If you know of an entirely different approach I'm open to anything that solves the problem of passing a parameter from one jsp to another. There seems to be many ways to achieve the same thing, but I'm finding parameter passing in JSF to be a big headache.
Any help or suggestions would be greatly appreciated

