On 2/2/07, Givler, Eric <[EMAIL PROTECTED]> wrote:
I have a multi-record display grid and I want the user to be able to click a
button to Edit a record. Since the page also handles Loading the records, and
navigation to two other places, I was using the EventDispatchAction.
I tried mapping: event_edit{?}=Edit, but the Edit method is never invoked. It
appears that the getMethodName in eventActionDispatcher must match a request
parameter exactly. I thought from reading somewhere that Struts allowed
Wildcards in Parameter entries, but I guess this doesn't apply in this case.
Umm, you are right - wildcards are not supported for action events. I
suppose this should be fixed to align event handling with other types
of parameters. In the meantime, could you provide more information
about your page, maybe you don't really need wildcards.
I cannot use Javascript to perform the function of supplying a hidden id# to a
hidden field because the form must work both with or without JS enabled.
If you don't use Javascript, how do you supply id of an item to edit?
Do you have one button for the whole grid, or does each row has a
button? If you use one button, please explain how do you employ one
button without using Javascript, how do you select item to edit.
Without Javascript your task can be easily resolved with one
button/link per row in grid. Links look nicer in grid rows than
buttons ;-) If you use buttons, the simplest way is to define each row
as an HTML form. If you use links, you need to build these links so an
item id is added as parameter.
You may find this sample useful:
https://sourceforge.net/project/showfiles.php?group_id=49385&package_id=154597
Michael.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]