You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Wall <cw...@bea.com> on 2002/08/12 17:14:37 UTC

Session bean not rendering values in form

The form bean, recordBean, was set to "request" scope in the
struts-config.xml.

----- Original Message -----
From: "Chris Wall" <cw...@bea.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Cc: "Chris Wall" <cw...@bea.com>
Sent: Saturday, August 10, 2002 10:01 AM
Subject: Session bean not rendering values in form


Hi.  I am having trouble rendering beans attached to the session in a JSP.

I have a two page information gathering process where one page collects data
and stores the bean in the session.  The Action redirects to the second page
where data is collected into a bean and attached to the initial bean.
Lastly, the second Action posts back to the first page where these beans are
rendered in a view.

Textbox snippets that are not rendering...
    <html:text
    name="recordBean"
    property="symptoms"
    property="symptoms"
    style="WIDTH: 542px; HEIGHT: 22px" size="77"
    maxlength="11"/>
    // RecordBean contains VitalSignsBean
    <html:text
    name="recordBean"
    property="vitalSignsBean.temperature"
    style="WIDTH: 77px; HEIGHT: 22px" size="11"
    maxlength="11"/>

If the object is manually retrieved from the session in the JSP, ala..
<%   System.out.println("R:
"+((RecordBean)session.getAttribute("recordBean")).toString());  %>
...all expected data is printed.

<%@ page session="true"%> is set.

Sounds like beans are rendered from any scope via a search protocol...
Struts documentation says: "Beans from any scope can be requested - by
default, the scopes are searched in expanding visibility order (page,
request, session, and application) to locate the requested bean.Beans from
any scope can be requested - by default, the scopes are searched in
expanding visibility order (page, request, session, and application) to
locate the requested bean."

Any thoughts as to why my session beans are not rendered?

Thanks!

-Chris



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>