struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Escape expression in dynamic attribute in a tag
Date Fri, 30 Aug 2013 12:47:45 GMT
queryExpr="%{'*$' +'{0}'*}" or add a getter to your action which will
return what you want.

2013/8/30 JOSE L MARTINEZ-AVIAL <jlmagc@gmail.com>:
> It does not work.
>
> <s:textfield name="userName" dojoType="dijit.form.FilteringSelect"
> queryExpr="'*$' +'{0}'*" theme="simple" store="comboStore"
> jsId="UserSelect" id="UserSelect" searchAttr="userNamesKey" pageSize="15"
> autoComplete="false" />
>
> is translated as:
>
> <input type="text" name="userName" value="" id="UserSelect" queryExpr="'*$'
> +'{0}'*" dojoType="dijit.form.FilteringSelect" store="comboStore"
> autoComplete="false" pageSize="15" jsId="UserSelect"
> searchAttr="userNamesKey"/>
>
> Any suggestions?
>
>
>
> 2013/8/30 Lukasz Lenart <lukaszlenart@apache.org>
>
>> queryExpr="'*$' +'{0}'*"
>>
>> 2013/8/30 Jose L Martinez-Avial <jlmagc@gmail.com>:
>> >
>> >> Hi all,
>> >>    I'm pretty sure this is just a silly question, but I haven't
>> >> been able to find anything. I have the following tag with some dynamics
>> >> attribues:
>> >>
>> >> <s:textfield name="userName3"
>> >>    dojoType="dijit.form.FilteringSelect"
>> >>    theme="simple"
>> >>    store="comboStore"
>> >>    sId="UserSelect2"
>> >>    id="UserSelect2"
>> >>    searchAttr="userNamesKey"
>> >>    pageSize="25"
>> >>    autoComplete="false" />
>> >>
>> >>    I need to add the attribute queryExpr="*\${0}*" to the resulting
>> >> html. The problem is that if I just put that attribute in the tag, I got
>> >> the following result:
>> >>
>> >> <input type="text" name="userName3" value="" id="UserSelect2"
>> >> queryExpr="*0*" dojoType="dijit.form.FilteringSelect" store="comboStore"
>> >> autoComplete="false" pageSize="25" jsId="UserSelect2"
>> >> searchAttr="userNamesKey"/>
>> >>
>> >>    Obviously, it is trying to parse the expression in queryExpr.
>> >> Any suggestion about how I can escape it?
>> >>
>> >> Thanks
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>

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


Mime
View raw message