Richard Golebiowski wrote:That is odd. I have never seen setting the fieldValue not work. I'll have to give it a try later today and see what happens.
Richard Golebiowski wrote:Try setting the fieldValue attribute:
fieldValue="true"
David Newton wrote:Honestly, I'd use a JavaScript calendar widget, and use Apache Commons date utility to try a collection of date formats if JavaScript is disabled.
Thanks for the kind words :)
<s:textfield id="%{#attr.dateField}" name="%{#attr.dateField}.date" cssClass="calendar %{#attr.dateField}.format" />
David Newton wrote:You can't double-evaluated OGNL (well, you can, by using OGNL's static eval method, but I seriously don't think it's the best solution).
Xolani Nkosi wrote:
Xolani Nkosi wrote:
David Newton wrote:But S2 documentation seems to suggest that we disallow JSP EL due to the security risk. So use OGNL all the way; there's a FAQ entry on this I think.
Right, I can get at the parameters made when calling my tag by using #attr.enabled, #attr.name etc etc.
However, as these are OGNL expressions, I need a way to evaluate them. e.g.
<s:if test="#attr.enabled"> needs to be something like <s:if test="%{#attr.enabled}"> as #attr.enabled itself contains an OGNL expression like "object.enabled" that should be resolved against the value stack. But, surprise surprise, this doesn't work. Nesting %{'s doesn't cause the inner result to get evaluated as if it were an OGNL expression.
So, where's the OGNL eval function?
Right, this thread seems to detail my problem: http://old.nabble.com/Attribute-OGNL-evaluation-issue-on-struts-tag-in-tag-file-td21732140.html
Someone claims to have found the solution at http://forums.opensymphony.com/thread.jspa?messageID=6278131 but it seems the opensymphony forums aren't around any more. Anyone got a lead on where this solution now is?