Alex,
Everything looks fine to me. What locale are you using? I'd recommend
that you take a look at the source code and step through
XWorkBasicConverter. Also, 1.0 final is out, but I don't imagine that
would be causing any trouble.

Patrick


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Alexandru Roman
> Sent: Friday, February 20, 2004 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: [OS-webwork] type conversion
> 
> I can't seem to get default type converter working with the Date
example
> on the web site:
> 
> I tried a form with two parameters, one with a text input and one with
> the date input.
> I put print statements in for the getters and setters, and here is
what
> I get in the log:
> 
> SETTING TEXT: null
> GETTING DATE: null
> SETTING DATE: null
> GETTING TEXT: 12/01/2003
> SETTING TEXT: 12/01/2003
> START EXECUTE
> DATE: null
> END EXECUTE
> GETTING DATE: null
> GETTING TEXT: 12/01/2003
> GETTING DATE: null
> GETTING TEXT: 12/01/2003
> 
> The setters and getters seem to get called, but nothing comes through.
> 
> Am I missing something? Missing Interceptors ? I tried java.util.Date,
> and java.sql.Date
> 
> Not sure if there have been any other updates. I'm using
> xwork-1.0-dev.jar.
> 
> Any help would be appreciated.
> 
> thanks,
> 
> Alex.
> 
> Here are some code snippets:
> 
> java:
> 
> import java.util.Date;
> 
> public class TestAction implements Action {
> 
>   private Date date;
>   private String text;
> 
>   public String execute() {
>     System.out.println("START EXECUTE");
>     System.out.println("DATE: " + this.date);
>     System.out.println("END EXECUTE");
>     return SUCCESS;
>   }
> 
>   public Date getDate() {    System.out.println("GETTING DATE: " +
> this.date);    return date;  }
>   public void setDate(Date date) {    System.out.println("SETTING
DATE:
> " + date);    this.date = date;  }
>   public String getText() {    System.out.println("GETTING TEXT: " +
> this.text);    return text;  }
>   public void setText(String string) {    System.out.println("SETTING
> TEXT: " + text);    text = string;  }
> 
> }
> 
> template:
> 
>   <form action="TestAction.action" method="POST">
>     Date: $!date
>     Text: $!text
>     <input type="text" name="date" value="$!date">
>     <input type="text" name="text" value="$!text">
>     <input type="submit" name="Submit" value="Submit">
>   </form>
> 
> xwork:
> 
>         <action name="TestAction" class="org.test.action.TestAction">
>             <result name="success" type="velocity">
>                 <param
> name="location">/templates/testaction.vm</param>
>             </result>
>             <interceptor-ref name="defaultStack"/>
>         </action>
> 
>             <interceptor-stack name="defaultStack">
>                 <interceptor-ref name="timer"/>
>                 <interceptor-ref name="logger"/>
>                 <!-- <interceptor-ref name="static-params"/> -->
>                 <interceptor-ref name="params"/>
>                 <interceptor-ref name="component"/>
>                 <interceptor-ref name="chain"/>
>             </interceptor-stack>
> 
> 
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to