Hi, thanks for the anwer.

   It is a bit complicated, because house.id is not in the value stack but
in the page context. I use JSTL tag to complement the struts ones, so
sometimes the property is in the page context.

   With the version 2.0.9 you could use the ${} expressions (Expression
Language), but not in the 2.0.11. Recently I updated my application from
2.0.9 to 2.0.11, and realized s: tags with EL expressions caused an
exception.

   I can't reference house.id as an OGNL expression because house is not in
the stack value. The main problem seems to be I can't give the id property a
value using the s:param tag, what it's not exposed in the struts2
documentation.

   I've tested something simillar

<s:set name="tmpId"><s:param
name="value">stockTotal_${house.id}</s:param></s:set>
<s:textfield id="stockTotal_%{#tmpId}" value=.../>

   but this generate a dump of the value stack (like toString method):

id="stockTotal_{..... valueStack dump .....}


Thanks in advance.





Julien RICHARD-2 wrote:
> 
> Do you tried :
> 
> <s:textfield id="stockTotal_%{house.id}" value="%{house.number}"/>
> 
> On Jan 29, 2008 12:32 PM, David Tercero <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi all,
>>
>>   I'm  having troubles setting the id property in a textfield tag. I use
>> the version 2.0.11
>>
>>   The case is I'm not able to introduce a variable value into the id
>> property, I mean:
>>
>> <s:textfield>
>>    <s:param name="id">stockTotal_${house.id}</s:param>
>>    <s:param name="name">stockList[${house.id}].number</s:param>
>>    <s:param name="value">${house.number}</s:param>
>> </s:textfield>
>>
>>   I generate several textfields like this one and I need to reference it
>> in
>> javascript (that's because i need to set the id property). Using the
>> param
>> tag doesn't work for the id, but goes right for the name and value
>> propertys.
>>
>>   I tried several ways but none of them seems to work.
>>
>> Any help would be appreciated.
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-setting-id-property-of-texfield-tag-tp15157521p15157521.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> RICHARD Julien,
> UNILOG
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-setting-id-property-of-texfield-tag-tp15157521p15161516.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to