Hi,
I'm also a newbie to the Portal Specification, please check the code given
below.
| public class SearchPortlet extends GenericPortlet {
| private boolean resultsFlag = false;
| public static final String VIEW_RESULT = "/jsp/Results.jsp";
| public static final String VIEW_JSP = "/jsp/SearchView.jsp";
| public void init(PortletConfig portletConfig) throws
UnavailableException, PortletException {
| super.init(portletConfig);
| }
|
| protected void doView(RenderRequest request, RenderResponse
response)throws PortletException, IOException {
| response.setContentType(request.getResponseContentType());
| PortletRequestDispatcher portletRequestDispatcher = null;
| if(resultsFlag) {
| portletRequestDispatcher =
context.getRequestDispatcher(VIEW_RESULT);
| } else {
| portletRequestDispatcher =
context.getRequestDispatcher(VIEW_JSP);
| }
| portletRequestDispatcher.include(request, response);
| }
|
| public void processAction(ActionRequest request, ActionResponse
esponse) throws PortletException, java.io.IOException {
| String keyword=request.getParameter("keyword");
| String category=request.getParameter("category");
| String location=request.getParameter("location");
| SearchBO keyCateLoc=new SearchBO();
| boolean yes=keyCateLoc.searchKCLBo(keyword, category,
location);
| resultsFlag = yes;
| }
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3909277#3909277
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3909277
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user