How do I implement something like this ...

<jsp:useBean id="dataPreprocessor"
class="myclass.util.DataPreprocessor"
scope="session">
<jsp:setProperty name="dataPreprocessor" property="dateFormat" value="<%= java.text.DateFormat.LONG %>"/>
<jsp:setProperty name="dataPreprocessor" property="timeFormat" value="<%= java.text.DateFormat.SHORT %>"/>


</jsp:useBean>


... using webwork tags? I would expect something like ...


<webwork:bean id="dataPreprocessor" name="myclass.util.DataPreprocessor">
        <webwork:param name="dateFormat" value="..."
        <webwork:param name="dateFormat" value="..."
</webwork:bean>

.... but there are 2 problems I cannot figure out how to solve. As I understand the <webwork:bean> tag creates new instance in the page scope but I need to pick the "dataPreprocessor" that already exists in the session scope.
The second problem is how do I pass the java.text.DateFormat.SHORT (which is static int) as a parameter. What is the correct syntax ... value="java.text.DateFormat.SHORT" or value="'java.text.DateFormat.SHORT'" or even value="{'java.text.DateFormat.SHORT'}" ?


Thanks.

Mira



-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to