You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Lukasz Kucharski <lk...@gmail.com> on 2005/06/16 00:53:30 UTC
Easy way to create form component.
Hi there.
First I want to say thanks to Kent Tong for helping such a newbe like
me with eariler questions. Thanks!
But again I need someone to correct me if I'm wrong. I'm constanlty
(still without a success) working on this form component which
displays (in TextFields) whole information about eg. Client - adress,
name etc. This component should consist of other components (inner
components) and should be wrapped by a form to submit changes to this
client object.
So far i know that i need to create component that extends
AbstracFormComponent. Here are my questions.
If i need to implement render method how do I render all
contained(inner) components there?
Do I have to set values to inner components before render? My guess is
that they should already be assigned their values?
Do i have to implement any methods to set proper values to my client
object when my component form is submited?
Should I use "form" direction for my client parameter??
Thanks in advance.
--
Pozdrawiam
Lukasz Kucharski
lkucharsNOSPAM@gmail.com
lkucharsNOSPAM@students.depaul.edu
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Easy way to create form component.
Posted by Lukasz Kucharski <lk...@gmail.com>.
Thanks for feedback.
On 6/17/05, Muhariz Jabeer <mu...@gmail.com> wrote:
> Hey Lucas, Kent is correct. I'm a complete newbie too but i was lucky enough
> to stumble upon the correct implementation(after 3 days) of a custom
> component (which is meant ot be submitting data within a form to the server)
> by extending BaseComponent and i also implemented the IFormComponent
> interface. The reason for the latter i cannot remember anymore, i found it
> in some forum. Here are the three files. This is more complex than a
> standard component, its meant ot create a dynamic html table by iterating
> through a collection class. And when it needs to add another row, it simply
> posts the collection class back to the server and requests the server to add
> another row into it which in turn ends up making the component draw one more
> row.
>
--
Pozdrawiam
Lukasz Kucharski
lkucharsNOSPAM@gmail.com
lkucharsNOSPAM@students.depaul.edu
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Easy way to create form component.
Posted by Muhariz Jabeer <mu...@gmail.com>.
Hey Lucas, Kent is correct. I'm a complete newbie too but i was lucky enough
to stumble upon the correct implementation(after 3 days) of a custom
component (which is meant ot be submitting data within a form to the server)
by extending BaseComponent and i also implemented the IFormComponent
interface. The reason for the latter i cannot remember anymore, i found it
in some forum. Here are the three files. This is more complex than a
standard component, its meant ot create a dynamic html table by iterating
through a collection class. And when it needs to add another row, it simply
posts the collection class back to the server and requests the server to add
another row into it which in turn ends up making the component draw one more
row.
I've attached the class file, the JWC file and html template for u to look
at. Mail me if u have more questions.
On 6/15/05, Lukasz Kucharski <lk...@gmail.com> wrote:
>
> Hi there.
>
> First I want to say thanks to Kent Tong for helping such a newbe like
> me with eariler questions. Thanks!
> But again I need someone to correct me if I'm wrong. I'm constanlty
> (still without a success) working on this form component which
> displays (in TextFields) whole information about eg. Client - adress,
> name etc. This component should consist of other components (inner
> components) and should be wrapped by a form to submit changes to this
> client object.
>
> So far i know that i need to create component that extends
> AbstracFormComponent. Here are my questions.
>
> If i need to implement render method how do I render all
> contained(inner) components there?
>
> Do I have to set values to inner components before render? My guess is
> that they should already be assigned their values?
>
> Do i have to implement any methods to set proper values to my client
> object when my component form is submited?
>
> Should I use "form" direction for my client parameter??
>
> Thanks in advance.
> --
> Pozdrawiam
>
> Lukasz Kucharski
> lkucharsNOSPAM@gmail.com
> lkucharsNOSPAM@students.depaul.edu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
In a long enough timeline,
every moment will feel like deja vu.
-Muhariz.
Re: Easy way to create form component.
Posted by Kent Tong <ke...@cpttm.org.mo>.
Lukasz Kucharski <lkuchars <at> gmail.com> writes:
> But again I need someone to correct me if I'm wrong. I'm constanlty
> (still without a success) working on this form component which
> displays (in TextFields) whole information about eg. Client - adress,
> name etc. This component should consist of other components (inner
> components) and should be wrapped by a form to submit changes to this
> client object.
What you want is not really a form component. You want a
regular component. So, I'd suggest that you extend BaseComponent
and set direction to "auto". This will save you all the
troubles.
--
Author of an e-Book for learning Tapestry (http://www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org