Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Nishikant sapkal
Constants.EDIT is coming null
11 de agosto de 2010 4:57
Respuesta

Nishikant sapkal

Ranking: Junior Member

Mensajes: 76

Fecha de incorporación: 15 de febrero de 2010

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.
Suhail Ahmed
RE: Constants.EDIT is coming null
11 de agosto de 2010 22:26
Respuesta

Suhail Ahmed

Ranking: Regular Member

Mensajes: 126

Fecha de incorporación: 1 de enero de 2008

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
Nishikant sapkal
RE: Constants.EDIT is coming null
11 de agosto de 2010 22:52
Respuesta

Nishikant sapkal

Ranking: Junior Member

Mensajes: 76

Fecha de incorporación: 15 de febrero de 2010

Mensajes recientes

not really sohail,
that was just a mistake if i would have missed that jsp page would not have compiled.
did it?
Suhail Ahmed
RE: Constants.EDIT is coming null
11 de agosto de 2010 23:01
Respuesta

Suhail Ahmed

Ranking: Regular Member

Mensajes: 126

Fecha de incorporación: 1 de enero de 2008

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