Products
About Guided Tour Online Demo Trial Version Requirements
Resources
Documents Configuration examples TagLib Reference Useful Links
Customer Support
Updates Forums 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 example, we want to generate a TabSet that includes three tabs via JSP-pages. The TabSetControl is supposed to work without server round-trips. This option is available where the data to be presented cannot be completely made available at any time and, as in our case, hang together logically. In the case of complex screens with heterogeneous information contents, on the other hand, it is mostly more convenient to load to the corresponding tab only when there is a change.

For us, the determining of the display data is taken care of by the action class "UserProfileEditAction". It is derived from the class FWAction, which capsulates the Struts-action class 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 UserProfileEditAction extends FWAction {

    /**
     * @see com.cc.framework.adapter.struts.FWAction#doExecute(ActionContext)
     */
    public void doExecute(ActionContext ctx)
        throws IOException, ServletException {
        // see 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 Live Demo Configuration