You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jan Vissers <Ja...@cumquat.nl> on 2007/06/08 12:42:26 UTC

Can I achieve this with T4.1.1 @Bean annotation?

Can I create a @Bean annotation that achieves this:

<bean name="fromPeriodBeforeTo" 
class="com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValidator" 
lifecycle="none">
        <set name="otherDate" value="ognl:researchCard.period.to" />
        <set name="direction" 
value="ognl:@com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValidator@BEFOREEQUALS" 
/>
        <set name="validationErrorMessage" 
value="message:from-period-before-to" />
</bean>

Thanks,
-J.

-- 
Cumquat Information Technology
De Dreef 19
3706 BR Zeist
T +31 (0)30 - 6940490
F +31 (0)30 - 6940499
W http://www.cumquat.nl

E Jan.Vissers@cumquat.nl
M +31 6 51 169 556
B http://www.cumquat.nl/technology_atom10.xml



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Can I achieve this with T4.1.1 @Bean annotation?

Posted by Ma...@bmw.ch.
> Let me rephrase my question -
> 
> "/Lightweight intialization:/ A concept borrowed from 
> HiveMind where simple properties of the bean can be 
> configured in-line, as a comma-separated list of 
> property=value pairs."
> 
> Does this mean that the value of the name-value pair cannot 
> be the result of an ognl:, or message: expression?

no, afaik, you can only convert simple Strings to whatever can
be done by a Java-Beans PropertyEditor.

> 
> Thanks,
> -J.
> 
> Jesse Kuhnert wrote:
> > Not sure - you can do whatever it says you can here 
> > 
> http://tapestry.apache.org/tapestry4.1/tapestry-annotations/in
> dex.html .
> >
> > If there is something more that needs to be done a JIRA issue is 
> > probably needed.
> >
> > On 6/8/07, Jan Vissers <Ja...@cumquat.nl> wrote:
> >>
> >> Can I create a @Bean annotation that achieves this:
> >>
> >> <bean name="fromPeriodBeforeTo"
> >> 
> class="com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareVali
> >> dator
> >>
> >> "
> >> lifecycle="none">
> >>         <set name="otherDate" 
> value="ognl:researchCard.period.to" />
> >>         <set name="direction"
> >> value="
> >> 
> ognl:@com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValid
> >> ator
> >>
> >> @BEFOREEQUALS"
> >> />
> >>         <set name="validationErrorMessage"
> >> value="message:from-period-before-to" /> </bean>
> >>
> >> Thanks,
> >> -J.
> >>
> >> --
> >> Cumquat Information Technology
> >> De Dreef 19
> >> 3706 BR Zeist
> >> T +31 (0)30 - 6940490
> >> F +31 (0)30 - 6940499
> >> W http://www.cumquat.nl
> >>
> >> E Jan.Vissers@cumquat.nl
> >> M +31 6 51 169 556
> >> B http://www.cumquat.nl/technology_atom10.xml
> >>
> >>
> >>
> >> 
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> 
> --
> Cumquat Information Technology
> De Dreef 19
> 3706 BR Zeist
> T +31 (0)30 - 6940490
> F +31 (0)30 - 6940499
> W http://www.cumquat.nl
> 
> E Jan.Vissers@cumquat.nl
> M +31 6 51 169 556
> B http://www.cumquat.nl/technology_atom10.xml
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can I achieve this with T4.1.1 @Bean annotation?

Posted by Jan Vissers <Ja...@cumquat.nl>.
Yep, tried it - it doesn't work. When I look at the Hivemind code that
performs this initialization, it only uses 'String' setters and/or a
PropertyEditor. An expression like "ognl:...." isn't resolved/performed.
Too bad, this means I still need a page specification file in T4.1.1, or
does anybody have an idea how to circumvent this? It's not that big a
deal, but it would have been nice to only use annotation, I think.

Thanks,
-J.

> I don't know, have you tried it?
>
> On 6/8/07, Jan Vissers <Ja...@cumquat.nl> wrote:
>>
>> Let me rephrase my question -
>>
>> "/Lightweight intialization:/ A concept borrowed from HiveMind where
>> simple properties of the bean can be configured in-line, as a
>> comma-separated list of property=value pairs."
>>
>> Does this mean that the value of the name-value pair cannot be the
>> result of an ognl:, or message: expression?
>>
>> Thanks,
>> -J.
>>
>> Jesse Kuhnert wrote:
>> > Not sure - you can do whatever it says you can here
>> > http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
>> .
>> >
>> > If there is something more that needs to be done a JIRA issue is
>> probably
>> > needed.
>> >
>> > On 6/8/07, Jan Vissers <Ja...@cumquat.nl> wrote:
>> >>
>> >> Can I create a @Bean annotation that achieves this:
>> >>
>> >> <bean name="fromPeriodBeforeTo"
>> >> class="
>> com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValidator
>> >>
>> >> "
>> >> lifecycle="none">
>> >>         <set name="otherDate" value="ognl:researchCard.period.to" />
>> >>         <set name="direction"
>> >> value="
>> >>
>> ognl:@com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValidator
>> >>
>> >> @BEFOREEQUALS"
>> >> />
>> >>         <set name="validationErrorMessage"
>> >> value="message:from-period-before-to" />
>> >> </bean>
>> >>
>> >> Thanks,
>> >> -J.
>> >>
>> >> --
>> >> Cumquat Information Technology
>> >> De Dreef 19
>> >> 3706 BR Zeist
>> >> T +31 (0)30 - 6940490
>> >> F +31 (0)30 - 6940499
>> >> W http://www.cumquat.nl
>> >>
>> >> E Jan.Vissers@cumquat.nl
>> >> M +31 6 51 169 556
>> >> B http://www.cumquat.nl/technology_atom10.xml
>> >>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> Cumquat Information Technology
>> De Dreef 19
>> 3706 BR Zeist
>> T +31 (0)30 - 6940490
>> F +31 (0)30 - 6940499
>> W http://www.cumquat.nl
>>
>> E Jan.Vissers@cumquat.nl
>> M +31 6 51 169 556
>> B http://www.cumquat.nl/technology_atom10.xml
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can I achieve this with T4.1.1 @Bean annotation?

Posted by Jesse Kuhnert <jk...@gmail.com>.
I don't know, have you tried it?

On 6/8/07, Jan Vissers <Ja...@cumquat.nl> wrote:
>
> Let me rephrase my question -
>
> "/Lightweight intialization:/ A concept borrowed from HiveMind where
> simple properties of the bean can be configured in-line, as a
> comma-separated list of property=value pairs."
>
> Does this mean that the value of the name-value pair cannot be the
> result of an ognl:, or message: expression?
>
> Thanks,
> -J.
>
> Jesse Kuhnert wrote:
> > Not sure - you can do whatever it says you can here
> > http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html .
> >
> > If there is something more that needs to be done a JIRA issue is
> probably
> > needed.
> >
> > On 6/8/07, Jan Vissers <Ja...@cumquat.nl> wrote:
> >>
> >> Can I create a @Bean annotation that achieves this:
> >>
> >> <bean name="fromPeriodBeforeTo"
> >> class="
> com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValidator
> >>
> >> "
> >> lifecycle="none">
> >>         <set name="otherDate" value="ognl:researchCard.period.to" />
> >>         <set name="direction"
> >> value="
> >>
> ognl:@com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValidator
> >>
> >> @BEFOREEQUALS"
> >> />
> >>         <set name="validationErrorMessage"
> >> value="message:from-period-before-to" />
> >> </bean>
> >>
> >> Thanks,
> >> -J.
> >>
> >> --
> >> Cumquat Information Technology
> >> De Dreef 19
> >> 3706 BR Zeist
> >> T +31 (0)30 - 6940490
> >> F +31 (0)30 - 6940499
> >> W http://www.cumquat.nl
> >>
> >> E Jan.Vissers@cumquat.nl
> >> M +31 6 51 169 556
> >> B http://www.cumquat.nl/technology_atom10.xml
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
>
> --
> Cumquat Information Technology
> De Dreef 19
> 3706 BR Zeist
> T +31 (0)30 - 6940490
> F +31 (0)30 - 6940499
> W http://www.cumquat.nl
>
> E Jan.Vissers@cumquat.nl
> M +31 6 51 169 556
> B http://www.cumquat.nl/technology_atom10.xml
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: Can I achieve this with T4.1.1 @Bean annotation?

