?? featuredpageaction.java
字號:
package netstore.catalog;
import java.util.List;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import netstore.framework.exceptions.BaseException;
import netstore.framework.SessionContainer;
import netstore.framework.NetstoreBaseAction;
import netstore.businessobjects.Item;
import netstore.framework.util.IConstants;
import netstore.service.INetstoreService;
public class FeaturedPageAction extends NetstoreBaseAction {
public ActionForward execute( ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response )
throws Exception {
// Call the netstore service and ask it for an Item
INetstoreService serviceImpl = getNetstoreService();
List featuredItems = serviceImpl.getItems(0,10);
// Store the featured items into request scope
request.setAttribute( IConstants.FEATURED_ITEMS_KEY, featuredItems );
// Return the ActionForward that is defined for the success condition
return mapping.findForward( IConstants.SUCCESS_KEY );
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -