liferay - Access values displayed in Search Container in another jsp -
i have jsp display data of people employees. data of each employee displayed row. have made each row link when user clicks on row gives details of particular employee, user directed jsp displays same data of employee further processing done.
my question how should pass data of employee when user clicks on row contains particular employee information?
what have right done this:
<portlet:renderurl var="viewpendingleaveapplicationsurl"/> <liferay-ui:search-container delta="20" emptyresultsmessage="no results found"> <liferay-ui:search-container-results total="<%= pendingapprovals .size() %>" results="<%= listutil.sublist(pendingapprovals , searchcontainer.getstart(), searchcontainer.getend()) %>" /> <liferay-ui:search-container-row keyproperty = "empid" modelvar="search" classname="com.corpserver.mallyas.mis.portal.model.leaveapplication"> <portlet:renderurl var="leaveapplicationurl"> <portlet:param name="jsppage" value="/admin/addcompany.jsp" /> <portlet:param name="search" value='<%string.valueof(search.getempid());%>'/> </portlet:renderurl> <liferay-ui:search-container-column-text name='leave duration' value='<%=string.valueof(search.getleaveduration())%>' href="<%= leaveapplicationurl.tostring()%>" /> <liferay-ui:search-container-column-text name="from" value='<%=string.valueof(search.getleavefromdate())%>' href="<%= leaveapplicationurl.tostring()%>"/> <liferay-ui:search-container-column-text name="to" value='<%=string.valueof(search.getleavetodate())%>' href="<%= leaveapplicationurl.tostring()%>"/> <liferay-ui:search-container-column-text name="reason" value='<%=string.valueof(search.getleavereason())%>' href="<%= leaveapplicationurl.tostring()%>"/> <liferay-ui:search-container-column-text name="remarks" value='<%=string.valueof(search.getleaveremarks())%>' href="<%= leaveapplicationurl.tostring()%>"/> </liferay-ui:search-container-row> <liferay-ui:search-iterator/> </liferay-ui:search-container> in above code trying pass empid of row user selects. nothing gets displayed in second jsp. want pass of information on second jsp.
well see small problem in code, problem in way url generated:
<portlet:renderurl var="leaveapplicationurl"> <portlet:param name="jsppage" value="/admin/addcompany.jsp" /> <portlet:param name="search" value='<%string.valueof(search.getempid());%>'/> </portlet:renderurl> this line:
<portlet:param name="search" value='<%string.valueof(search.getempid());%>'/> should be:
<portlet:param name="search" value='<%= string.valueof(search.getempid()) %>'/> did notice this: <%=string.valueof(search.getempid())%>, starting added <%= , trailing ; removed.
so in short need jsp expression instead of scriptlet code block in value attribute.
Comments
Post a Comment