掲示板

Creating a popup with actionURL instead of renderURL

11年前 に Jens Richter によって更新されました。

Creating a popup with actionURL instead of renderURL

New Member 投稿: 2 参加年月日: 12/11/16 最新の投稿
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
11年前 に Danial Mustofa Habibi によって更新されました。

RE: Creating a popup with actionURL instead of renderURL

Regular Member 投稿: 141 参加年月日: 11/11/01 最新の投稿
Hi There Hope This can Help You...

It's Show Pop Up about Train Schedule


Regards

Danz
11年前 に Jens Richter によって更新されました。

RE: Creating a popup with actionURL instead of renderURL

New Member 投稿: 2 参加年月日: 12/11/16 最新の投稿
Thank you!
I will try it and will tell you if it worked out :-)

It's not working :-(
thumbnail
11年前 に Danial Mustofa Habibi によって更新されました。

RE: Creating a popup with actionURL instead of renderURL

Regular Member 投稿: 141 参加年月日: 11/11/01 最新の投稿
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

添付ファイル: