You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jakub Milkiewicz <jm...@gmail.com> on 2008/04/29 22:22:14 UTC

StrutsTypeConverter 2 level nested expression

 Hi
I am quite new to Struts 2 and have problems with StrutsTypeConverter I have
created my custom converter but i can see it is not fired when my
Action-conversion.properites contains more than 2 level property expression.
Example:
datePeriodFilterParameters.dateTo=MyConverter  (works as exptected)
datePeriodFilterParameters.cos.dateFrom=MyConverter (not working :( )
Can anyone knows what is going on?<br>Is there any limit on nested property
expressions?
I searched forum and found some posts about createing
dto-conversion.properites ...

miluch

Re: StrutsTypeConverter 2 level nested expression

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Jakub Milkiewicz wrote:
> Hi
> In my case i also noticed that convertToString method is not called...
> So now i have 2 problems:
> 1) convertFromString  is called but convertToString is never called for
> datePeriodFilterParameters.dateTo property
> 2) none of convertFromString and convertToString is called for
> datePeriodFilterParameters.cos.dateFrom property
>
> What do you think of it?
>
>   

Sorry, I have no further ideas on this one. It's time to put a 
breakpoint in XWorkConverter to see what it does when it gets to your 
property.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: StrutsTypeConverter 2 level nested expression

Posted by Jakub Milkiewicz <jm...@gmail.com>.
Hi
In my case i also noticed that convertToString method is not called...
So now i have 2 problems:
1) convertFromString  is called but convertToString is never called for
datePeriodFilterParameters.dateTo property
2) none of convertFromString and convertToString is called for
datePeriodFilterParameters.cos.dateFrom property

What do you think of it?

2008/4/30 Jakub Milkiewicz <jm...@gmail.com>:

> Hi
>
> I ve checked all required getters and setters million times but still
> nothing.
> If i just remove following line from Action-conversion.properites
> datePeriodFilterParameters.cos.dateFrom=MyConverter
> and change datatype of  dateFrom property to String binding is succesfull
> and inside execute method of my action i can see
> datePeriodFilterParameters.cos.dateFrom to string value i typed in in
> form.
> So if binding works with given expression:
> datePeriodFilterParameters.cos.dateFrom why converion mechanism do not work
> with it?
>
>
>
>
> 2008/4/30 Jeromy Evans <je...@blueskyminds.com.au>:
>
> Jakub Milkiewicz wrote:
> >
> > >  Hi
> > > I am quite new to Struts 2 and have problems with StrutsTypeConverter
> > > I have
> > > created my custom converter but i can see it is not fired when my
> > > Action-conversion.properites contains more than 2 level property
> > > expression.
> > > Example:
> > > datePeriodFilterParameters.dateTo=MyConverter  (works as exptected)
> > > datePeriodFilterParameters.cos.dateFrom=MyConverter (not working :( )
> > > Can anyone knows what is going on?<br>Is there any limit on nested
> > > property
> > > expressions?
> > > I searched forum and found some posts about createing
> > > dto-conversion.properites ...
> > >
> > > miluch
> > >
> > >
> > >
> >
> > There's no limit on the depth of the property names.  Are you certain
> > you've got all the necessary getters, setters and constructors on cos and
> > datePeriodFilterParameters?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: StrutsTypeConverter 2 level nested expression

Posted by Jakub Milkiewicz <jm...@gmail.com>.
Hi

I ve checked all required getters and setters million times but still
nothing.
If i just remove following line from Action-conversion.properites
datePeriodFilterParameters.cos.dateFrom=MyConverter
and change datatype of  dateFrom property to String binding is succesfull
and inside execute method of my action i can see
datePeriodFilterParameters.cos.dateFrom to string value i typed in in form.
So if binding works with given expression:
datePeriodFilterParameters.cos.dateFrom why converion mechanism do not work
with it?




2008/4/30 Jeromy Evans <je...@blueskyminds.com.au>:

> Jakub Milkiewicz wrote:
>
> >  Hi
> > I am quite new to Struts 2 and have problems with StrutsTypeConverter I
> > have
> > created my custom converter but i can see it is not fired when my
> > Action-conversion.properites contains more than 2 level property
> > expression.
> > Example:
> > datePeriodFilterParameters.dateTo=MyConverter  (works as exptected)
> > datePeriodFilterParameters.cos.dateFrom=MyConverter (not working :( )
> > Can anyone knows what is going on?<br>Is there any limit on nested
> > property
> > expressions?
> > I searched forum and found some posts about createing
> > dto-conversion.properites ...
> >
> > miluch
> >
> >
> >
>
> There's no limit on the depth of the property names.  Are you certain
> you've got all the necessary getters, setters and constructors on cos and
> datePeriodFilterParameters?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: StrutsTypeConverter 2 level nested expression

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Jakub Milkiewicz wrote:
>  Hi
> I am quite new to Struts 2 and have problems with StrutsTypeConverter I have
> created my custom converter but i can see it is not fired when my
> Action-conversion.properites contains more than 2 level property expression.
> Example:
> datePeriodFilterParameters.dateTo=MyConverter  (works as exptected)
> datePeriodFilterParameters.cos.dateFrom=MyConverter (not working :( )
> Can anyone knows what is going on?<br>Is there any limit on nested property
> expressions?
> I searched forum and found some posts about createing
> dto-conversion.properites ...
>
> miluch
>
>   

There's no limit on the depth of the property names.  Are you certain 
you've got all the necessary getters, setters and constructors on cos 
and datePeriodFilterParameters?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org