On May 4, 2006, at 11:27 AM, Adam Hardy wrote: > In the last couple of days someone said that they separated the two > flows using GET and POST - or at least I thought so. > > It sounded interesting but on looking at the struts-config DTD, > there seems no way to do this. > > I can't find the thread in the archive now. Did I misread that > previous posting?
I am doing this in Struts Dialogs 1.x [1]. Here is, for example, the snippet from the config file of one of the active users of Struts Dialogs (he uses Tiles as well): <component path = "/userCenter" type = "com.acme.action.UserCenterAction" form = "userCenterForm" view = "page.userCenter"> <event name = "DIALOG-EVENT-CHANGE" handler = "onUpdate"/> <event name = "DIALOG-EVENT-DELETE" handler = "onDelete"/> <event name = "DIALOG-EVENT-SHOW-ORDERS" handler = "onShowOrders"/> <event name = "DIALOG-EVENT-SHOW-PRICE-LIST" handler = "onShowPriceList"/> <event name = "DIALOG-EVENT-SHOW-ORDER-DETAILS" handler = "onShowOrderDetails"/> <transfer name = "SHOW-ORDERS" path = "/showOrders.do"/> <transfer name = "SHOW-PRICE-LIST" path = "/showPriceList.do"/> <transfer name = "SHOW-ORDER-DETAILS" path = "/showOrderDetails.do"/> <render name = "ON-CC-DIALOG" path = "page.CCDialog"/> <render name = "ON-GET-DELIVERY-CONFIRMATION" path = "/jsp/deliveryConfirmation.jsp"/> </component> If event is found, method handler is called. If POST and event is not found, execute() is called. If GET and event is not found, the location in the "view" attribute is called. <event> element selects method handler for an event. <transfer> is basically <forward ... redirect="true">, used to transfer control to another webresource. <render> is basically <forward ... redirect="false">, used to render a page. At present point, I am not sure that differentiating by POST/GET is the best, because it does not allow to sent event via link. EventActionDispatcher in Struts 1.2.9 does not differentiate by POST/GET. On 5/4/06, James Mitchell <[EMAIL PROTECTED]> wrote:
I don't think that would be the best solution (but that's just my 2c) -- I would opt for the declarative approach, with wildcards for "verbosely declarative simplicity" -- now there's an oxymoron for ya :)
Is the mapping above decrarative enough for ya? ;-) [1] http://struts.sourceforge.net/strutsdialogs/index.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]