Thanks! That may be what I was looking for! But looking at the JavaDoc
for getForm it says:

"Returns the IForm which contains the component, or null if the
component is not contained by a form, of if the containing Form is not
currently renderring."

Well, my component is not contained in any form. It is expected to be
placed on a page (or another component) which provides a form for it.
So how can I implement this interface not knowing anything about the
form?

-adam

On 2/16/06, Ivano <[EMAIL PROTECTED]> wrote:
> If you write a component which should work inside a form I think you're
> supposed to implement the
>
> org.apache.tapestry.form.IFormComponent interface, which has a getForm()
> ,method.
>
> Bye
>
> Ivano Pagano.
>
> Jesse Kuhnert wrote:
>
> >Not sure if this is in 4.0 officially, but TapestryUtils has a method
> >called:
> >
> >public static IForm getForm(IRequestCycle cycle, IComponent component)
> >
> >Which will return you the current form instance (assuming you are calling
> >this from a form component or any component contained by a form ).
> >
> >On 2/15/06, Adam Zimowski <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Hi,
> >>
> >>Suppose I have a custom component built around a @TextField such that
> >>I can drop this component inside any new @Form and it will magicall
> >>work. From within my @TextField component I know nothing about the
> >>host @Form, but I need to know it's ID at runtime. How can I do this?
> >>
> >>-adam
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to