[JBoss JIRA] (RF-13712) FileUpload does not work on Wildfly 8.0 and Wildfly 8.1
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13712?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13712:
-------------------------------
Labels: waiting_on_user (was: )
> FileUpload does not work on Wildfly 8.0 and Wildfly 8.1
> -------------------------------------------------------
>
> Key: RF-13712
> URL: https://issues.jboss.org/browse/RF-13712
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.3.7
> Environment: 4.3.7 FileUpload does not work on wildfly
> Reporter: Byambaa MD
> Labels: waiting_on_user
> Attachments: AS error log.png, can't Render.png, chrome js error log.png, file upload done !.png, fileupload error on wildfly.png, Render code.png, Web application libraries and main page structure.png
>
>
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13712) FileUpload does not work on Wildfly 8.0 and Wildfly 8.1
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13712?page=com.atlassian.jira.plugin.s... ]
Brian Leathem edited comment on RF-13712 at 7/4/14 11:27 AM:
-------------------------------------------------------------
MY FILEUPLOAD MBEAN CODE
----
{code}
package mdb.dev.ZMN.core.mbean.UF;
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.imageio.stream.FileImageOutputStream;
import mdb.cmn.base.configure.utilities.CMNBaseConfigureUtilities;
import mdb.cmn.base.mbean.CMNBaseMBean;
import mdb.cmn.utilities.log.CMNLogUtilities;
import mdb.cmn.utilities.system.CMNSystemUtilities;
import mdb.dev.ZMN.core.constants.ZMNCoreConstants;
import mdb.dev.ZMN.core.mbean.UF.DTO.ZMNCoreUFDTO;
import mdb.dev.ZMN.core.mbean.utilities.ZMNCoreMBeanUtilities;
import mdb.dev.ZMN.core.utilities.configure.ZMNCoreConfigureUtilities;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.primefaces.event.CaptureEvent;
import org.richfaces.event.FileUploadEvent;
/**
*
* @author Byambasuren.MD
*
**/
@SuppressWarnings("serial")
@SessionScoped
@ManagedBean(name = "CoreUFMBean")
public class ZMNCoreUFMBean extends CMNBaseMBean implements Serializable, ZMNCoreConstants {
private boolean immediateUpload = false, allowFlash = false, autoClose = false, generateName = true, useData = false, autoFinish = false, baseTemporary = false;
private Integer maxFilesQuantity;
private String acceptedTypes, destination;
private String render, desName, namePrefix;
private Collection<ZMNCoreUFDTO> files;
private boolean visible;
public ZMNCoreUFMBean() {
super();
}
/** MBean Utilities **/
public void doSetXUIMaintenance() {
}
public void doRTEMaintenance(String desName) {
}
public void doUploadMaintenance(String desName) {
}
public CMNBaseConfigureUtilities getConfigure() {
return ZMNCoreConfigureUtilities.getInstance();
}
/** Utilities **/
public void onCapture(CaptureEvent captureEvent) {
try {
ZMNCoreUFDTO uFile = new ZMNCoreUFDTO(null, null, null, captureEvent.getData().length, (this.isUseData() ? captureEvent.getData() : null));
if (this.isGenerateName()) {
uFile.doGenerateName(this.getHasNamePrefix() ? (this.getNamePrefix()) : null, "png");
} else if (this.getHasNamePrefix()) {
uFile.setName(this.getNamePrefix() + "_" + uFile.getName());
}
if (!new File(this.getBaseDestination() + this.getDestination()).exists())
CMNSystemUtilities.createDir(this.getBaseDestination() + this.getDestination());
FileImageOutputStream imageOutput;
imageOutput = new FileImageOutputStream(new File(this.getBaseDestination() + this.getDestination() + uFile.getName()));
imageOutput.write(captureEvent.getData(), 0, captureEvent.getData().length);
imageOutput.close();
this.getFiles().add(uFile);
} catch (Exception ex) {
CMNLogUtilities.fatal("core", "UnSuccessful Upload File", ex);
}
}
public void listener(FileUploadEvent event) {
try {
ZMNCoreUFDTO uFile = new ZMNCoreUFDTO(event.getUploadedFile().getName(), event.getUploadedFile().getName(), event.getUploadedFile().getContentType(), event.getUploadedFile().getSize(), (this.isUseData() ? event.getUploadedFile().getData() : null));
if (this.isGenerateName()) {
uFile.doGenerateName(this.getHasNamePrefix() ? (this.getNamePrefix()) : null);
} else if (this.getHasNamePrefix()) {
uFile.setName(this.getNamePrefix() + "_" + uFile.getName());
}
if (!new File(this.getBaseDestination() + this.getDestination()).exists())
CMNSystemUtilities.createDir(this.getBaseDestination() + this.getDestination());
FileUtils.writeByteArrayToFile(new File(this.getBaseDestination() + this.getDestination() + uFile.getName()), event.getUploadedFile().getData());
this.getFiles().add(uFile);
this.setMaxFilesQuantity(this.getMaxFilesQuantity() - 1);
} catch (Exception ex) {
ex.printStackTrace();
CMNLogUtilities.fatal("core", "UnSuccessful Upload File", ex);
}
}
public void doShow() {
this.setVisible(true);
}
public void doClear() {
this.setVisible(false);
this.setImmediateUpload(false);
this.setAllowFlash(false);
this.setAutoFinish(false);
this.setAutoClose(false);
this.setGenerateName(true);
this.setUseData(false);
this.setAcceptedTypes(null);
this.setMaxFilesQuantity(null);
this.setDestination(null);
this.setNamePrefix(null);
this.setFiles(null);
}
public void doUpload() {
if (this.getHasFiles()) {
ZMNCoreMBeanUtilities.getCoreSUMBean().doUploadMaintenance(this.getDesName());
this.doClear();
} else {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, ZMNCoreMBeanUtilities.getBundleMessage("cmn", "lbl.operation.warning"), ZMNCoreMBeanUtilities.getBundleMessage("cmn", "msg.operation.canceled")));
}
}
/** Managed Getters **/
public String getBaseDestination() {
return this.isBaseTemporary() ? ZMNCoreConfigureUtilities.getInstance().getCMNSetting(CMN.SETTING.PATH.TEMPORARY).getValue() : ZMNCoreConfigureUtilities.getInstance().getCMNSetting(CMN.SETTING.PATH.RESOURCES).getValue();
}
/** Getters **/
public ZMNCoreUFDTO getFile(int index) {
return this.getHasFiles() ? ((ArrayList<ZMNCoreUFDTO>) this.getFiles()).get(index) : null;
}
public boolean getHasFiles() {
return this.getFiles().size() > 0;
}
public boolean getHasRender() {
return StringUtils.isNotBlank(this.getRender());
}
public boolean getHasNamePrefix() {
return StringUtils.isNotBlank(this.getNamePrefix());
}
/** Getters Setters **/
public boolean isImmediateUpload() {
return immediateUpload;
}
public void setImmediateUpload(boolean immediateUpload) {
this.immediateUpload = immediateUpload;
}
public boolean isAllowFlash() {
return allowFlash;
}
public void setAllowFlash(boolean allowFlash) {
this.allowFlash = allowFlash;
}
public boolean isGenerateName() {
return generateName;
}
public void setGenerateName(boolean generateName) {
this.generateName = generateName;
}
public boolean isUseData() {
return useData;
}
public void setUseData(boolean useData) {
this.useData = useData;
}
public Integer getMaxFilesQuantity() {
return maxFilesQuantity != null ? maxFilesQuantity : (maxFilesQuantity = 1);
}
public void setMaxFilesQuantity(Integer maxFilesQuantity) {
this.maxFilesQuantity = maxFilesQuantity;
}
public String getNamePrefix() {
return namePrefix;
}
public void setNamePrefix(String namePrefix) {
this.namePrefix = namePrefix;
}
public String getAcceptedTypes() {
return acceptedTypes != null ? acceptedTypes : (acceptedTypes = "jpg, gif, png");
}
public void setAcceptedTypes(String acceptedTypes) {
this.acceptedTypes = acceptedTypes;
}
public String getDestination() {
return destination != null ? (destination + "/") : (destination = "");
}
public void setDestination(String destination) {
this.destination = destination;
}
public Collection<ZMNCoreUFDTO> getFiles() {
return files != null ? files : (files = new ArrayList<ZMNCoreUFDTO>());
}
public void setFiles(Collection<ZMNCoreUFDTO> files) {
this.files = files;
}
public boolean isBaseTemporary() {
return baseTemporary;
}
public void setBaseTemporary(boolean baseTemporary) {
this.baseTemporary = baseTemporary;
}
public boolean isVisible() {
return visible;
}
public void setVisible(boolean visible) {
this.visible = visible;
}
public boolean isAutoClose() {
return autoClose;
}
public void setAutoClose(boolean autoClose) {
this.autoClose = autoClose;
}
public String getRender() {
return render;
}
public void setRender(String render) {
this.render = render;
}
public boolean isAutoFinish() {
return autoFinish;
}
public void setAutoFinish(boolean autoFinish) {
this.autoFinish = autoFinish;
}
public String getDesName() {
return desName;
}
public void setDesName(String desName) {
this.desName = desName;
}
}
{code}
was (Author: sdk):
MY FILEUPLOAD MBEAN CODE
---------------------------------------------------------------------------------------------
package mdb.dev.ZMN.core.mbean.UF;
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.imageio.stream.FileImageOutputStream;
import mdb.cmn.base.configure.utilities.CMNBaseConfigureUtilities;
import mdb.cmn.base.mbean.CMNBaseMBean;
import mdb.cmn.utilities.log.CMNLogUtilities;
import mdb.cmn.utilities.system.CMNSystemUtilities;
import mdb.dev.ZMN.core.constants.ZMNCoreConstants;
import mdb.dev.ZMN.core.mbean.UF.DTO.ZMNCoreUFDTO;
import mdb.dev.ZMN.core.mbean.utilities.ZMNCoreMBeanUtilities;
import mdb.dev.ZMN.core.utilities.configure.ZMNCoreConfigureUtilities;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.primefaces.event.CaptureEvent;
import org.richfaces.event.FileUploadEvent;
/**
*
* @author Byambasuren.MD
*
**/
@SuppressWarnings("serial")
@SessionScoped
@ManagedBean(name = "CoreUFMBean")
public class ZMNCoreUFMBean extends CMNBaseMBean implements Serializable, ZMNCoreConstants {
private boolean immediateUpload = false, allowFlash = false, autoClose = false, generateName = true, useData = false, autoFinish = false, baseTemporary = false;
private Integer maxFilesQuantity;
private String acceptedTypes, destination;
private String render, desName, namePrefix;
private Collection<ZMNCoreUFDTO> files;
private boolean visible;
public ZMNCoreUFMBean() {
super();
}
/** MBean Utilities **/
public void doSetXUIMaintenance() {
}
public void doRTEMaintenance(String desName) {
}
public void doUploadMaintenance(String desName) {
}
public CMNBaseConfigureUtilities getConfigure() {
return ZMNCoreConfigureUtilities.getInstance();
}
/** Utilities **/
public void onCapture(CaptureEvent captureEvent) {
try {
ZMNCoreUFDTO uFile = new ZMNCoreUFDTO(null, null, null, captureEvent.getData().length, (this.isUseData() ? captureEvent.getData() : null));
if (this.isGenerateName()) {
uFile.doGenerateName(this.getHasNamePrefix() ? (this.getNamePrefix()) : null, "png");
} else if (this.getHasNamePrefix()) {
uFile.setName(this.getNamePrefix() + "_" + uFile.getName());
}
if (!new File(this.getBaseDestination() + this.getDestination()).exists())
CMNSystemUtilities.createDir(this.getBaseDestination() + this.getDestination());
FileImageOutputStream imageOutput;
imageOutput = new FileImageOutputStream(new File(this.getBaseDestination() + this.getDestination() + uFile.getName()));
imageOutput.write(captureEvent.getData(), 0, captureEvent.getData().length);
imageOutput.close();
this.getFiles().add(uFile);
} catch (Exception ex) {
CMNLogUtilities.fatal("core", "UnSuccessful Upload File", ex);
}
}
public void listener(FileUploadEvent event) {
try {
ZMNCoreUFDTO uFile = new ZMNCoreUFDTO(event.getUploadedFile().getName(), event.getUploadedFile().getName(), event.getUploadedFile().getContentType(), event.getUploadedFile().getSize(), (this.isUseData() ? event.getUploadedFile().getData() : null));
if (this.isGenerateName()) {
uFile.doGenerateName(this.getHasNamePrefix() ? (this.getNamePrefix()) : null);
} else if (this.getHasNamePrefix()) {
uFile.setName(this.getNamePrefix() + "_" + uFile.getName());
}
if (!new File(this.getBaseDestination() + this.getDestination()).exists())
CMNSystemUtilities.createDir(this.getBaseDestination() + this.getDestination());
FileUtils.writeByteArrayToFile(new File(this.getBaseDestination() + this.getDestination() + uFile.getName()), event.getUploadedFile().getData());
this.getFiles().add(uFile);
this.setMaxFilesQuantity(this.getMaxFilesQuantity() - 1);
} catch (Exception ex) {
ex.printStackTrace();
CMNLogUtilities.fatal("core", "UnSuccessful Upload File", ex);
}
}
public void doShow() {
this.setVisible(true);
}
public void doClear() {
this.setVisible(false);
this.setImmediateUpload(false);
this.setAllowFlash(false);
this.setAutoFinish(false);
this.setAutoClose(false);
this.setGenerateName(true);
this.setUseData(false);
this.setAcceptedTypes(null);
this.setMaxFilesQuantity(null);
this.setDestination(null);
this.setNamePrefix(null);
this.setFiles(null);
}
public void doUpload() {
if (this.getHasFiles()) {
ZMNCoreMBeanUtilities.getCoreSUMBean().doUploadMaintenance(this.getDesName());
this.doClear();
} else {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, ZMNCoreMBeanUtilities.getBundleMessage("cmn", "lbl.operation.warning"), ZMNCoreMBeanUtilities.getBundleMessage("cmn", "msg.operation.canceled")));
}
}
/** Managed Getters **/
public String getBaseDestination() {
return this.isBaseTemporary() ? ZMNCoreConfigureUtilities.getInstance().getCMNSetting(CMN.SETTING.PATH.TEMPORARY).getValue() : ZMNCoreConfigureUtilities.getInstance().getCMNSetting(CMN.SETTING.PATH.RESOURCES).getValue();
}
/** Getters **/
public ZMNCoreUFDTO getFile(int index) {
return this.getHasFiles() ? ((ArrayList<ZMNCoreUFDTO>) this.getFiles()).get(index) : null;
}
public boolean getHasFiles() {
return this.getFiles().size() > 0;
}
public boolean getHasRender() {
return StringUtils.isNotBlank(this.getRender());
}
public boolean getHasNamePrefix() {
return StringUtils.isNotBlank(this.getNamePrefix());
}
/** Getters Setters **/
public boolean isImmediateUpload() {
return immediateUpload;
}
public void setImmediateUpload(boolean immediateUpload) {
this.immediateUpload = immediateUpload;
}
public boolean isAllowFlash() {
return allowFlash;
}
public void setAllowFlash(boolean allowFlash) {
this.allowFlash = allowFlash;
}
public boolean isGenerateName() {
return generateName;
}
public void setGenerateName(boolean generateName) {
this.generateName = generateName;
}
public boolean isUseData() {
return useData;
}
public void setUseData(boolean useData) {
this.useData = useData;
}
public Integer getMaxFilesQuantity() {
return maxFilesQuantity != null ? maxFilesQuantity : (maxFilesQuantity = 1);
}
public void setMaxFilesQuantity(Integer maxFilesQuantity) {
this.maxFilesQuantity = maxFilesQuantity;
}
public String getNamePrefix() {
return namePrefix;
}
public void setNamePrefix(String namePrefix) {
this.namePrefix = namePrefix;
}
public String getAcceptedTypes() {
return acceptedTypes != null ? acceptedTypes : (acceptedTypes = "jpg, gif, png");
}
public void setAcceptedTypes(String acceptedTypes) {
this.acceptedTypes = acceptedTypes;
}
public String getDestination() {
return destination != null ? (destination + "/") : (destination = "");
}
public void setDestination(String destination) {
this.destination = destination;
}
public Collection<ZMNCoreUFDTO> getFiles() {
return files != null ? files : (files = new ArrayList<ZMNCoreUFDTO>());
}
public void setFiles(Collection<ZMNCoreUFDTO> files) {
this.files = files;
}
public boolean isBaseTemporary() {
return baseTemporary;
}
public void setBaseTemporary(boolean baseTemporary) {
this.baseTemporary = baseTemporary;
}
public boolean isVisible() {
return visible;
}
public void setVisible(boolean visible) {
this.visible = visible;
}
public boolean isAutoClose() {
return autoClose;
}
public void setAutoClose(boolean autoClose) {
this.autoClose = autoClose;
}
public String getRender() {
return render;
}
public void setRender(String render) {
this.render = render;
}
public boolean isAutoFinish() {
return autoFinish;
}
public void setAutoFinish(boolean autoFinish) {
this.autoFinish = autoFinish;
}
public String getDesName() {
return desName;
}
public void setDesName(String desName) {
this.desName = desName;
}
}
> FileUpload does not work on Wildfly 8.0 and Wildfly 8.1
> -------------------------------------------------------
>
> Key: RF-13712
> URL: https://issues.jboss.org/browse/RF-13712
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.3.7
> Environment: 4.3.7 FileUpload does not work on wildfly
> Reporter: Byambaa MD
> Attachments: AS error log.png, can't Render.png, chrome js error log.png, file upload done !.png, fileupload error on wildfly.png, Render code.png, Web application libraries and main page structure.png
>
>
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13712) FileUpload does not work on Wildfly 8.0 and Wildfly 8.1
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13712?page=com.atlassian.jira.plugin.s... ]
Brian Leathem edited comment on RF-13712 at 7/4/14 11:28 AM:
-------------------------------------------------------------
MY FILE UPLOAD XHTML PAGE CODE
----
{code}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:p="http://primefaces.org/ui" lang="en">
<a4j:outputPanel styleClass="popup w402" layout="block">
<rich:fileUpload addLabel="#{cmn['do.select.file']}" styleClass="lsn" id="UPLOADER" execute="@form" fileUploadListener="#{CoreUFMBean.listener}" acceptedTypes="#{CoreUFMBean.acceptedTypes}" ontyperejected="alert('#{CoreUFMBean.acceptedTypes} files are accepted');" maxFilesQuantity="#{CoreUFMBean.maxFilesQuantity}" />
<div class="popup_control">
<a4j:commandButton type="button" value="#{cmn['do.confirm']}" action="#{CoreUFMBean.doUpload}" status="CMN" execute="@form" render="WM, POPUP, #{CoreUFMBean.render}" styleClass="cmn mr5" />
<a4j:commandButton type="button" value="#{cmn['do.cancel']}" action="#{CoreSUMBean.doClosePopup}" actionListener="#{CoreUFMBean.doClear}" execute="@this" render="WM, POPUP" styleClass="cmn esc">
<f:setPropertyActionListener target="#{CoreSUMBean.XUIPopup}" value="#{null}" />
</a4j:commandButton>
</div>
</a4j:outputPanel>
</ui:composition>
{code}
was (Author: sdk):
MY FILE UPLOAD XHTML PAGE CODE
--------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:p="http://primefaces.org/ui" lang="en">
<a4j:outputPanel styleClass="popup w402" layout="block">
<rich:fileUpload addLabel="#{cmn['do.select.file']}" styleClass="lsn" id="UPLOADER" execute="@form" fileUploadListener="#{CoreUFMBean.listener}" acceptedTypes="#{CoreUFMBean.acceptedTypes}" ontyperejected="alert('#{CoreUFMBean.acceptedTypes} files are accepted');" maxFilesQuantity="#{CoreUFMBean.maxFilesQuantity}" />
<div class="popup_control">
<a4j:commandButton type="button" value="#{cmn['do.confirm']}" action="#{CoreUFMBean.doUpload}" status="CMN" execute="@form" render="WM, POPUP, #{CoreUFMBean.render}" styleClass="cmn mr5" />
<a4j:commandButton type="button" value="#{cmn['do.cancel']}" action="#{CoreSUMBean.doClosePopup}" actionListener="#{CoreUFMBean.doClear}" execute="@this" render="WM, POPUP" styleClass="cmn esc">
<f:setPropertyActionListener target="#{CoreSUMBean.XUIPopup}" value="#{null}" />
</a4j:commandButton>
</div>
</a4j:outputPanel>
</ui:composition>
> FileUpload does not work on Wildfly 8.0 and Wildfly 8.1
> -------------------------------------------------------
>
> Key: RF-13712
> URL: https://issues.jboss.org/browse/RF-13712
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.3.7
> Environment: 4.3.7 FileUpload does not work on wildfly
> Reporter: Byambaa MD
> Attachments: AS error log.png, can't Render.png, chrome js error log.png, file upload done !.png, fileupload error on wildfly.png, Render code.png, Web application libraries and main page structure.png
>
>
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13713) Create Smoke test(s) for chart in RF 4.5
by Matej Novotny (JIRA)
[ https://issues.jboss.org/browse/RF-13713?page=com.atlassian.jira.plugin.s... ]
Matej Novotny resolved RF-13713.
--------------------------------
Resolution: Done
Tests are created and pushed into repository, PhantomJS and Chrome works fine.
In Firefox WebDriver cannot click a point in canvas and hence cannot fire an event - so those tests are skipped for FF.
We might want to introduce @FailingOnFirefox annotation for this purposes.
> Create Smoke test(s) for chart in RF 4.5
> ----------------------------------------
>
> Key: RF-13713
> URL: https://issues.jboss.org/browse/RF-13713
> Project: RichFaces
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.5.0.Alpha2
> Reporter: Matej Novotny
> Assignee: Matej Novotny
> Priority: Minor
> Fix For: 4.5.0.Alpha2
>
>
> As charts were added recently we have no tests covering this component.
> We need to have at least some smoke test too quickly determine when something goes wrong. Rest can be tested in Metamer.
> These tests might run only with some browsers - investigate.
> Also test JS API because it will be needed in order to test listeners.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13706) dequeued Ajax request not processed correctly if its source element has been updated
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13706?page=com.atlassian.jira.plugin.s... ]
Juraj Húska updated RF-13706:
-----------------------------
Assignee: Brian Leathem
> dequeued Ajax request not processed correctly if its source element has been updated
> ------------------------------------------------------------------------------------
>
> Key: RF-13706
> URL: https://issues.jboss.org/browse/RF-13706
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.3.7
> Reporter: Marcel Kolsteren
> Assignee: Brian Leathem
> Attachments: queuetest-javaee6.zip, queuetest.zip, richfaces-core-4.3.8-SNAPSHOT.patch.zip
>
>
> I found a problem in the RichFaces Ajax queuing mechanism, which can cause all JavaScript execution to stop, leaving the end user with an unresponsive page.
> The problem occurs when a request in the queue rerenders an area that includes the source element of the next request in the queue, but does not include the form of that source element. When the next request is fetched from the queue, JSF tries to find the correct form by climbing the DOM tree, starting at the source element of the event. However, because the source element has been rerendered, the path to its form is broken, and in that case JSF falls back to the first form of the page (see JavaScript function getForm that is called by jsf.ajax.request in jsf.js). If that form is not the form belonging to the rerendered version of the element, nasty things will happen.
> To illustrate this, I created a very simple Java EE 7 web application (see attached Maven project) and deployed it in WildFly 8.1.0.Final. It contains a page with one clickable link that rerenders itself when clicked:
> {noformat}
> <!DOCTYPE html>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:a4j="http://richfaces.org/a4j">
> <h:head/>
> <h:body>
> <form action="http://www.meandi.nl"/>
> <h:form>
> <a4j:commandLink action="#{richBean.waitThreeSeconds}" value="Click Me" render="@this"/>
> </h:form>
> </h:body>
> </html>
> {noformat}
> The method "waitThreeSeconds" does nothing but waiting for three seconds. When the link is double clicked, you'll observe that the first click is handled correctly, but that the second click results in an Ajax request posted to the URL of the first form, leading to access denied errors (because of cross domain scripting). The used RichFaces version is 4.3.7.
> The problem can be fixed by changing the RichFaces JavaScript code, so that after completion of an Ajax request, stale elements are removed from the queue. I created a patch for RichFaces 4.3.7, and verified that it works (see attachment). Another solution strategy would be to try to find the new DOM element that corresponds to the stale source of the event, and fetch the form from that element. My thought was that removing the stale request would be better, because (1) it is kind of dangerous to process a user action on an element that has already been replaced and (2) the element might have been removed from the DOM tree by the previous rerender.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13706) dequeued Ajax request not processed correctly if its source element has been updated
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13706?page=com.atlassian.jira.plugin.s... ]
Juraj Húska updated RF-13706:
-----------------------------
Assignee: (was: Juraj Húska)
> dequeued Ajax request not processed correctly if its source element has been updated
> ------------------------------------------------------------------------------------
>
> Key: RF-13706
> URL: https://issues.jboss.org/browse/RF-13706
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.3.7
> Reporter: Marcel Kolsteren
> Attachments: queuetest-javaee6.zip, queuetest.zip, richfaces-core-4.3.8-SNAPSHOT.patch.zip
>
>
> I found a problem in the RichFaces Ajax queuing mechanism, which can cause all JavaScript execution to stop, leaving the end user with an unresponsive page.
> The problem occurs when a request in the queue rerenders an area that includes the source element of the next request in the queue, but does not include the form of that source element. When the next request is fetched from the queue, JSF tries to find the correct form by climbing the DOM tree, starting at the source element of the event. However, because the source element has been rerendered, the path to its form is broken, and in that case JSF falls back to the first form of the page (see JavaScript function getForm that is called by jsf.ajax.request in jsf.js). If that form is not the form belonging to the rerendered version of the element, nasty things will happen.
> To illustrate this, I created a very simple Java EE 7 web application (see attached Maven project) and deployed it in WildFly 8.1.0.Final. It contains a page with one clickable link that rerenders itself when clicked:
> {noformat}
> <!DOCTYPE html>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:a4j="http://richfaces.org/a4j">
> <h:head/>
> <h:body>
> <form action="http://www.meandi.nl"/>
> <h:form>
> <a4j:commandLink action="#{richBean.waitThreeSeconds}" value="Click Me" render="@this"/>
> </h:form>
> </h:body>
> </html>
> {noformat}
> The method "waitThreeSeconds" does nothing but waiting for three seconds. When the link is double clicked, you'll observe that the first click is handled correctly, but that the second click results in an Ajax request posted to the URL of the first form, leading to access denied errors (because of cross domain scripting). The used RichFaces version is 4.3.7.
> The problem can be fixed by changing the RichFaces JavaScript code, so that after completion of an Ajax request, stale elements are removed from the queue. I created a patch for RichFaces 4.3.7, and verified that it works (see attachment). Another solution strategy would be to try to find the new DOM element that corresponds to the stale source of the event, and fetch the form from that element. My thought was that removing the stale request would be better, because (1) it is kind of dangerous to process a user action on an element that has already been replaced and (2) the element might have been removed from the DOM tree by the previous rerender.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13706) dequeued Ajax request not processed correctly if its source element has been updated
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13706?page=com.atlassian.jira.plugin.s... ]
Juraj Húska commented on RF-13706:
----------------------------------
We have verified the PR. It looks good.
> dequeued Ajax request not processed correctly if its source element has been updated
> ------------------------------------------------------------------------------------
>
> Key: RF-13706
> URL: https://issues.jboss.org/browse/RF-13706
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.3.7
> Reporter: Marcel Kolsteren
> Assignee: Juraj Húska
> Attachments: queuetest-javaee6.zip, queuetest.zip, richfaces-core-4.3.8-SNAPSHOT.patch.zip
>
>
> I found a problem in the RichFaces Ajax queuing mechanism, which can cause all JavaScript execution to stop, leaving the end user with an unresponsive page.
> The problem occurs when a request in the queue rerenders an area that includes the source element of the next request in the queue, but does not include the form of that source element. When the next request is fetched from the queue, JSF tries to find the correct form by climbing the DOM tree, starting at the source element of the event. However, because the source element has been rerendered, the path to its form is broken, and in that case JSF falls back to the first form of the page (see JavaScript function getForm that is called by jsf.ajax.request in jsf.js). If that form is not the form belonging to the rerendered version of the element, nasty things will happen.
> To illustrate this, I created a very simple Java EE 7 web application (see attached Maven project) and deployed it in WildFly 8.1.0.Final. It contains a page with one clickable link that rerenders itself when clicked:
> {noformat}
> <!DOCTYPE html>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:a4j="http://richfaces.org/a4j">
> <h:head/>
> <h:body>
> <form action="http://www.meandi.nl"/>
> <h:form>
> <a4j:commandLink action="#{richBean.waitThreeSeconds}" value="Click Me" render="@this"/>
> </h:form>
> </h:body>
> </html>
> {noformat}
> The method "waitThreeSeconds" does nothing but waiting for three seconds. When the link is double clicked, you'll observe that the first click is handled correctly, but that the second click results in an Ajax request posted to the URL of the first form, leading to access denied errors (because of cross domain scripting). The used RichFaces version is 4.3.7.
> The problem can be fixed by changing the RichFaces JavaScript code, so that after completion of an Ajax request, stale elements are removed from the queue. I created a patch for RichFaces 4.3.7, and verified that it works (see attachment). Another solution strategy would be to try to find the new DOM element that corresponds to the stale source of the event, and fetch the form from that element. My thought was that removing the stale request would be better, because (1) it is kind of dangerous to process a user action on an element that has already been replaced and (2) the element might have been removed from the DOM tree by the previous rerender.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13714) DropDownMenu not working inside tab-header
by Martin Höller (JIRA)
[ https://issues.jboss.org/browse/RF-13714?page=com.atlassian.jira.plugin.s... ]
Martin Höller updated RF-13714:
-------------------------------
Description:
The <rich:dropDownMenu> component seems broken, when used in the header-fact of a <rich:tab>. The menu simply doesn't open. Here is simplified example-code to reproduce:
{code:xml}
<rich:tabPanel switchType="client">
<rich:tab>
<f:facet name="header">
<rich:dropDownMenu showEvent="mouseover" label="menu" mode="client">
<rich:menuItem>
<a4j:commandLink value="menuItem" />
</rich:menuItem>
</rich:dropDownMenu>
</f:facet>
</rich:tab>
</rich:tabPanel>
{code}
If I use the same menu-code in the <rich:tab> but outside the header-facet, it works.
This did work with Richfaces 3.3!
was:
The <rich:dropDownMenu> component seems broken, when used in the header-fact of a <rich:tab>. The menu simply doesn't open. Here is simplified example-code to reproduce:
{code:xml}
<rich:tabPanel switchType="client">
<rich:tab>
<f:facet name="header">
<rich:dropDownMenu showEvent="mouseover" label="menu" mode="client">
<rich:menuItem>
<a4j:commandLink value="menuItem" />
</rich:menuItem>
</rich:dropDownMenu>
</f:facet>
</rich:tab>
</rich:tabPanel>
{code}
If I use the same menu-code in the <rich:tab> but outside the header-facet, it works.
Forum Reference: https://community.jboss.org/message/880495
> DropDownMenu not working inside tab-header
> ------------------------------------------
>
> Key: RF-13714
> URL: https://issues.jboss.org/browse/RF-13714
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-menu
> Affects Versions: 4.3.7
> Environment: Wildfly 8.1.0.GA => JSF 2.2
> Tested with recent Firefox and Chromium versions.
> Reporter: Martin Höller
> Labels: dropDownMenu, tabPanel
>
> The <rich:dropDownMenu> component seems broken, when used in the header-fact of a <rich:tab>. The menu simply doesn't open. Here is simplified example-code to reproduce:
> {code:xml}
> <rich:tabPanel switchType="client">
> <rich:tab>
> <f:facet name="header">
> <rich:dropDownMenu showEvent="mouseover" label="menu" mode="client">
> <rich:menuItem>
> <a4j:commandLink value="menuItem" />
> </rich:menuItem>
> </rich:dropDownMenu>
> </f:facet>
> </rich:tab>
> </rich:tabPanel>
> {code}
> If I use the same menu-code in the <rich:tab> but outside the header-facet, it works.
> This did work with Richfaces 3.3!
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13714) DropDownMenu not working inside tab-header
by Martin Höller (JIRA)
Martin Höller created RF-13714:
----------------------------------
Summary: DropDownMenu not working inside tab-header
Key: RF-13714
URL: https://issues.jboss.org/browse/RF-13714
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-menu
Affects Versions: 4.3.7
Environment: Wildfly 8.1.0.GA => JSF 2.2
Tested with recent Firefox and Chromium versions.
Reporter: Martin Höller
The <rich:dropDownMenu> component seems broken, when used in the header-fact of a <rich:tab>. The menu simply doesn't open. Here is simplified example-code to reproduce:
{code:xml}
<rich:tabPanel switchType="client">
<rich:tab>
<f:facet name="header">
<rich:dropDownMenu showEvent="mouseover" label="menu" mode="client">
<rich:menuItem>
<a4j:commandLink value="menuItem" />
</rich:menuItem>
</rich:dropDownMenu>
</f:facet>
</rich:tab>
</rich:tabPanel>
{code}
If I use the same menu-code in the <rich:tab> but outside the header-facet, it works.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months
[JBoss JIRA] (RF-13713) Create Smoke test(s) for chart in RF 4.5
by Matej Novotny (JIRA)
Matej Novotny created RF-13713:
----------------------------------
Summary: Create Smoke test(s) for chart in RF 4.5
Key: RF-13713
URL: https://issues.jboss.org/browse/RF-13713
Project: RichFaces
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Components: component-output
Affects Versions: 4.5.0.Alpha2
Reporter: Matej Novotny
Assignee: Matej Novotny
Priority: Minor
Fix For: 4.5.0.Alpha2
As charts were added recently we have no tests covering this component.
We need to have at least some smoke test too quickly determine when something goes wrong. Rest can be tested in Metamer.
These tests might run only with some browsers - investigate.
Also test JS API because it will be needed in order to test listeners.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 7 months