留言板
search container on popop page
hello
Now i have requirement to display the users on popup so i am using search container and displaying now when i click the next button the popup will close
is there any way to that if we click on next button on search container then it displays next records on popup
plz reply
Thanks in advance
Anil singh gurjar
Now i have requirement to display the users on popup so i am using search container and displaying now when i click the next button the popup will close
is there any way to that if we click on next button on search container then it displays next records on popup
plz reply
Thanks in advance
Anil singh gurjar
Anil singh Gurjar,修改在11 年前。
RE: search container on popop page
New Member 帖子: 18 加入日期: 11-10-31 最近的帖子
its solved
Can you explained us how to solved this problem?
Thanks.
Thanks.
Anil singh Gurjar,修改在11 年前。
RE: search container on popop page
New Member 帖子: 18 加入日期: 11-10-31 最近的帖子
Yes i can sharing my pages on which i have use popop and search container
it s my view page on which i have given link to popup
<portlet:renderURL var="viewReportURL" windowState="<%=LiferayWindowState.EXCLUSIVE.toString()%>">
<portlet:param name="jspPage" value="/html/user-lookup/recordDisplay.jsp" />
</portlet:renderURL>
<aui:script >
function callPopup(username,firstname,lastname,birthdate,email){
AUI().ready('aui-dialog', function(A) {
var dialog = new A.Dialog({
title: '<liferay-ui:message key="select-a-patient-record" />',
resizable: false,
draggable: false,
centered: true,
modal: true,
width: 800,
height:500,
}).plug(A.Plugin.IO, {uri: '<%=viewReportURL.toString() %>'+'&username=' + username+'&firstname=' + firstname+'&lastname=' + lastname+'&birthdate=' + birthdate+'&email=' + email}).render();
});
}
And its my popup page on which i am using search container
PortletURL renderURL = renderResponse.createRenderURL();
renderURL.setWindowState(LiferayWindowState.NORMAL);
renderURL.setParameter("jspPage","/html/user-lookup/recordDisplay.jsp");
renderURL.setParameter("username",username);
renderURL.setParameter("firstname",firstname);
renderURL.setParameter("lastname",lastname);
renderURL.setParameter("birthdate",birthdate);
renderURL.setParameter("email",email);
%>
<liferay-ui:search-container delta="5" iteratorURL="<%= renderURL %>" emptyResultsMessage="empty-users" orderByCol="<%= orderByCol %>" orderByType="<%= orderByType %>" >
<liferay-ui:search-container-results>
<%
OrderByComparator orderByComparator = UserLookupUtil.getUserOrderByComparator(orderByCol, orderByType);
results=ListUtil.subList(list3,searchContainer.getStart(),searchContainer.getEnd());
Collections.sort(results, orderByComparator);
total = list3.size();
pageContext.setAttribute("results", results);
pageContext.setAttribute("total", total);
%>
</liferay-ui:search-container-results>
<div class="taglib-search-iterator-page-iterator-bottom" id="<portlet:namespace />searchUsers">
<liferay-ui:search-container-row className="com.liferay.portal.model.User" modelVar="user" keyProperty="userId" >
<%
VigUser vigUser = VigUserLocalServiceUtil.findByAppUserId(user.getUserId());
String userInfo= user.getUserId()+"/"+vigUser.getVigUserId()+"/"+user.getFirstName()+"/"+user.getMiddleName()+"/"+user.getLastName();
%>
<liferay-ui:search-container-column-text name=" "><aui:input name="userIdValue" label="" value="<%=userInfo %>" type="radio" /></liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Last Name" property="lastName" orderable="<%=true %>" orderableProperty="Last Name" />
<liferay-ui:search-container-column-text name="First Name" property="firstName" orderable="<%=true %>" orderableProperty="First Name"/>
<liferay-ui:search-container-column-text name="Birth Date" value="<%=dmy.format(user.getBirthday())%>" orderable="<%=true %>" orderableProperty="Birth Date"/>
<liferay-ui:search-container-column-text name="User Name" property="screenName" orderable="<%=true %>" orderableProperty="User Name"/>
<liferay-ui:search-container-column-text name="Email" property="emailAddress" orderable="<%=true %>" orderableProperty="Email"/>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" paginate="<%= false %>" />
<c:if test="<%= results.size() > 0 %>">
<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" type="article" />
</c:if>
</div>
</liferay-ui:search-container>
</aui:form>
<aui:script use="aui-io-plugin">
var searchUsers = A.one('#<portlet:namespace />searchUsers');
if (searchUsers) {
var parent = searchUsers.get('parentNode');
console.log(parent);
parent.plug(
A.Plugin.IO,
{
autoLoad: false
}
);
searchUsers.all('a').on(
'click',
function(event) {
var uri = event.currentTarget.get('href').replace(/p_p_state=normal/i, 'p_p_state=exclusive');
parent.io.set('uri', uri);
parent.io.start();
event.preventDefault();
}
);
}
</aui:script>
it s my view page on which i have given link to popup
<portlet:renderURL var="viewReportURL" windowState="<%=LiferayWindowState.EXCLUSIVE.toString()%>">
<portlet:param name="jspPage" value="/html/user-lookup/recordDisplay.jsp" />
</portlet:renderURL>
<aui:script >
function callPopup(username,firstname,lastname,birthdate,email){
AUI().ready('aui-dialog', function(A) {
var dialog = new A.Dialog({
title: '<liferay-ui:message key="select-a-patient-record" />',
resizable: false,
draggable: false,
centered: true,
modal: true,
width: 800,
height:500,
}).plug(A.Plugin.IO, {uri: '<%=viewReportURL.toString() %>'+'&username=' + username+'&firstname=' + firstname+'&lastname=' + lastname+'&birthdate=' + birthdate+'&email=' + email}).render();
});
}
And its my popup page on which i am using search container
PortletURL renderURL = renderResponse.createRenderURL();
renderURL.setWindowState(LiferayWindowState.NORMAL);
renderURL.setParameter("jspPage","/html/user-lookup/recordDisplay.jsp");
renderURL.setParameter("username",username);
renderURL.setParameter("firstname",firstname);
renderURL.setParameter("lastname",lastname);
renderURL.setParameter("birthdate",birthdate);
renderURL.setParameter("email",email);
%>
<liferay-ui:search-container delta="5" iteratorURL="<%= renderURL %>" emptyResultsMessage="empty-users" orderByCol="<%= orderByCol %>" orderByType="<%= orderByType %>" >
<liferay-ui:search-container-results>
<%
OrderByComparator orderByComparator = UserLookupUtil.getUserOrderByComparator(orderByCol, orderByType);
results=ListUtil.subList(list3,searchContainer.getStart(),searchContainer.getEnd());
Collections.sort(results, orderByComparator);
total = list3.size();
pageContext.setAttribute("results", results);
pageContext.setAttribute("total", total);
%>
</liferay-ui:search-container-results>
<div class="taglib-search-iterator-page-iterator-bottom" id="<portlet:namespace />searchUsers">
<liferay-ui:search-container-row className="com.liferay.portal.model.User" modelVar="user" keyProperty="userId" >
<%
VigUser vigUser = VigUserLocalServiceUtil.findByAppUserId(user.getUserId());
String userInfo= user.getUserId()+"/"+vigUser.getVigUserId()+"/"+user.getFirstName()+"/"+user.getMiddleName()+"/"+user.getLastName();
%>
<liferay-ui:search-container-column-text name=" "><aui:input name="userIdValue" label="" value="<%=userInfo %>" type="radio" /></liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Last Name" property="lastName" orderable="<%=true %>" orderableProperty="Last Name" />
<liferay-ui:search-container-column-text name="First Name" property="firstName" orderable="<%=true %>" orderableProperty="First Name"/>
<liferay-ui:search-container-column-text name="Birth Date" value="<%=dmy.format(user.getBirthday())%>" orderable="<%=true %>" orderableProperty="Birth Date"/>
<liferay-ui:search-container-column-text name="User Name" property="screenName" orderable="<%=true %>" orderableProperty="User Name"/>
<liferay-ui:search-container-column-text name="Email" property="emailAddress" orderable="<%=true %>" orderableProperty="Email"/>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator searchContainer="<%= searchContainer %>" paginate="<%= false %>" />
<c:if test="<%= results.size() > 0 %>">
<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" type="article" />
</c:if>
</div>
</liferay-ui:search-container>
</aui:form>
<aui:script use="aui-io-plugin">
var searchUsers = A.one('#<portlet:namespace />searchUsers');
if (searchUsers) {
var parent = searchUsers.get('parentNode');
console.log(parent);
parent.plug(
A.Plugin.IO,
{
autoLoad: false
}
);
searchUsers.all('a').on(
'click',
function(event) {
var uri = event.currentTarget.get('href').replace(/p_p_state=normal/i, 'p_p_state=exclusive');
parent.io.set('uri', uri);
parent.io.start();
event.preventDefault();
}
);
}
</aui:script>