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 Pat <cp...@yahoo.com> on 2008/07/09 23:30:31 UTC

page level bean into value

Hello
I have defined a page level bean (<bean:page .../>) and I can get at its members, however I cant get the damn syntax right to expose the members in a struts html:text tag.  I have tried
<html:text ... value="${pageScope|sessionScope.beanName.beanMember}"/>or even
<html:text ... value="<bean:write name="myBean" property="beanMemberName"/>"/>.  Is it possible?  What is the syntax?  tia.


Re: page level bean into value

Posted by Chris Pat <cp...@yahoo.com>.
Hi 
I am using the 1.1.1 jstl jars.  I thought the struts bean tags put the bean into the pageScope or sessionScope.  I can get other bean.values from the sessionScope with the jstl syntax.  I tried the <bean:write.../> substitution the ' for the " within some contexts worked in the past, of course it didnt here.  What framework/jars do I need to get this to work with Tomcat 5.0.28?  Yes I should upgrade, I just want to get this work first.  Any ideas/edification appreciated.

--- On Wed, 7/9/08, Chris Pat <cp...@yahoo.com> wrote:
From: Chris Pat <cp...@yahoo.com>
Subject: page level bean into value
To: "Struts Users Mailing List" <us...@struts.apache.org>
Date: Wednesday, July 9, 2008, 5:30 PM

Hello
I have defined a page level bean (<bean:page .../>) and I can get at its
members, however I cant get the damn syntax right to expose the members in a
struts html:text tag.  I have tried
<html:text ...
value="${pageScope|sessionScope.beanName.beanMember}"/>or even
<html:text ... value="<bean:write name="myBean"
property="beanMemberName"/>"/>.  Is it possible?  What
is the syntax?  tia.

Re: page level bean into value

Posted by Dave Newton <ne...@yahoo.com>.
--- On Wed, 7/9/08, Chris Pat <cp...@yahoo.com> wrote:
> I have defined a page level bean (<bean:page .../>)
> and I can get at its members, however I cant get the damn
> syntax right to expose the members in a struts html:text
> tag.  I have tried
> <html:text ... value="${pageScope|sessionScope.beanName.beanMember}"/>

Did you try just beanName.beanMember?

Are you using a JSP 2+ container? If not, are you using the EL tags?

> <html:text ... value="<bean:write name="myBean"
> property="beanMemberName"/>"/>. 

Well you had to know *that* wouldn't work.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org