Products
About Guided Tour Requirements
Resources
Documents Configuration examples TagLib Reference Useful Links
Customer Support
Updates Contact Services
Sales
Licensing Sales FAQ Buy Online
 
 
 
buy online   |   about us   |   german version  

» 2. Derivation of the Action class for the Struts adapter

In our form, we wish to edit the detail information for a user. Therefore, the action-class which takes care of the filling of our form, should have the nomenclature "UserEditAction". The action class is then derived from the class FWAction, which the Struts-action class encapsulates and extends with functionalities of the presentation framework. Instead of the execute()-method, the doExecute()-method is called. [FWAction is derived from org.apache.struts.action.Action]. On calling, it contains the ActionContext, through which the access to additional objects such as the Request- and Response-object is capsulated.

import java.io.IOException;
import javax.servlet.ServletException;

import com.cc.framework.adapter.struts.FWAction
import com.cc.framework.adapter.struts.ActionContext

public class UserEditAction extends FWAction {

    /**
     * @see com.cc.framework.adapter.struts.FWAction#doExecute(ActionContext)
     */
    public void doExecute(ActionContext ctx)
        throws IOException, ServletException {
        // Code follows in the next chapter
    }
}


back   |   continue to step 3

Impressum | This product includes software developed by the Java Apache Project
Tours
ListControl TreeControl TreeListControl TabSetControl Form Tags MenuControl Print version Configuration