In our TreeListControl, we want to display regions and Federal states. Therefore,
the action class which takes care of the loading and filling of the TreeListControl
must have the nomenclature "RegionBrowseAction". The action class is then derived
from the class FWAction, which encapsulates 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].
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 RegionBrowseAction extends FWAction {
/**
* @see com.cc.framework.adapter.struts.FWAction#doExecute(ActionContext)
*/
public void doExecute(ActionContext ctx)
throws IOException, ServletException {
// In the next chapter, we will instantiate
// our TreeListControls with the DisplayData
}
}
back |
continue to step 3
|