Vaibhav Mittal 11 Years Ago Hi Jitendra,The post you have written is a code saver. This is another best use of alloy aui which we can use. Now i do not need to store form elements values in preferences and create another java file in portlet.Thnxx for sharing this information with us.I tried above code and would like to discuss one issue, i think the correct method is below one for getting stored values:preferences.getValue("showFeedTitle",StringPool.BLANK);And i would like to ask, in which cases we should use GetterUtil:GetterUtil.getString(preferences.getValue("showFeedTitle",StringPool.BLANK)); Please sign in to reply. Reply as... Cancel Jitendra Rajput Vaibhav Mittal 11 Years Ago - Edited Thank you vaibhav , I have corrected the article . GetterUtil.getString(preferences.getValue("showFeedTitle",StringPool.BLANK)); i guess this Utils are basically used to avoid null pointer exception and for internal type cast. But if you retrieve preferences like below preferences.getValue("showFeedTitle", StringPool.BLANK);then no need to user GetterUtil because if the value of showFeedTitle title is null it will be loaded with blank value as specified in second argument.Jitendra Rajputhttp://itsliferay.blogspot.in/ Please sign in to reply. Reply as... Cancel Alejandro Santillan Jitendra Rajput 10 Years Ago HI Jitendra, Can you post a complete example for this? I don't undertand very well, for example... <aui:input name="preferences--showFeedTitle--" type="checkbox" value="<%= showFeedTitle %>" />What is de action in this form? I put some like this:<liferay-portlet:actionURL name="mvcPath" portletConfiguration="true" var="mvcPath" ></liferay-portlet:actionURL><aui:form action="<%=mvcPath %>" method="post" name="<portlet:namespace/>"><aui:input name="preferences--showFeedTitle--" type="text" /><input type="submit" value="click me"/></aui:form>but I have an error --> Hola mundo21:02:05,320 ERROR [http-bio-8080-exec-111][PortletServlet:115] javax.portlet.PortletException: processAction method not implementedthis is my actionpublic class HelloWorldPortlet extends GenericPortlet { public void processAction( ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException { System.out.println("-->Hola mundo"); super.processAction(actionRequest, actionResponse); }}thanks, Alex. Please sign in to reply. Reply as... Cancel Jitendra Rajput Alejandro Santillan 10 Years Ago Hi .. For your information i have posted one sample JSP.. https://gist.github.com/jitendra-rajput/11041566Hope this help .!!Jitendra http://itsliferay.blogspot.in/ Please sign in to reply. Reply as... Cancel
Jitendra Rajput Vaibhav Mittal 11 Years Ago - Edited Thank you vaibhav , I have corrected the article . GetterUtil.getString(preferences.getValue("showFeedTitle",StringPool.BLANK)); i guess this Utils are basically used to avoid null pointer exception and for internal type cast. But if you retrieve preferences like below preferences.getValue("showFeedTitle", StringPool.BLANK);then no need to user GetterUtil because if the value of showFeedTitle title is null it will be loaded with blank value as specified in second argument.Jitendra Rajputhttp://itsliferay.blogspot.in/ Please sign in to reply. Reply as... Cancel Alejandro Santillan Jitendra Rajput 10 Years Ago HI Jitendra, Can you post a complete example for this? I don't undertand very well, for example... <aui:input name="preferences--showFeedTitle--" type="checkbox" value="<%= showFeedTitle %>" />What is de action in this form? I put some like this:<liferay-portlet:actionURL name="mvcPath" portletConfiguration="true" var="mvcPath" ></liferay-portlet:actionURL><aui:form action="<%=mvcPath %>" method="post" name="<portlet:namespace/>"><aui:input name="preferences--showFeedTitle--" type="text" /><input type="submit" value="click me"/></aui:form>but I have an error --> Hola mundo21:02:05,320 ERROR [http-bio-8080-exec-111][PortletServlet:115] javax.portlet.PortletException: processAction method not implementedthis is my actionpublic class HelloWorldPortlet extends GenericPortlet { public void processAction( ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException { System.out.println("-->Hola mundo"); super.processAction(actionRequest, actionResponse); }}thanks, Alex. Please sign in to reply. Reply as... Cancel Jitendra Rajput Alejandro Santillan 10 Years Ago Hi .. For your information i have posted one sample JSP.. https://gist.github.com/jitendra-rajput/11041566Hope this help .!!Jitendra http://itsliferay.blogspot.in/ Please sign in to reply. Reply as... Cancel
Alejandro Santillan Jitendra Rajput 10 Years Ago HI Jitendra, Can you post a complete example for this? I don't undertand very well, for example... <aui:input name="preferences--showFeedTitle--" type="checkbox" value="<%= showFeedTitle %>" />What is de action in this form? I put some like this:<liferay-portlet:actionURL name="mvcPath" portletConfiguration="true" var="mvcPath" ></liferay-portlet:actionURL><aui:form action="<%=mvcPath %>" method="post" name="<portlet:namespace/>"><aui:input name="preferences--showFeedTitle--" type="text" /><input type="submit" value="click me"/></aui:form>but I have an error --> Hola mundo21:02:05,320 ERROR [http-bio-8080-exec-111][PortletServlet:115] javax.portlet.PortletException: processAction method not implementedthis is my actionpublic class HelloWorldPortlet extends GenericPortlet { public void processAction( ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException { System.out.println("-->Hola mundo"); super.processAction(actionRequest, actionResponse); }}thanks, Alex. Please sign in to reply. Reply as... Cancel Jitendra Rajput Alejandro Santillan 10 Years Ago Hi .. For your information i have posted one sample JSP.. https://gist.github.com/jitendra-rajput/11041566Hope this help .!!Jitendra http://itsliferay.blogspot.in/ Please sign in to reply. Reply as... Cancel
Jitendra Rajput Alejandro Santillan 10 Years Ago Hi .. For your information i have posted one sample JSP.. https://gist.github.com/jitendra-rajput/11041566Hope this help .!!Jitendra http://itsliferay.blogspot.in/ Please sign in to reply. Reply as... Cancel