-
1. Drag and Drop not working in subview mode
boy18nj Mar 3, 2011 5:36 PM (in response to muneeswaranbalu)please post the code, snapshots also if any.
-
2. Re: Drag and Drop not working in subview mode
muneeswaranbalu Mar 3, 2011 8:29 PM (in response to boy18nj)Hi,
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>
<html>
<f:view>
<f:subview id="s">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DnD In Panel Sample</title>
<style>
.panelc {
width: 25%;
vertical-align:top;
}
.dropTargetPanel {
width: 90%;
}
.footerClass {
text-align: center;
padding-top: 5px;
}
.cols
{
width: 200px;
}
</style>
</head>
<body>
<rich:dragIndicator id="indicator" />
<h:form id="form" binding="#{DndInPanel.initForm}">
<h:panelGrid columnClasses="panelc" columns="2" width="100%">
<rich:panel>
<%--Source Table--%>
<rich:dataTable id="sourceTable" columns="4" rows="20"
columnClasses="cols,cols,cols,cols" value="#{DndInPanel.dndInPanelList}"
var="dt" rowKeyVar="rowIndex">
<%--Column 1--%>
<h:column>
<%--Drop Target Panel--%>
<rich:panel styleClass="dropTargetPanel" style="border:none;">
<%--Drop Support--%>
<rich:dropSupport id="php" acceptedTypes="text,label" dropValue="1"
dropListener="#{DndInPanel.processDrop}"
reRender="phptable, src">
</rich:dropSupport>
<%--Table1--%>
<rich:dataTable id="phptable" columns="1" value="#{dt.value1}" var="fm"
style="border:none">
<h:column>
<a4j:outputPanel id="phptable" style="width:auto;border:1px solid gray;padding:2px"
layout="block">
<%--Values--%>
<h:outputText value="#{fm.value}" rendered="#{!DndInPanel.textRendered}"/>
<h:inputText value="#{fm.value}" rendered="#{DndInPanel.textRendered}"/>
</a4j:outputPanel>
</h:column>
</rich:dataTable>
</rich:panel>
</h:column>
</rich:dataTable>
</rich:panel>
<%--Source List Panel--%>
<rich:panel style="width:133px">
<%--Header--%>
<f:facet name="header">
<h:outputText value="Source List" />
</f:facet>
<%--Body--%>
<rich:dataTable id="src" columns="1" value="#{DndInPanel.nameList}"
var="fm" footerClass="footerClass">
<h:column>
<a4j:outputPanel style="width:auto;border:1px;"
layout="block">
<%--Drag Support--%>
<rich:dragSupport dragIndicator=":indicator"
dragType="#{fm.type}" dragValue="#{fm}">
<rich:dndParam name="label" value="#{fm.value}" />
</rich:dragSupport>
<h:outputText value="#{fm.value}"></h:outputText>
</a4j:outputPanel>
</h:column>
</rich:dataTable>
</rich:panel>
</h:panelGrid>
</h:form>
<a4j:outputPanel ajaxRendered="true">
<h:messages></h:messages>
</a4j:outputPanel>
</body>
</f:subview>
</f:view>
</html>
In the above code,if u remove subview tag,its works fine.But if subview tag is there it not work fine according to GUI.The symbols not avail anymore.
-
3. Drag and Drop not working in subview mode
boy18nj Mar 3, 2011 9:59 PM (in response to muneeswaranbalu)i don't understand why you need to use f:subview,
this is the proper use of f:subview, example-
<f:subview id="next">
<jsp:include page="next.jsp" />
</f:subview> -
4. Re: Drag and Drop not working in subview mode
muneeswaranbalu Mar 4, 2011 12:11 AM (in response to boy18nj)Hi Aman,
I have used f:subview in my application like your suggestion.