I like this proposal since it saves me the pain of checking a submit name in a localized website. Reduces my code in things like Bamboo (for message previews) down about 25 lines.
On Tue, 2006-01-31 at 13:42 +0100, Geert Bevin wrote: > Hi Eddy, > > I don't see the use of the new template tag. It doesn't add anything, > since it's actually fully handled by the submission declaration. > > As you noted, this feature addition could be confusing, and when there > are different submission forms on the same element with the same submit > button names, things can get confusing. However, since you do add a > handler specifically that can be worked around with by the user. How > about automating this completely, like this: > > <element implementation="MyElement"> > <submission name="editUser"> > <bean classname="UserBean"/> > <submit name="save" default="true"/> > <submit name="delete"/> > </submission> > </element> > > When the save submit button is pressed, RIFE will look for this method > if it exists: > doEditUserSave > > In case of the delete button, it will be: > doEditUserDelete > > If the submission is sent without any of the submit parameter names, > RIFE will auto-add the "save" parameter, causing doEditUserSave to be > called. > > What do you think of that idea? > > Best regards, > > Geert > > Eddy Young wrote: > > Hi, > > > > There is no easy way to identify which submit button in a form with > > several was pressed when processing a submission. I proposed on IRC the > > idea of having a new tag, say, SUBMISSION:SUBMIT:mybutton, that would be > > recognised as a submit and would be autolinked to a method in the element. > > > > The link will need to be defined in the the element declaration. > > > > Say, > > > > <element implementation="MyElement"> > > <submission name="editUser"> > > <bean classname="UserBean"/> > > <submit name="mybutton" handler="handleMyButton"/> > > </submission> > > > > </element> > > > > > > "handleMyButton" will be a method of "MyElement" that will automatically > > be called when "mybutton" is pressed. > > > > Off the top of my mind, what I think weighs against implementing this > > is, there will be different ways to process form (by submission and by > > submit button), which could be confusing to developers. For example, if > > the above form is submitted, which method will be called? doEditUser or > > handleMyButton? > > > > What do you think of the proposal? > > > > Eddy > > _______________________________________________ > > Rife-users mailing list > > Rife-users@uwyn.com > > http://lists.uwyn.com/mailman/listinfo/rife-users > > > -- JR Boyens [EMAIL PROTECTED] _______________________________________________ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users