You don't want the component rely on page, but you do (rely on outer form,
right?), so if you want your component handle event independently, set the
form in the component is a must.

btw, onSelect's signature should only be Void type.

DH

2008/10/17 Ville Virtanen <[EMAIL PROTECTED]>

>
> Yep, that's exactly the case.
>
> The component can't rely on any code in the page, so solution number 1 is
> out of the question.
>
> Solution number 2 throws exception:
> Event 'selected' from FinancePlan:dynamicfromcont..... received an event
> handler method return value of
> [EMAIL PROTECTED] This type of event does
> not
> support return values from event handler methods.
>
>  - Ville
>
>
> dhning-2 wrote:
> >
> > From your  former mail, my understanding on your case (correct me if I am
> > wrong): your page has a form, and the form contains your component, and
> > your component template has multiple submit buttons (it must be submit
> > component if you want to handle select event).
> >
> > I think there are two ways:
> > 1. Inside the page java, handle the onAction/onSuccess event. (You can
> not
> > see the onSelect event here)
> > 2. Inside your component java, handle the onSelect event (I am not sure
> > whether it is right, I haven't tried before)
> >
> > Thanks!
> >
> > DH
> > ----- Original Message -----
> > From: "Ville Virtanen" <[EMAIL PROTECTED]>
> > To: <users@tapestry.apache.org>
> > Sent: Friday, October 17, 2008 8:08 PM
> > Subject: Re: [T5] Page naigation using submit
> >
> >
> >>
> >> Yes it must be, otherwise it won't work.
> >>
> >> The submit event that is triggered by the form in the page does not
> >> bubble
> >> to my component and I can't use the selected event triggered by the
> >> button
> >> in my component because that event does not support return type of page
> >> class.
> >>
> >> - Ville
> >>
> >>
> >> dhning-2 wrote:
> >>>
> >>> But your component must be enclosed by an outer form component, right?
> >>> Or
> >>> else, how can you put textfield in your component?
> >>>
> >>> Thanks!
> >>>
> >>> DH
> >>>
> >>>
> >>> ----- Original Message -----
> >>> From: "Ville Virtanen" <[EMAIL PROTECTED]>
> >>> To: <users@tapestry.apache.org>
> >>> Sent: Friday, October 17, 2008 7:01 PM
> >>> Subject: [T5] Page naigation using submit
> >>>
> >>>
> >>>>
> >>>> Hi,
> >>>>
> >>>> This must be discussed before, but I could not find anything using
> >>>> search
> >>>> and I seem to be having total brain freeze here so:
> >>>>
> >>>> I have a case where I have to let user enter rows to a view and there
> >>>> must
> >>>> be an "Edit" function at the end of each of these rows. The edit
> >>>> functionality MUST SUBMIT before redirecting to detail edit as every
> >>>> row
> >>>> in
> >>>> the view are editable, and user may edit the rows, after which
> >>>> she/he/it
> >>>> clicks the edit button to edit the details of a row.
> >>>>
> >>>> So, how can I use submit to redirect to the detail page. As this is a
> >>>> component, I cannot do the normal "onSuccess" redirect, as my
> component
> >>>> does
> >>>> not define form and hence it doesn't receive the on submit event.
> >>>>
> >>>> I think it is pretty standard to have a button to redirect to another
> >>>> page
> >>>> after submit.
> >>>>
> >>>> Am I missing something totally obvious?
> >>>>
> >>>> - Ville
> >>>> --
> >>>> View this message in context:
> >>>>
> http://www.nabble.com/-T5--Page-naigation-using-submit-tp20031177p20031177.html
> >>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>>
> >>>>
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/-T5--Page-naigation-using-submit-tp20031177p20032020.html
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
> --
> View this message in context:
> http://www.nabble.com/-T5--Page-naigation-using-submit-tp20031177p20032647.html
>  Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to