Message Boards

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
filter is not working
Answer
2/4/14 9:12 AM
Hi, 

I tried to create a hello world portlet with expample 1. I add <filter>true</true>  like this, but the filter is not working
 
 1
 2
 3<field>
 4<name>helloDescription</name>
 5<title>hello Description</title>
 6<type>
 7<varchar>
 8<length>80</length><filter>true</filter>
 9</varchar>
10</type>
11<showFieldInView>true</showFieldInView>
12<required>true</required>
13</field>


I'm using liferay 6.2. 

RE: filter is not working
Answer
2/4/14 12:00 PM as a reply to Nhat Chu.
i found a fix for this is to add <portlet:namespace/> in the input name in view.jsp. This is my fix.

<form id="helloFilterForm" name="helloFilterForm" action="<%=helloFilterURL %>" method="POST"><input type="text" name="<portlet:namespace/>helloFilter" value="<%= HtmlUtil.escape(helloFilter) %>" /><input type="submit" value="<liferay-ui:message key="filter" />"></form>

RE: filter is not working
Answer
2/12/14 7:44 AM as a reply to Nhat Chu.
Hi Nhat,

thanks for checking this and your fix proposal.

But current 6.2 version isn't supported by XMLPortletFactory (we are working on this). I guess your issue should be solved by simply adding:
1<requires-namespaced-parameters>false</requires-namespaced-parameters>

to your liferay-portlet.xml.