Posted by Jan Vissers <Ja...@cumquat.nl>.
Let me rephrase my question -

"/Lightweight intialization:/ A concept borrowed from HiveMind where 
simple properties of the bean can be configured in-line, as a 
comma-separated list of property=value pairs."

Does this mean that the value of the name-value pair cannot be the 
result of an ognl:, or message: expression?

Thanks,
-J.

Jesse Kuhnert wrote:
> Not sure - you can do whatever it says you can here
> http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html .
>
> If there is something more that needs to be done a JIRA issue is probably
> needed.
>
> On 6/8/07, Jan Vissers <Ja...@cumquat.nl> wrote:
>>
>> Can I create a @Bean annotation that achieves this:
>>
>> <bean name="fromPeriodBeforeTo"
>> class="com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValidator 
>>
>> "
>> lifecycle="none">
>>         <set name="otherDate" value="ognl:researchCard.period.to" />
>>         <set name="direction"
>> value="
>> ognl:@com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValidator 
>>
>> @BEFOREEQUALS"
>> />
>>         <set name="validationErrorMessage"
>> value="message:from-period-before-to" />
>> </bean>
>>
>> Thanks,
>> -J.
>>
>> -- 
>> Cumquat Information Technology
>> De Dreef 19
>> 3706 BR Zeist
>> T +31 (0)30 - 6940490
>> F +31 (0)30 - 6940499
>> W http://www.cumquat.nl
>>
>> E Jan.Vissers@cumquat.nl
>> M +31 6 51 169 556
>> B http://www.cumquat.nl/technology_atom10.xml
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>

-- 
Cumquat Information Technology
De Dreef 19
3706 BR Zeist
T +31 (0)30 - 6940490
F +31 (0)30 - 6940499
W http://www.cumquat.nl

E Jan.Vissers@cumquat.nl
M +31 6 51 169 556
B http://www.cumquat.nl/technology_atom10.xml



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can I achieve this with T4.1.1 @Bean annotation?

Posted by Jesse Kuhnert <jk...@gmail.com>.
Not sure - you can do whatever it says you can here
http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html .

If there is something more that needs to be done a JIRA issue is probably
needed.

On 6/8/07, Jan Vissers <Ja...@cumquat.nl> wrote:
>
> Can I create a @Bean annotation that achieves this:
>
> <bean name="fromPeriodBeforeTo"
> class="com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValidator
> "
> lifecycle="none">
>         <set name="otherDate" value="ognl:researchCard.period.to" />
>         <set name="direction"
> value="
> ognl:@com.cumquatit.refapp.view.tapestry.pages.forms.DateCompareValidator
> @BEFOREEQUALS"
> />
>         <set name="validationErrorMessage"
> value="message:from-period-before-to" />
> </bean>
>
> Thanks,
> -J.
>
> --
> Cumquat Information Technology
> De Dreef 19
> 3706 BR Zeist
> T +31 (0)30 - 6940490
> F +31 (0)30 - 6940499
> W http://www.cumquat.nl
>
> E Jan.Vissers@cumquat.nl
> M +31 6 51 169 556
> B http://www.cumquat.nl/technology_atom10.xml
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com