[Opensource] Concept of a Default Button?
larry hamel
expresso at codeguild.com
Wed Apr 16 11:11:43 PDT 2003
consider solving this particular issue (using the entry key) by using a fully qualified URL within the form. In other words, if the default button transition is to state "someState", then the URL in the form would be something like
http://myserver/myController.do?state=someState
in this way, there is no need for JavaScript because the entry key will submit to the correct state. If there are any parameters in the default button, just include them on the URL.
this scheme would work even if alternative buttons within the form directed to a different controller and state, because the parameters would override anything in the form's URL.
What do you think? anyway, it works for us.
Larry
At 03:15 AM 4/16/2003, you wrote:
>Hey All,
>
>As some of you know, Expresso figures out which button was pressed on a form based upon the button name, and then gets the appropriate state information from a hidden parameter named <button name>_param
>
>The problem on most of these forms is if the user hits enter on the form, the form is submitted but officially no 'button_name=' parameter gets sent since technically a button wasn't pressed. The problem is that this causes all sorts of interesting issues because the system then assumes initial state for the controller and sends you there. [Usually, you're back to the prompt state]
>
>So! Any folks have any naming conventions, etc to specify default buttons? Perhaps in the Transitions in a Response have a default='y' attribute set for the Transition you want default?
>
>Thoughts?
> -Mike
>
>
>
>_______________________________________________
>Opensource mailing list
>Opensource at jcorporate.com
>http://mail.jcorporate.com/mailman/listinfo/opensource
>Archives: http://mail.jcorporate.com/pipermail/opensource/
More information about the Opensource
mailing list