From: <jm...@us...> - 2005-11-09 03:20:50
|
Update of /cvsroot/struts/dialogs/src/net/jspcontrols/mailreader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29970/src/net/jspcontrols/mailreader Modified Files: HomeAction.java LogonAction.java SubscriptionAction.java Log Message: Index: HomeAction.java =================================================================== RCS file: /cvsroot/struts/dialogs/src/net/jspcontrols/mailreader/HomeAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HomeAction.java 23 Sep 2005 06:37:57 -0000 1.1 --- HomeAction.java 9 Nov 2005 03:20:42 -0000 1.2 *************** *** 18,23 **** import java.util.ArrayList; - import java.util.Map; - import java.util.HashMap; import java.util.Locale; import javax.servlet.http.HttpServletRequest; --- 18,21 ---- *************** *** 33,37 **** import org.apache.commons.logging.LogFactory; import net.jspcontrols.dialogs.actions.DialogAction; ! import net.jspcontrols.dialogs.actions.EventForward; import net.jspcontrols.mailreader.memory.UserDatabase; --- 31,35 ---- import org.apache.commons.logging.LogFactory; import net.jspcontrols.dialogs.actions.DialogAction; ! import net.jspcontrols.dialogs.actions.TransferForward; import net.jspcontrols.mailreader.memory.UserDatabase; *************** *** 86,89 **** --- 84,88 ---- throws Exception { + System.out.println("HomeAction getContextPath [" + request.getContextPath() + "]"); // // Initialize messages and database *************** *** 120,143 **** /** - * <p>Provides mapping from event names (keys) to handler methods (values). - * Each handler method must have the same signature as <code>execute</code>. - * This method is called only once after application started.</p> - * - * @return Map, containing association between event names (keys) and - * handler methods (values). - */ - protected Map getKeyMethodMap() { - Map methodMap = new HashMap(); - // By default, getInitKey() returns "DIALOG-EVENT", the standard - // event prefix for SelectAction and DialogAction - methodMap.put(getInitKey()+"-LOGON", "onLogon"); - methodMap.put(getInitKey()+"-SIGNUP", "onAccountSignup"); - methodMap.put(getInitKey()+"-ACCUPDATE", "onAccountUpdate"); - methodMap.put(getInitKey()+"-LOCALE", "onLocale"); - methodMap.put(getInitKey()+"-SUBSCRIPTIONS", "onSubscriptions"); - return methodMap; - } - - /** * <p>Handles logon event. Forwards to "logon" mapping.</p> */ --- 119,122 ---- *************** *** 232,236 **** // in Struts Dialogs v. 1.23. You need to set up DialogRuleSet // in your web.xml file. ! return EventForward.DIALOG_RELOAD; } } --- 211,215 ---- // in Struts Dialogs v. 1.23. You need to set up DialogRuleSet // in your web.xml file. ! return TransferForward.DIALOG_RELOAD; } } Index: LogonAction.java =================================================================== RCS file: /cvsroot/struts/dialogs/src/net/jspcontrols/mailreader/LogonAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LogonAction.java 23 Sep 2005 06:37:57 -0000 1.1 --- LogonAction.java 9 Nov 2005 03:20:42 -0000 1.2 *************** *** 18,22 **** import net.jspcontrols.dialogs.actions.DialogAction; ! import net.jspcontrols.dialogs.actions.EventForward; import net.jspcontrols.mailreader.business.User; import net.jspcontrols.mailreader.memory.UserDatabase; --- 18,22 ---- import net.jspcontrols.dialogs.actions.DialogAction; ! import net.jspcontrols.dialogs.actions.TransferForward; import net.jspcontrols.mailreader.business.User; import net.jspcontrols.mailreader.memory.UserDatabase; *************** *** 134,138 **** // Show page corresponding to current state of Logon component ! return EventForward.DIALOG_RELOAD; } --- 134,138 ---- // Show page corresponding to current state of Logon component ! return TransferForward.DIALOG_RELOAD; } *************** *** 169,173 **** if (!errors.isEmpty()) { this.saveDialogErrors(request.getSession(), errors); ! return EventForward.DIALOG_RELOAD; // Successfully logged in; navigate to home page --- 169,173 ---- if (!errors.isEmpty()) { this.saveDialogErrors(request.getSession(), errors); ! return TransferForward.DIALOG_RELOAD; // Successfully logged in; navigate to home page Index: SubscriptionAction.java =================================================================== RCS file: /cvsroot/struts/dialogs/src/net/jspcontrols/mailreader/SubscriptionAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SubscriptionAction.java 23 Sep 2005 06:37:57 -0000 1.1 --- SubscriptionAction.java 9 Nov 2005 03:20:42 -0000 1.2 *************** *** 28,34 **** import net.jspcontrols.dialogs.actions.crud.ICRUDForm; import net.jspcontrols.dialogs.actions.crud.CRUDConstants; ! import net.jspcontrols.dialogs.actions.EventForward; ! ! import java.util.Map; /** --- 28,32 ---- import net.jspcontrols.dialogs.actions.crud.ICRUDForm; import net.jspcontrols.dialogs.actions.crud.CRUDConstants; ! import net.jspcontrols.dialogs.actions.TransferForward; /** *************** *** 42,64 **** /** - * <p>Provides mapping from event names (keys) to handler methods (values). - * Each handler method must have the same signature as <code>execute</code>. - * This method is called only once after application started.</p> - * - * @return Map, containing association between event names (keys) and - * handler methods (values). - */ - protected Map getKeyMethodMap() { - Map map = super.getKeyMethodMap(); - // By default, getInitKey() returns "DIALOG-EVENT", the standard - // event prefix for SelectAction and DialogAction - map.put(getInitKey()+"-INIT", "onInit"); - map.put(getInitKey()+"-PREVPAGE", "onPrevPage"); - map.put(getInitKey()+"-NEXTPAGE", "onNextPage"); - map.put(getInitKey()+"-BACKHOME", "onBackHome"); - return map; - } - - /** * <p>Handles init event. Clears messages, switches CRUD state to inactive * and reloads the component.</p> --- 40,43 ---- *************** *** 77,81 **** // Show page corresponding to "Logged Out" state ! return EventForward.DIALOG_RELOAD; } --- 56,60 ---- // Show page corresponding to "Logged Out" state ! return TransferForward.DIALOG_RELOAD; } |