Foros de discusión

Pass selected row table data to another jsp

thumbnail
Madhura Shetty, modificado hace 9 años.

Pass selected row table data to another jsp

Junior Member Mensajes: 80 Fecha de incorporación: 7/11/13 Mensajes recientes
Pass selected row table data to another jsp

Archivos adjuntos:

thumbnail
Mayur Patel, modificado hace 9 años.

RE: Pass selected row table data to another jsp

Expert Mensajes: 358 Fecha de incorporación: 17/11/10 Mensajes recientes
Hi Madhura,

Instead of passing whole content you can just pass recordId and you can fetch whole content from that recordId in next jsp.

Thanks.
thumbnail
Madhura Shetty, modificado hace 9 años.

RE: Pass selected row table data to another jsp

Junior Member Mensajes: 80 Fecha de incorporación: 7/11/13 Mensajes recientes
Sry emoticon how to pass it I did not understand
thumbnail
Jitender Dhiman, modificado hace 9 años.

RE: Pass selected row table data to another jsp

Junior Member Mensajes: 29 Fecha de incorporación: 21/09/12 Mensajes recientes
DB table data ??
thumbnail
Mayur Patel, modificado hace 9 años.

RE: Pass selected row table data to another jsp

Expert Mensajes: 358 Fecha de incorporación: 17/11/10 Mensajes recientes
You can just pass selected rowId as parameter like,

<portlet:param name="rowId" value="1000"/>

In next jsp, you can get the same rowId and you can call service to get data from that rowId.

It is not advisable to pass table data as parameter in URL.
thumbnail
Madhura Shetty, modificado hace 9 años.

RE: Pass selected row table data to another jsp

Junior Member Mensajes: 80 Fecha de incorporación: 7/11/13 Mensajes recientes
but how to pass the row id dynamically I dont want it to be statisc


i am taking data from the database and i am displaying in table like this

while(iteratorQM.hasNext()){ %>
<tr ><%FAQRaiseQM element = (FAQRaiseQM) iteratorQM.next();%>
<td> <%out.println(element.getRaiseQueryMasterID());%> </td>
<td><% out.println(element.getQueryReferenceNumber());%> </td>
<td><% out.println(element.getQuerydata());%></td>
<td ><% out.println(element.getRaiseQueryMasterID());%>
<button id="QRN_Btn" onclick="var organizationWindow =
window.open('<portlet:renderURL windowState="<%= LiferayWindowState.POP_UP.toString() %>" >
<portlet:param name="jspPage" value="/html/popup1/edit.jsp"/>
<portlet:param name="redirect" value="#"/>
<portlet:param name="t_data" value="2001" />
</portlet:renderURL>','title','directories=no, height=340,
location=no, menubar=no, resizable=yes,scrollbars=yes, status=no, toolbar=no, width=680');
organizationWindow.focus();">
</button>
</td>
<td><%out.println(element.getCreateDate());%></td>
</tr>
<%
}
%>
</table>
thumbnail
Mayur Patel, modificado hace 9 años.

RE: Pass selected row table data to another jsp

Expert Mensajes: 358 Fecha de incorporación: 17/11/10 Mensajes recientes
try this,

<portlet:param name="t_data" value="<%=element.getRaiseQueryMasterID()%>" /> // here you can have primary key(rowId) as value
thumbnail
Madhura Shetty, modificado hace 9 años.

RE: Pass selected row table data to another jsp

Junior Member Mensajes: 80 Fecha de incorporación: 7/11/13 Mensajes recientes
I tried this before but i am getting error because the element will nto contain any thing once the page is loaded completely . Only at the loading time it iterated the data and displays
thumbnail
Mayur Patel, modificado hace 9 años.

RE: Pass selected row table data to another jsp

Expert Mensajes: 358 Fecha de incorporación: 17/11/10 Mensajes recientes
During the iteration it should store value in param and it will be available when you open the dialog.
thumbnail
Madhura Shetty, modificado hace 9 años.

RE: Pass selected row table data to another jsp

Junior Member Mensajes: 80 Fecha de incorporación: 7/11/13 Mensajes recientes
Thank you !!!!!!!!!!!!!!!!!!!!!!!!!!!! very much it worked . emoticon emoticon emoticon
thumbnail
Mayur Patel, modificado hace 9 años.

RE: Pass selected row table data to another jsp

Expert Mensajes: 358 Fecha de incorporación: 17/11/10 Mensajes recientes
Cool !! Good to hear that emoticon
riddhi Vakharia, modificado hace 9 años.

RE: Pass selected row table data to another jsp

New Member Mensaje: 1 Fecha de incorporación: 8/10/14 Mensajes recientes
I want to pass dynamic parameter with form submit than how it will work?
i have to first define portletactionurl than....my code is like.....




<aui:form action="<%= sendPageResponseURL %>" method="post" name="formaui" id="formaui">




<table class="ah-table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Value</th>
</tr>
</thead>
<tbody>

<c:forEach items="${result}" var="lexpressionTermDTO">
<tr>
<c:if test="${lexpressionTermDTO.type=='Expression'}">
<%-- <td><a href="${sendPageResponseURL}" >${lexpressionTermDTO.name}</a></td> --%>

<portlet:actionURL var="sendPageResponseURL">
<portlet:param name="<%= ActionRequest.ACTION_NAME %>" value="ProcessExpr"></portlet:param>
<portlet:param name="<%= CoreHarnessUtil.TAB1 %>" value="<%= CoreHarnessUtil.EXPR_TAB %>"></portlet:param>
<portlet:param value='${lineagevalue}' name="exprServiceLineage"/>
<portlet:param value='${lineagevalue}' name="exprOtherLineage"/>
<portlet:param name="exprName" value='${lexpressionTermDTO.name}' />
<portlet:param name="isExpandable" value='false'/>
<portlet:param value='${isEvaluateExpressionTerm}' name="evaluateExprTerms" />
<portlet:param value='false' name="innerExprName" />
</portlet:actionURL>

<td><a href="${sendPageResponseURL}" >${lexpressionTermDTO.name}</a></td>
</c:if>
<c:if test="${lexpressionTermDTO.type!='Expression'}">
<td>${lexpressionTermDTO.name}</td>
</c:if>
<td>${lexpressionTermDTO.type}</td>
<td>${lexpressionTermDTO.value}</td>
</tr>
</c:forEach>

</tbody>
</table>
</aui:form>


i would like to get this exprName value on next page.