myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel Hartl (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (TRINIDAD-1813) partialSubmit attribute not working for command button when try to open dialog box
Date Sun, 24 Jul 2011 21:44:21 GMT

    [ https://issues.apache.org/jira/browse/TRINIDAD-1813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070261#comment-13070261
] 

Manuel Hartl commented on TRINIDAD-1813:
----------------------------------------

i have the same problem and i created a test project. This is actually a real showstoper for
our facelet migration...
i could upload an eclipse project with this problem, the pages i use:

dialogtest.xhtml:
<?xml version='1.0' encoding='UTF-8' ?>
<f:view xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:tr="http://myfaces.apache.org/trinidad">
	<tr:document>
		<tr:form>
			<tr:commandButton id="openDialog" text="open the dialog"
				windowWidth="300" windowHeight="200" partialSubmit="true"
				useWindow="true" action="dialog:openDialogTest"
				returnListener="#{openDialogBean.openDialogReturn}" />
		</tr:form>
	</tr:document>
</f:view>

with partialSubmit=false this works ...


dialogbean.xhtml:
<?xml version='1.0' encoding='utf-8'?>
<f:view xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:tr="http://myfaces.apache.org/trinidad">

	<tr:document title="Add dialog">
		<tr:form>
			<!-- Two input fields -->
			<tr:inputText label="test input" value="#{dialogBean.value1}"
				required="true" />

			<!-- Two buttons -->
			<tr:commandButton text="Submit" action="#{dialogBean.select}" />
			<tr:commandButton text="Cancel" immediate="true"
				action="#{dialogBean.cancel}" />
		</tr:form>
	</tr:document>
</f:view>

DialogBean.java
package de.hartlit.jsf;

import javax.enterprise.inject.Model;

import org.apache.myfaces.trinidad.context.RequestContext;

@Model
public class DialogBean {

	private Integer _value1;

	public Integer getValue1() {
		return _value1;
	}

	public void setValue1(Integer value1) {
		_value1 = value1;
	}

	public String cancel() {
		RequestContext.getCurrentInstance().returnFromDialog(null, null);
		return null;
	}

	public String select() {
		RequestContext.getCurrentInstance().returnFromDialog("returnValue",
				null);
		return null;
	}

}

OpenDialogBean.java:
package de.hartlit.jsf;

import javax.annotation.PostConstruct;
import javax.enterprise.inject.Model;

import org.apache.myfaces.trinidad.event.ReturnEvent;

@Model
public class OpenDialogBean {

	@PostConstruct
	void init() {
		System.out.println("init");
	}

	public String openDialog() {
		System.out.println("return outcome: "+"dialog:openDialogTest");
		return "dialog:openDialogTest";
	}

	public void openDialogReturn(ReturnEvent returnEvent) {
		System.out.print("return event");
	}

}

> partialSubmit attribute not working for command button when try to open dialog box
> ----------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1813
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1813
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 2.0.0-alpha
>         Environment: Window XP, java 6, Eclipse 3.4.2, Tomcat 6
>            Reporter: Navnath Kumbhar
>            Priority: Blocker
>
> Hi There,
> I am trying to implement one simple functionality as shown in live Trinidad demo of Dialog
box. Click on button, get value of from parent window to dialog box, change value from dialog
box and submit it, then submitted value should get reflected on parent window's field.
> I am getting value from dialog box but at code level. But when I try to set that value
to display on page it's not reflecting. and ask me to reload page. when I reload page then
again dialog box is there.
> This is happen when I remove partialSubmit="true" from button attribute. when I place
this attribute, then there is no any error, but dialog is not appearing.
> Please Please let me know how do I open dialog box using command button with setting
partialSubmit="true" attribute?
> Is this version problem.
> I am stuck on this issue from last 2 Months. still don't have any solution. 
> Is Trinidad really implement Dialog box as they have shown on demo site? If Yes, then
why all downloaded code is working fine only except DIALOG BOX?
> Please replay to this post. Any kind of suggestion is welcome.
> Thank You,
> Navnath Kumbhar.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message