开发者

logic: equal with the contents of a hidden field

开发者 https://www.devze.com 2023-01-08 02:14 出处:网络
I have a hidden field: <input type=\"hidden\" name=\"champs\" id=\"champs\"> I want do a <logic:equal> with the content of this field hidden, I tried the solutions but not work

I have a hidden field:

<input type="hidden" name="champs" id="champs">

I want do a <logic:equal> with the content of this field hidden, I tried the solutions but not work

&l开发者_如何学Pythont;logic:equal name="virement" property="statut"  value='champs' >

just be there is a syntax very precise in the value property of the logic: equal that I can found.


I'm a little rusty with this, but here are some hints:

Your field "champs" is a browser field, not a Java variable. When your request arrives at your servlet, the contents of browser fields have been transferred to request parameters. So the value in your field will end up in a predefined object called request, and for convenience broken down some more in a bean called param. There's a syntax for accessing this stuff... see below.

A little more detail (though I've seen it explained better) can be found in this page and maybe this one. Better yet, here

You can Google for "JSP Expression Language" to get more information.


You can use the struts tag html:hidden instead of input type = "hidden"

0

精彩评论

暂无评论...
验证码 换一张
取 消