You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Maciej Kołodziej <Ma...@comarch.pl> on 2002/01/15 16:47:52 UTC
Re[2]: Problem with mapped properties
Hi,
In Your mail sent Tuesday, January 15, 2002 You wrote:
RF> I'm not really sure in understand you problem but in order for
RF> "property(key)" to work, you need to have the following methods on your form
RF> bean:
RF> public Object getProperty(String key)
RF> public void setProperty(String key, Object value)
Yes, I have these methods, and it's not the problem. The problem is
that I can't insert dynamic content into jsp tags, when I have
brackets in it. Like I wrote:
<html:text property="<%=key%>"/>
works and:
<html:text property="property(<%=key%>)"/>
doesn't work and I just get:
<input type="text" name="property(<%=key%>)">
on the output.
That means, that in the second case java code fragment
denoted by <%= and %> is not parsed and is treated as text.
--
Best regards,
Maciej
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re[4]: Problem with mapped properties
Posted by Maciej Kołodziej <Ma...@comarch.pl>.
Hi,
In Your mail sent Wednesday, January 16, 2002 You wrote:
RT> I was just wrestling with the same problem and found the following in the
RT> JSP 1.2 Spec.
RT> JSP.2.13.1 Request Time Attribute Values
RT> <snip>
RT> The expression must appear by itself (multiple
RT> expressions, and mixing of expressions and string constants are not
RT> permitted).
RT> </snip>
Right. So I suppose, that something like that inside a dbtags:resutSet
tag is impossible:
<sql:resultSet id="rs" name="schemes" scope="request" loop="true">
<html:option value='<dbtags:getColumn colName="name"/>'>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<dbtags:getColumn colName="name"/>
</html:option>
</sql:resultSet>
So how should I do that? Just create a String variable like:
<% String name = ... %>
And how can I get to that "rs" result set from inside <% %>?
--
Best regards,
Maciej
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Re[2]: Problem with mapped properties
Posted by Robert Taylor <rt...@mulework.com>.
I was just wrestling with the same problem and found the following in the
JSP 1.2 Spec.
JSP.2.13.1 Request Time Attribute Values
<snip>
The expression must appear by itself (multiple
expressions, and mixing of expressions and string constants are not
permitted).
</snip>
HTH,
robert
> -----Original Message-----
> From: Maciej Kołodziej [mailto:Maciej.Kolodziej@comarch.pl]
> Sent: Tuesday, January 15, 2002 10:48 AM
> To: Struts Users Mailing List
> Subject: Re[2]: Problem with mapped properties
>
>
> Hi,
>
> In Your mail sent Tuesday, January 15, 2002 You wrote:
>
> RF> I'm not really sure in understand you problem but in order for
> RF> "property(key)" to work, you need to have the following
> methods on your form
> RF> bean:
>
> RF> public Object getProperty(String key)
> RF> public void setProperty(String key, Object value)
>
> Yes, I have these methods, and it's not the problem. The problem is
> that I can't insert dynamic content into jsp tags, when I have
> brackets in it. Like I wrote:
>
> <html:text property="<%=key%>"/>
>
> works and:
>
> <html:text property="property(<%=key%>)"/>
>
> doesn't work and I just get:
>
> <input type="text" name="property(<%=key%>)">
>
> on the output.
> That means, that in the second case java code fragment
> denoted by <%= and %> is not parsed and is treated as text.
>
>
> --
> Best regards,
> Maciej
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>