Foros de discusión

Constants.EDIT is coming null

thumbnail
Nishikant sapkal, modificado hace 13 años.

Constants.EDIT is coming null

Junior Member Mensajes: 80 Fecha de incorporación: 16/02/10 Mensajes recientes
Hi,
i have developed an custom portlet and added some action such as Add delete and edit the content now my delete and add action is working fine but edit action is not working after debugging i found that Constants.EDIT is returning null can anybody suggest where i am going wrong..
my action.jspf is as..

<liferay-ui:icon-menu>
<portlet:renderURL windowState="<%=WindowState.MAXIMIZED.toString() %>" var="editEntryURL">
<portlet:param name="struts_action" value="/ext/library/view" />
<portlet:param name="<%= Constants.CMD %>" value="<%Constants.EDIT %>" />
<portlet:param name="bookId" value="<%= String.valueOf(book.getBookId()) %>" />
<portlet:param name="redirect" value="<%= currentURL %>" />
</portlet:renderURL>
<liferay-ui:icon image="edit" message="edit" url="<%= editEntryURL %>" />

<portlet:actionURL var="deleteEntryURL">
<portlet:param name="struts_action" value="/ext/portal/view_user" />
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.DELETE %>" />
<portlet:param name="bookId" value="<%= String.valueOf(book.getBookId()) %>" />
<portlet:param name="redirect" value="<%= currentURL %>" />
</portlet:actionURL>

<liferay-ui:icon-delete url="<%= deleteEntryURL %>" />
</liferay-ui:icon-menu>
Note: in my action class i am calling both actions in processAction() method though delete and edit are defined in portlet:actionUrl and portlet:renderURL respectively. is this the right way please help me.
thumbnail
Suhail Ahmed, modificado hace 13 años.

RE: Constants.EDIT is coming null

Regular Member Mensajes: 126 Fecha de incorporación: 2/01/08 Mensajes recientes
Hi Nishikant,


its a simple, you missed
=
in that scriptlet
keep it
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.EDIT %>" />





Thanks

Suhail Ahmed
thumbnail
Nishikant sapkal, modificado hace 13 años.

RE: Constants.EDIT is coming null

Junior Member Mensajes: 80 Fecha de incorporación: 16/02/10 Mensajes recientes
not really sohail,
that was just a mistake if i would have missed that jsp page would not have compiled.
did it?
thumbnail
Suhail Ahmed, modificado hace 13 años.

RE: Constants.EDIT is coming null

Regular Member Mensajes: 126 Fecha de incorporación: 2/01/08 Mensajes recientes
I didn't got you,
but if you have your both function in processAction then you u need call from actionURL its a must.




Thanks

Suhail Ahmed