如何使用RichFaces创建可拖动组件?

时间:2010-08-13 08:05:52

标签: jsf drag-and-drop richfaces ajax4jsf

我尝试制作可拖动的组件并且这样做我基于这个例子: http://livedemo.exadel.com/richfaces-demo/richfaces/dragSupport.jsf

我从这个例子开始,但该组件没有给出任何可拖动的指示:

    <!---------------- Indicator -------->
    <rich:dragIndicator id="indicator" />
    <h:form>
        <table border="0">
            <tr>
                <td valign="top"><rich:panel>
                    <rich:tree>
                        ...
                    </rich:tree>
                </rich:panel></td>
                <td valign="top"><rich:panel id="afficherTest">
                    <rich:dataGrid value="#{afficherTestBean.listTest}" var="test"
                        columns="2" elements="6" width="600px">
                        <rich:panel style="cursor: move">
                                   <!---------------draggable Zone-------------------->
                            <rich:dragSupport dragIndicator=":indicator"
                                dragType="#{test.nomTest}" dragValue="#{test.nomTest}">
                                <rich:dndParam name="label" value="#{test.nomTest}" />
                            </rich:dragSupport>
                            <f:facet name="header">
                                <h:outputText value="#{test.categorie}"></h:outputText>
                            </f:facet>
                            <h:panelGrid columns="2">
                                <h:outputText value="Nom Test:" styleClass="label"></h:outputText>
                                <h:outputText value="#{test.nomTest}" />
                                <h:outputText value="Description Test:" styleClass="label"></h:outputText>
                                <h:outputText value="{test.description}" />
                                <a4j:commandLink value="Ajouter"></a4j:commandLink>
                            </h:panelGrid>

                        </rich:panel>
                        <f:facet name="footer">
                            <rich:datascroller></rich:datascroller>
                        </f:facet>

                    </rich:dataGrid>
                </rich:panel></td>
            </tr>
        </table>

    </h:form>

    </html>

请帮我创建可拖动的组件,我需要你的帮助):'

0 个答案:

没有答案