You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Robert Schoch (JIRA)" <de...@myfaces.apache.org> on 2012/11/02 00:00:12 UTC
[jira] [Created] (TRINIDAD-2334) Dialog popup returns with error,
if called from commandButton with partial submit
Robert Schoch created TRINIDAD-2334:
---------------------------------------
Summary: Dialog popup returns with error, if called from commandButton with partial submit
Key: TRINIDAD-2334
URL: https://issues.apache.org/jira/browse/TRINIDAD-2334
Project: MyFaces Trinidad
Issue Type: Bug
Components: Build
Affects Versions: 2.0.1-core
Environment: Tomcat 7.0.32, Mojarra 2.0.9, Trinidad 2.0.1, Internet Explorer 8, FireFox 15
Reporter: Robert Schoch
Priority: Blocker
Dialog launch in XHTML pages works fine and the components with partialTriggers are updated.
But after return from dialog the following error message appears:
Error calling TrPanelPopup callback function:
Error: jsf.ajax.request: source not set
Then nothing happens more, no components are updated and the page is blocked for about 10 seconds.
This is a Sample for the dialog launch page:
<tr:document xmlns="http://www.w3.org/1999/xhtml"
xmlns:tr="http://myfaces.apache.org/trinidad"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
id="HtmlDocument" mode="strict" title="Test Dialog Launcher">
<tr:form id="TestForm">
<tr:panelButtonBar id="ButtonBar" inlineStyle="margin-left:auto;margin-right:auto;">
<tr:commandButton id="launchButton" text="Launch Dialog" action="dialog:confirm"
useWindow="true" windowWidth="280" windowHeight="120" partialSubmit="true"
launchListener="#{dialogController.dialogLaunchListener}"
returnListener="#{dialogController.dialogReturnListener}" />
</tr:panelButtonBar>
<tr:panelBox id="infoPanel" text="Last Action" partialTriggers="launchButton"
inlineStyle="margin-left:auto;margin-right:auto;">
<tr:outputText id="lastAction" value="#{dialogController.lastAction}" />
</tr:panelBox>
</tr:form>
</tr:document>
This is the dialog page:
<tr:document xmlns="http://www.w3.org/1999/xhtml"
xmlns:tr="http://myfaces.apache.org/trinidad"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
id="HtmlDocument" mode="strict" title="Test Dialog">
<tr:form id="DialogForm" >
<tr:outputText id="dialogMessage" value="hello from dialog" />
<tr:panelButtonBar id="buttonBar"
inlineStyle="width:auto;margin-left:auto;margin-right:auto;">
<tr:commandButton id="okButton" text="OK"
actionListener="#{dialogController.dialogActionListener}"/>
<tr:commandButton id="cancelButton" text="Cancel"
actionListener="#{dialogController.dialogActionListener}"/>
</tr:panelButtonBar>
</tr:form>
</tr:document>
And this is the dialog controller:
package de.ospkdd.sample;
import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.event.ActionEvent;
import org.apache.myfaces.trinidad.context.RequestContext;
import org.apache.myfaces.trinidad.event.LaunchEvent;
import org.apache.myfaces.trinidad.event.ReturnEvent;
@ManagedBean
@SessionScoped
public class DialogController implements Serializable {
private static final long serialVersionUID = -23121260063689204L;
private String lastAction = "???";
public DialogController() {}
public void dialogLaunchListener(LaunchEvent event) {
lastAction = "dialog launched...";
}
public void dialogActionListener(ActionEvent event) {
RequestContext.getCurrentInstance().returnFromDialog(
event.getComponent().getId(), null);
lastAction = "button clicked...";
}
public void dialogReturnListener(ReturnEvent event) {
lastAction = "dialog returned: " + (String)event.getReturnValue();
}
public String getLastAction() {
return lastAction;
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TRINIDAD-2334) Dialog popup returns with error,
if called from commandButton with partial submit
Posted by "Robert Schoch (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-2334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507981#comment-13507981 ]
Robert Schoch commented on TRINIDAD-2334:
-----------------------------------------
This issue is a duplicate of TRINIDAD-2238 because the original issue was closed by the reporter due to lack of interest. It was reopened later.
> Dialog popup returns with error, if called from commandButton with partial submit
> ---------------------------------------------------------------------------------
>
> Key: TRINIDAD-2334
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2334
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Build
> Affects Versions: 2.0.1-core
> Environment: Tomcat 7.0.32, Mojarra 2.0.9, Trinidad 2.0.1, Internet Explorer 8, FireFox 15
> Reporter: Robert Schoch
> Priority: Blocker
> Labels: patch
> Fix For: 2.0.2-core, 2.1.0-core
>
> Attachments: patch-for-XMLRequest.diff
>
>
> ---
> EDIT: this issue is a duplicate of
> ---
> Dialog launch in XHTML pages works fine and the components with partialTriggers are updated.
> But after return from dialog the following error message appears:
> Error calling TrPanelPopup callback function:
> Error: jsf.ajax.request: source not set
> Then nothing happens more, no components are updated and the page is blocked for about 10 seconds.
> This is a Sample for the dialog launch page:
> <tr:document xmlns="http://www.w3.org/1999/xhtml"
> xmlns:tr="http://myfaces.apache.org/trinidad"
> xmlns:trh="http://myfaces.apache.org/trinidad/html"
> id="HtmlDocument" mode="strict" title="Test Dialog Launcher">
> <tr:form id="TestForm">
> <tr:panelButtonBar id="ButtonBar" inlineStyle="margin-left:auto;margin-right:auto;">
> <tr:commandButton id="launchButton" text="Launch Dialog" action="dialog:confirm"
> useWindow="true" windowWidth="280" windowHeight="120" partialSubmit="true"
> launchListener="#{dialogController.dialogLaunchListener}"
> returnListener="#{dialogController.dialogReturnListener}" />
> </tr:panelButtonBar>
> <tr:panelBox id="infoPanel" text="Last Action" partialTriggers="launchButton"
> inlineStyle="margin-left:auto;margin-right:auto;">
> <tr:outputText id="lastAction" value="#{dialogController.lastAction}" />
> </tr:panelBox>
> </tr:form>
> </tr:document>
> This is the dialog page:
> <tr:document xmlns="http://www.w3.org/1999/xhtml"
> xmlns:tr="http://myfaces.apache.org/trinidad"
> xmlns:trh="http://myfaces.apache.org/trinidad/html"
> id="HtmlDocument" mode="strict" title="Test Dialog">
> <tr:form id="DialogForm" >
> <tr:outputText id="dialogMessage" value="hello from dialog" />
>
> <tr:panelButtonBar id="buttonBar"
> inlineStyle="width:auto;margin-left:auto;margin-right:auto;">
>
> <tr:commandButton id="okButton" text="OK"
> actionListener="#{dialogController.dialogActionListener}"/>
>
> <tr:commandButton id="cancelButton" text="Cancel"
> actionListener="#{dialogController.dialogActionListener}"/>
>
> </tr:panelButtonBar>
>
> </tr:form>
>
> </tr:document>
> And this is the dialog controller:
> package de.ospkdd.sample;
> import java.io.Serializable;
> import javax.faces.bean.ManagedBean;
> import javax.faces.bean.SessionScoped;
> import javax.faces.event.ActionEvent;
> import org.apache.myfaces.trinidad.context.RequestContext;
> import org.apache.myfaces.trinidad.event.LaunchEvent;
> import org.apache.myfaces.trinidad.event.ReturnEvent;
> @ManagedBean
> @SessionScoped
> public class DialogController implements Serializable {
> private static final long serialVersionUID = -23121260063689204L;
> private String lastAction = "???";
>
> public DialogController() {}
> public void dialogLaunchListener(LaunchEvent event) {
> lastAction = "dialog launched...";
>
> }
>
> public void dialogActionListener(ActionEvent event) {
> RequestContext.getCurrentInstance().returnFromDialog(
> event.getComponent().getId(), null);
>
> lastAction = "button clicked...";
>
> }
>
> public void dialogReturnListener(ReturnEvent event) {
> lastAction = "dialog returned: " + (String)event.getReturnValue();
>
> }
>
> public String getLastAction() {
>
> return lastAction;
>
> }
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TRINIDAD-2334) Dialog popup returns with error,
if called from commandButton with partial submit
Posted by "Robert Schoch (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-2334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Schoch updated TRINIDAD-2334:
------------------------------------
Status: Patch Available (was: Open)
> Dialog popup returns with error, if called from commandButton with partial submit
> ---------------------------------------------------------------------------------
>
> Key: TRINIDAD-2334
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2334
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Build
> Affects Versions: 2.0.1-core
> Environment: Tomcat 7.0.32, Mojarra 2.0.9, Trinidad 2.0.1, Internet Explorer 8, FireFox 15
> Reporter: Robert Schoch
> Priority: Blocker
> Labels: patch
> Fix For: 2.0.2-core, 2.1.0-core
>
>
> Dialog launch in XHTML pages works fine and the components with partialTriggers are updated.
> But after return from dialog the following error message appears:
> Error calling TrPanelPopup callback function:
> Error: jsf.ajax.request: source not set
> Then nothing happens more, no components are updated and the page is blocked for about 10 seconds.
> This is a Sample for the dialog launch page:
> <tr:document xmlns="http://www.w3.org/1999/xhtml"
> xmlns:tr="http://myfaces.apache.org/trinidad"
> xmlns:trh="http://myfaces.apache.org/trinidad/html"
> id="HtmlDocument" mode="strict" title="Test Dialog Launcher">
> <tr:form id="TestForm">
> <tr:panelButtonBar id="ButtonBar" inlineStyle="margin-left:auto;margin-right:auto;">
> <tr:commandButton id="launchButton" text="Launch Dialog" action="dialog:confirm"
> useWindow="true" windowWidth="280" windowHeight="120" partialSubmit="true"
> launchListener="#{dialogController.dialogLaunchListener}"
> returnListener="#{dialogController.dialogReturnListener}" />
> </tr:panelButtonBar>
> <tr:panelBox id="infoPanel" text="Last Action" partialTriggers="launchButton"
> inlineStyle="margin-left:auto;margin-right:auto;">
> <tr:outputText id="lastAction" value="#{dialogController.lastAction}" />
> </tr:panelBox>
> </tr:form>
> </tr:document>
> This is the dialog page:
> <tr:document xmlns="http://www.w3.org/1999/xhtml"
> xmlns:tr="http://myfaces.apache.org/trinidad"
> xmlns:trh="http://myfaces.apache.org/trinidad/html"
> id="HtmlDocument" mode="strict" title="Test Dialog">
> <tr:form id="DialogForm" >
> <tr:outputText id="dialogMessage" value="hello from dialog" />
>
> <tr:panelButtonBar id="buttonBar"
> inlineStyle="width:auto;margin-left:auto;margin-right:auto;">
>
> <tr:commandButton id="okButton" text="OK"
> actionListener="#{dialogController.dialogActionListener}"/>
>
> <tr:commandButton id="cancelButton" text="Cancel"
> actionListener="#{dialogController.dialogActionListener}"/>
>
> </tr:panelButtonBar>
>
> </tr:form>
>
> </tr:document>
> And this is the dialog controller:
> package de.ospkdd.sample;
> import java.io.Serializable;
> import javax.faces.bean.ManagedBean;
> import javax.faces.bean.SessionScoped;
> import javax.faces.event.ActionEvent;
> import org.apache.myfaces.trinidad.context.RequestContext;
> import org.apache.myfaces.trinidad.event.LaunchEvent;
> import org.apache.myfaces.trinidad.event.ReturnEvent;
> @ManagedBean
> @SessionScoped
> public class DialogController implements Serializable {
> private static final long serialVersionUID = -23121260063689204L;
> private String lastAction = "???";
>
> public DialogController() {}
> public void dialogLaunchListener(LaunchEvent event) {
> lastAction = "dialog launched...";
>
> }
>
> public void dialogActionListener(ActionEvent event) {
> RequestContext.getCurrentInstance().returnFromDialog(
> event.getComponent().getId(), null);
>
> lastAction = "button clicked...";
>
> }
>
> public void dialogReturnListener(ReturnEvent event) {
> lastAction = "dialog returned: " + (String)event.getReturnValue();
>
> }
>
> public String getLastAction() {
>
> return lastAction;
>
> }
>
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira