You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Marcell Manfrin Barbacena <ba...@gmail.com> on 2007/05/29 01:36:24 UTC

[T5] Form, and lot of questions

Hi,

I'm starting learning tapestry then please go easy :-)
I've done all the quick start things and looks good, but now I'm
trying to get things for my project.

1st - I need to change the Validate annotation for Hibernate
Validation. Looking the properties of Form component and doesn't
appear to be a pluggable way. Do I need to change the default
TrackerValidation through the IoC container? Will that still work with
client validation?

2nd - I haven't see a example of nested objects (e.g. city-state) and
haven't see a hidden component to embed in the form and do a
translator. I would like something as:

<t:form>
  ...
  <t:label for="stateName"
  <input t:type="Hidden" t:id="stateId"
t:translator="IdStateTranslator" t:value="state.id" />
  <input t:type="TextField" t:id="stateName" t:disabled="true"
t:value="state.name" />
  <a img="search.gif" t:type="actionlink" t:id="StateSearch" context="state.id">
  ...
</t:form>

This translator has to be contributed right?

my page/component would have:

@InjectPage
private SearchStatePage searchStatePage;
Object onActionFromStateSearch(Long stateId,  ) {
  searchStatePage.setup(city.getState());
  searchStatePage.callback(this);
  return searchStatePage;
}

does my city object (with Persist annotation) is going to remain valid
when the searchStatePage return?

3rd - Is it possible to add a form with radio buttons as column ? This
way I could have a search criteria form (on top of the page) that
would provide a list for the grid (with radio options) that the user
could select one (a button to submit at the bottom) to return to the
page search caller.

Tnx for the help, and I hope to contribute to the project if I collect
some ideas :-)

p.s.: How do I translate the messages used in the core components?


-- 
"Nobody knows who i really am
 I never felt this empty before
 And if I never need someone to come along
 Who's gonna comfort me and keep me strong?"
--
Marcell Manfrin Barbacena
barbacena@gmail.com
MSN Messenger: marcell84bruk@hotmail.com
ICQ UIN: 63671762
Skype: callto://marcell84bruk
+55 (83) 8808-8555 (Oi)
+55 (62) 8172-5708 (Tim)

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


Re: [T5] Form, and lot of questions

Posted by Marcell Manfrin Barbacena <ba...@gmail.com>.
Hi,

I know how to do the translator part, what about the hidden component?
And the @Persist atributtes of my current page when I go to other page
and come back, are they going to still retain the old values? Or do I
need to push what I want to the other page and push back later? Or a
@Persist annotation in the page callback going to do the work?

What I mean by 3rd was to add a radio button column to the grid
component. Sure I know I have to implement, the question is if I can
use the grid component or create a whole new one.

[]s

On 5/29/07, 蝈蝈龙 <el...@gmail.com> wrote:
> Answer 2st,
>   It seems that you have to implement the translator youself
>   Tapestry5.0.4 only support several translators :
> double,long,integer,string.
>   I just implemented a translator for Date
> Answer 3rd,
>   Maybe you have to implment it yourself.
>
>
> 2007/5/29, Marcell Manfrin Barbacena <ba...@gmail.com>:
> >
> > Hi,
> >
> > I'm starting learning tapestry then please go easy :-)
> > I've done all the quick start things and looks good, but now I'm
> > trying to get things for my project.
> >
> > 1st - I need to change the Validate annotation for Hibernate
> > Validation. Looking the properties of Form component and doesn't
> > appear to be a pluggable way. Do I need to change the default
> > TrackerValidation through the IoC container? Will that still work with
> > client validation?
> >
> > 2nd - I haven't see a example of nested objects (e.g. city-state) and
> > haven't see a hidden component to embed in the form and do a
> > translator. I would like something as:
> >
> > <t:form>
> >   ...
> >   <t:label for="stateName"
> >   <input t:type="Hidden" t:id="stateId"
> > t:translator="IdStateTranslator" t:value="state.id" />
> >   <input t:type="TextField" t:id="stateName" t:disabled="true"
> > t:value="state.name" />
> >   <a img="search.gif" t:type="actionlink" t:id="StateSearch" context="
> > state.id">
> >   ...
> > </t:form>
> >
> > This translator has to be contributed right?
> >
> > my page/component would have:
> >
> > @InjectPage
> > private SearchStatePage searchStatePage;
> > Object onActionFromStateSearch(Long stateId,  ) {
> >   searchStatePage.setup(city.getState());
> >   searchStatePage.callback(this);
> >   return searchStatePage;
> > }
> >
> > does my city object (with Persist annotation) is going to remain valid
> > when the searchStatePage return?
> >
> > 3rd - Is it possible to add a form with radio buttons as column ? This
> > way I could have a search criteria form (on top of the page) that
> > would provide a list for the grid (with radio options) that the user
> > could select one (a button to submit at the bottom) to return to the
> > page search caller.
> >
> > Tnx for the help, and I hope to contribute to the project if I collect
> > some ideas :-)
> >
> > p.s.: How do I translate the messages used in the core components?
> >
> >
> > --
> > "Nobody knows who i really am
> > I never felt this empty before
> > And if I never need someone to come along
> > Who's gonna comfort me and keep me strong?"
> > --
> > Marcell Manfrin Barbacena
> > barbacena@gmail.com
> > MSN Messenger: marcell84bruk@hotmail.com
> > ICQ UIN: 63671762
> > Skype: callto://marcell84bruk
> > +55 (83) 8808-8555 (Oi)
> > +55 (62) 8172-5708 (Tim)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>


-- 
"Nobody knows who i really am
 I never felt this empty before
 And if I never need someone to come along
 Who's gonna comfort me and keep me strong?"
--
Marcell Manfrin Barbacena
barbacena@gmail.com
MSN Messenger: marcell84bruk@hotmail.com
ICQ UIN: 63671762
Skype: callto://marcell84bruk
+55 (83) 8808-8555 (Oi)
+55 (62) 8172-5708 (Tim)

Re: [T5] Form, and lot of questions

Posted by 蝈蝈龙 <el...@gmail.com>.
Answer 2st,
  It seems that you have to implement the translator youself
  Tapestry5.0.4 only support several translators :
double,long,integer,string.
  I just implemented a translator for Date
Answer 3rd,
  Maybe you have to implment it yourself.


2007/5/29, Marcell Manfrin Barbacena <ba...@gmail.com>:
>
> Hi,
>
> I'm starting learning tapestry then please go easy :-)
> I've done all the quick start things and looks good, but now I'm
> trying to get things for my project.
>
> 1st - I need to change the Validate annotation for Hibernate
> Validation. Looking the properties of Form component and doesn't
> appear to be a pluggable way. Do I need to change the default
> TrackerValidation through the IoC container? Will that still work with
> client validation?
>
> 2nd - I haven't see a example of nested objects (e.g. city-state) and
> haven't see a hidden component to embed in the form and do a
> translator. I would like something as:
>
> <t:form>
>   ...
>   <t:label for="stateName"
>   <input t:type="Hidden" t:id="stateId"
> t:translator="IdStateTranslator" t:value="state.id" />
>   <input t:type="TextField" t:id="stateName" t:disabled="true"
> t:value="state.name" />
>   <a img="search.gif" t:type="actionlink" t:id="StateSearch" context="
> state.id">
>   ...
> </t:form>
>
> This translator has to be contributed right?
>
> my page/component would have:
>
> @InjectPage
> private SearchStatePage searchStatePage;
> Object onActionFromStateSearch(Long stateId,  ) {
>   searchStatePage.setup(city.getState());
>   searchStatePage.callback(this);
>   return searchStatePage;
> }
>
> does my city object (with Persist annotation) is going to remain valid
> when the searchStatePage return?
>
> 3rd - Is it possible to add a form with radio buttons as column ? This
> way I could have a search criteria form (on top of the page) that
> would provide a list for the grid (with radio options) that the user
> could select one (a button to submit at the bottom) to return to the
> page search caller.
>
> Tnx for the help, and I hope to contribute to the project if I collect
> some ideas :-)
>
> p.s.: How do I translate the messages used in the core components?
>
>
> --
> "Nobody knows who i really am
> I never felt this empty before
> And if I never need someone to come along
> Who's gonna comfort me and keep me strong?"
> --
> Marcell Manfrin Barbacena
> barbacena@gmail.com
> MSN Messenger: marcell84bruk@hotmail.com
> ICQ UIN: 63671762
> Skype: callto://marcell84bruk
> +55 (83) 8808-8555 (Oi)
> +55 (62) 8172-5708 (Tim)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>