Drop zone inside an other dropzone
nfeybesse Dec 15, 2008 3:34 PMHi
When a dragzone2 is inside a dragzone1 : no problem.
When a dropzone2 is inside a dropzone1 : only dropzone1 is seen by richfaces.
Here is a simple code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich">
<body>
<f:view>
<rich:panel>
<rich:dragIndicator id="indicator" />
<a:form id="form">
<rich:panel>
<f:facet name="header">
<h:outputText value="dragzone1" />
</f:facet>
<rich:dragSupport dragIndicator=":indicator" dragType="zone"
dragValue="dragzone1">
<rich:dndParam name="label" value="dragzone1" />
</rich:dragSupport>
<rich:panel>
<f:facet name="header">
<h:outputText value="dragzone2" />
</f:facet>
<rich:dragSupport dragIndicator=":indicator" dragType="zone"
dragValue="dragzone2">
<rich:dndParam name="label" value="dragzone2" />
</rich:dragSupport>
<h:outputText value="dragzone2" />
</rich:panel>
<h:outputText value="dragzone1" />
</rich:panel>
<rich:panel>
<f:facet name="header">
<h:outputText value="dropzone1" />
</f:facet>
<rich:dropSupport acceptedTypes="zone" dropValue="dropzone1"
dropListener="#{test.processDrop}" />
<rich:panel>
<f:facet name="header">
<h:outputText value="dropzone2" />
</f:facet>
<rich:dropSupport acceptedTypes="zone" dropValue="dropzone2"
dropListener="#{test.processDrop}" />
<h:outputText value="dropzone2" />
</rich:panel>
<h:outputText value="dropzone1" />
</rich:panel>
</a:form>
</rich:panel>
</f:view>
</body>
</html>
And backbean :
public void processDrop(DropEvent dropEvent){
log.info("processDrop on : "+this);
log.info("Drag value : "+dropEvent.getDragValue());
log.info("Drop value : "+dropEvent.getDropValue());
}
This example shows dropzone2 is not visible.
Dragzone2 is visble.
My question is :
Is it difficult to change this feature ?
Thanks in advance.
NF