Foros de discusión
Creating a popup with actionURL instead of renderURL
Jens Richter, modificado hace 11 años.
Creating a popup with actionURL instead of renderURL
New Member Mensajes: 2 Fecha de incorporación: 16/11/12 Mensajes recientes
Hi,
I'am pretty new to Liferay and I have a problem with creating a popup in xmlportletfactory generated code.
My Goal:
I want to klick on a edit-button and open a popup where I can change some (at the moment only one) value(s) and save it.
Status:
I can open a popup but within the popup window the whole page (liferay portal) is displayed instead of only the desired edit-site (see attachment). This seems to be caused by the use of actionURL. When I'am usind renderURL it works but I'am not able to transfer the needed data.
Piece of code (action site):
And here is the code from the "edit" site:
So folks can anybody help me or can give me a suggestion how I can "work arround" this problem :-) ?
I'am pretty new to Liferay and I have a problem with creating a popup in xmlportletfactory generated code.
My Goal:
I want to klick on a edit-button and open a popup where I can change some (at the moment only one) value(s) and save it.
Status:
I can open a popup but within the popup window the whole page (liferay portal) is displayed instead of only the desired edit-site (see attachment). This seems to be caused by the use of actionURL. When I'am usind renderURL it works but I'am not able to transfer the needed data.
Piece of code (action site):
<portlet:actionurl name="editProjects" var="editProjectsURL" windowstate="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
<portlet:param name="resourcePrimKey" value="<%=primKey %>" />
<portlet:param name="projectId" value="<%= projectIdStr %>" />
</portlet:actionurl>
<%
String popup = "javascript:popup('"+ editProjectsURL.toString()+"');";
%>
<liferay-ui:icon image="edit" url="<%= popup %>" />
..... and so on
<aui:script>
Liferay.provide(
window,
.........and so on
</aui:script>
And here is the code from the "edit" site:
<%@include file="../init.jsp" %>
<jsp:usebean class="java.lang.String" id="editProjectsURL" scope="request" />
<jsp:usebean id="projects" type="org.xmlportletfactory.xmlpf.fifthgoaliphdatabase.model.Projects" scope="request" />
<portlet:defineobjects />
<portlet:renderurl var="redirect"></portlet:renderurl>
<liferay-ui:success key="projects-added-successfully" message="projects-added-successfully" />
<aui:form name="addProjects" action="<%=editProjectsURL %>" method="post">
<aui:input type="hidden" name="resourcePrimKey" value="<%=projects.getPrimaryKey() %>" />
<aui:model-context bean="<%= projects %>" model="<%= Projects.class %>" />
<aui:fieldset>
<% String requiredLabel=""; %>
<% requiredLabel ="*"; %>
<aui:input name="projectName" disabled="false" label="<%= LanguageUtil.get(pageContext, "projects-projectname") + requiredLabel %>" />
<% requiredLabel =""; %>
<liferay-ui:error key="projects-projectname-required" message="projects-projectname-required" />
<!-- </table> -->
<aui:button-row>
<% String publishButtonLabel = "submit"; %>
<aui:button type="submit" value="<%=publishButtonLabel %>" />
<aui:button onClick="<%= redirect %>" type="cancel" />
</aui:button-row>
</aui:fieldset>
</aui:form>
So folks can anybody help me or can give me a suggestion how I can "work arround" this problem :-) ?
Archivos adjuntos:
Danial Mustofa Habibi, modificado hace 11 años.
RE: Creating a popup with actionURL instead of renderURL
Regular Member Mensajes: 141 Fecha de incorporación: 1/11/11 Mensajes recientes
Hi There Hope This can Help You...
It's Show Pop Up about Train Schedule
Regards
Danz
It's Show Pop Up about Train Schedule
Regards
Danz
Archivos adjuntos:
Jens Richter, modificado hace 11 años.
RE: Creating a popup with actionURL instead of renderURL
New Member Mensajes: 2 Fecha de incorporación: 16/11/12 Mensajes recientes
Thank you!
I will try it and will tell you if it worked out :-)
It's not working :-(
I will try it and will tell you if it worked out :-)
It's not working :-(
Danial Mustofa Habibi, modificado hace 11 años.
RE: Creating a popup with actionURL instead of renderURL
Regular Member Mensajes: 141 Fecha de incorporación: 1/11/11 Mensajes recientesJens Richter:
Thank you!
I will try it and will tell you if it worked out :-)
It's not working :-(
Why?Can u send me the error??Is it database???
If Yes,,,I'm Attaching My Sql
Archivos adjuntos: