-
1. Re: DragSupport: using the drag element as the indicator
ilya_shaikovsky Nov 22, 2010 6:05 AM (in response to harpritt)pretty simple. At first you could redefine the complete markup of indicator using "single" facet. The it will not be added with default label-icon markup. And the second point - dndparam accepts not only value but also nested content definitions. So I modified livedemo example locally and it works as you need:
<rich:dragIndicator id="indicator2" ><f:facet name="single">{content}</f:facet></rich:dragIndicator><rich:dragIndicator id="indicator2" >
<f:facet name="single">
{content}
</f:facet>
</rich:dragIndicator>
<a4j:outputPanel
style="width:100px;border:1px solid gray;padding:2px"
layout="block">
<rich:dragSupport dragIndicator=":indicator2"
dragType="#{fm.family}" dragValue="#{fm}">
<rich:dndParam name="content">
<a4j:outputPanel
style="width:100px;border:1px solid gray;padding:2px"
layout="block">
<h:outputText value="#{fm.name}"></h:outputText>
</a4j:outputPanel>
</rich:dndParam>
</rich:dragSupport>
<h:outputText value="#{fm.name}"></h:outputText>
-
2. Re: DragSupport: using the drag element as the indicator
harpritt Nov 22, 2010 6:32 AM (in response to ilya_shaikovsky)Cheers Ilya, thats fantastic. The example code really helps.
I was watching my brother use my app last night and noticed that he got a bit confused with the default icon.
thanks again
Harpritt