Foren

Creating a popup with actionURL instead of renderURL

Jens Richter, geändert vor 11 Jahren.

Creating a popup with actionURL instead of renderURL

New Member Beiträge: 2 Beitrittsdatum: 16.11.12 Neueste Beiträge
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):

	<portlet:actionurl name="editProjects" var="editProjectsURL" windowstate="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
			<portlet:param name="resourcePrimKey" value="<%=primKey %>" />
			<portlet:param name="projectId" value="<%= projectIdStr %>" />
		</portlet:actionurl>
		
		&lt;%
		String popup = "javascript:popup('"+ editProjectsURL.toString()+"');";
		%&gt;

		<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:

&lt;%@include file="../init.jsp" %&gt;

<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>


&lt;% String requiredLabel=""; %&gt;


	&lt;% requiredLabel ="*"; %&gt;
			<aui:input name="projectName" disabled="false" label="<%= LanguageUtil.get(pageContext, &quot;projects-projectname&quot;) + requiredLabel %>" />

&lt;% requiredLabel =""; %&gt;


				<liferay-ui:error key="projects-projectname-required" message="projects-projectname-required" />

	<!-- </table> -->

	<aui:button-row>
&lt;% String publishButtonLabel = "submit"; %&gt;

		<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 :-) ?
thumbnail
Danial Mustofa Habibi, geändert vor 11 Jahren.

RE: Creating a popup with actionURL instead of renderURL

Regular Member Beiträge: 141 Beitrittsdatum: 01.11.11 Neueste Beiträge
Hi There Hope This can Help You...

It's Show Pop Up about Train Schedule


Regards

Danz
Jens Richter, geändert vor 11 Jahren.

RE: Creating a popup with actionURL instead of renderURL

New Member Beiträge: 2 Beitrittsdatum: 16.11.12 Neueste Beiträge
Thank you!
I will try it and will tell you if it worked out :-)

It's not working :-(
thumbnail
Danial Mustofa Habibi, geändert vor 11 Jahren.

RE: Creating a popup with actionURL instead of renderURL

Regular Member Beiträge: 141 Beitrittsdatum: 01.11.11 Neueste Beiträge
Jens 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