我的行动类别有2个变量:id1
和id2
。 采用了<代码>_,将其重新用作地图钥匙。
我无法利用这一代码检索地图价值:
<s:property value="%{mymap[id1_id2]}" />
我应如何收回地图价值?
我的行动类别有2个变量:id1
和id2
。 采用了<代码>_,将其重新用作地图钥匙。
我无法利用这一代码检索地图价值:
<s:property value="%{mymap[id1_id2]}" />
我应如何收回地图价值?
在OGNL中,id1_id2
的表述将假定存在一个名为id1_id2
的变量,因为它具有一个完全的法律识别特征。
如果你想减轻创伤,你需要:
<s:property value="%{mymap[id1 + _ + id2]}" />
我可能会产生一个单独的变量,作为关键用途:
<s:set var="mapKey" value="%{id1 + _ + id2}" />
<s:property value="%{mymap[#mapKey]}" />
或者更可能的话,我就这样说了,除了观察层之外。
I m trying to integrate sitemesh into my struts2 app, but i m finding that it s not making any difference and isn t showing any errors (or anything sitemesh related at all) in the logs. I ve started ...
In Struts2, how do you share your common html across all pages? In Asp.net, you ve got Master pages, and in Rails there are Layouts. The idea is that your common html (eg the header, menu, and styles)...
Hey People. I have been recently validating Struts 2 actions. In One of my action class, the save method to be precise must have two id s. That is an assessmenttype id and a course id. this is what is ...
On default I want my struts2 app to forward to an action: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"...
I am a newbie into programming and i am currently employed as a junior programmer. I am currently having some problems validating the select tags in one of my forms. What i actually trying to do is to ...
How would I execute a method with an argument in my model based on the URL? Ie, http://server/MyAction_Arg.action maps to MyClass.MyMethod(Arg)? I tried this: <action name="MyAction_*" method="...
I am setting the value(kind of default value) for a drop down select value from action class in a page(given below). When the page loads the value is beig displayed but the other elements of the ...
I am developing a Struts 2 application with support for multiple languages. If one of the domain objects needs to throw an exception, how can it do so in such a way that the error message is no ...