Jul 29, 2008 11:09 PM
Problem with Suggestion Field in portlet subview
I have successfully used the suggestion field in a portlet within liferay in a simple page such as:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://teamdev.com/quipukit" prefix="q" %>
<f:view>
<h:form id="testMerchantSuggestionForm">
<h:commandLink value="Home" action="HOME" style="float: right;" immediate="true" /><br/>
<h:messages id="messages"
layout="table"
infoClass="portlet-msg-success"
style="width: 100%;"
errorClass="portlet-msg-error"
showSummary="false"
showDetail="true"
rendered="#{not empty facesContext.messages}"/>
<h:outputLabel value="Suggestion Field Input:"/>
<q:suggestionField
style="margin:5px;width:180px;height:18px;"
value="#{myBean.myValue}"
required="true"
suggestionMode="custom"
autoComplete="true"
suggestionDelay="200"
suggestionMinChars="3">
<q:dropDownItems value="#{mybean.suggestions}"/>
</q:suggestionField>
<h:commandButton action="HOME" value="Home" />
</h:form>
</f:view>
Buf if I put the suggestion field into a subview, which is included (using jsp:include) on another page of the portlet, then the suggestion field fails to get data, complaining about "Illegal response - couldn't find data start marker." The subview is exactly the same as above, but uses <f:subview id="mysubview"> instead of <f:view> as above. Here is the code for the containing page.
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/portlet/components" prefix="p" %>
<f:view>
<p:portletPage>
<div style="portlet-section-header">
<table style="width:100%;" cellspacing="10" border="5">
<tr>
<td style="width:24%;border-color:#A9A9A9;border-width:2px;border-style:solid;padding:5px;">
<jsp:include page="suggestionChild.jsp"/>
</td>
</tr>
</table>
</div>
</p:portletPage>
</f:view>
I would appreciate any thoughts on getting around this issue. This is all used within a portlet, using jsf 1.2_07, and portlet bridge 1.2.2_0 running on Liferay portal server. quipukit is version 1.4.3.
Thanks in advance,
Joel