Re: datepicker
lucy <[email protected]> Thu, 07 Dec 2006 09:13:46 CST
| Newsgroups | gmane.comp.java.open-symphony.webwork |
|---|---|
| Message-ID | <13876564.1165504821845.JavaMail.os-j2ee@opensymphony01.managed.contegix.com> |
The problem is want the current date in the datepicker when I enter in the page, for now I'm using sth like:
[code]
<ww:action name="auditReport" id="audit" namespace="/audit"/>
<ww:form action="auditReport!generate" method="post" namespace="/audit">
<ww:if test="#audit.dateFrom!=null">
<ww:datepicker name="dateFrom" labelposition="left" size="10" value="%{#audit.dateFrom}" />
</ww:if>
<ww:else>
<ww:datepicker name="dateFrom" labelposition="left" size="10" value="<%= new SimpleDateFormat("MM/dd/yyyy").format(new Date())%>" />
</ww:else>
</ww:form>
<br>
<ww:if test="%{generateReport}">
<ww:set name="auditLogs" id="auditLogs" scope="request" value="#audit.auditLogs"/>
<display:table name="auditLogs">
<display:column property="message" title="Message" />
<display:column property="time" title="time" />
</display:table>
</ww:if>
[/code]
This is working but I'm facing a problem because of that. If I didn't need to declare the action before the form, it would be better, just after the if when I really need to generate the report. It seems the validation interceptor is being called two times and I have an stack to exclude the generate method from validation.
Is that confusing? Help?
Thanks anyaway.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=41685&messageID=105776#105776
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]