-
1. Re: duplicate Id for a component _id0 from dnd example
jokerdude Sep 2, 2008 7:22 PM (in response to jokerdude)This is the exact code I'm using in my facelet adapted from that example - I added id's everywhere seeing if that would solve anything but no luck:
<rich:dragIndicator id="indicator" /> <form id="form1" name="form1" method="post" action="/app/demo_doc.xhtml" enctype="application/x-www-form-urlencoded"> <h:panelGrid columnClasses="panelc" columns="4" width="100%"> <rich:panel style="width:133px"> <f:facet id="1" name="header"> <h:outputText value="Source List" /> </f:facet> <h:dataTable id="src" columns="1" value="#{BackingBean.Dto.people}" var="fm" footerClass="footerClass"> <h:column> <a4j:outputPanel style="width:100px;border:1px solid gray;padding:2px" layout="block"> <rich:dragSupport dragIndicator=":indicator" dragType="text" dragValue="#{fm}"> <rich:dndParam name="label" value="#{fm.lastname}" /> </rich:dragSupport> <h:outputText id="blah14" value="#{fm.lastname}"></h:outputText> </a4j:outputPanel> </h:column> </h:dataTable> </rich:panel> <rich:panel id="blah1" styleClass="dropTargetPanel"> <f:facet id="2" name="header"> <h:outputText value="PHP Frameworks" /> </f:facet> <rich:dropSupport id="php" acceptedTypes="text" dropValue="PHP" dropListener="#{BackingBean.addPerson}" reRender="phptable"> </rich:dropSupport> <h:dataTable id="phptable" columns="1" value="#{BackingBean.Dto.people}" var="fm"> <h:column> <h:outputText id="blah13" value="#{fm.firstname}"></h:outputText> </h:column> </h:dataTable> </rich:panel> </h:panelGrid> </form>
-
2. Re: duplicate Id for a component _id0 from dnd example
nbelaevski Sep 3, 2008 6:21 PM (in response to jokerdude)Hello,
Can you please add bean code also? -
3. Re: duplicate Id for a component _id0 from dnd example
jokerdude Sep 4, 2008 3:27 PM (in response to jokerdude)Sure, not sure if it will help any - it's just a managed bean with session scope - here is the method mapped to dropevent:
public void addPerson(DropEvent event) { System.out.println("ADDING CONTACT!"); getDto().addPerson(new Person("Firstname","Last","test")); System.out.println("ADDED CONTACT!"); System.out.println("SIZE: +getDto().getPeople().size()); }
The debugging output to console when I drop items shows the code is correctly incrementing the size count of the list (and as I said, when I do a manual refresh after dropping a few items in IE, I correctly see the updated list contents with the "Firstname Last" names displayed). -
4. Re: duplicate Id for a component _id0 from dnd example
nbelaevski Sep 4, 2008 9:04 PM (in response to jokerdude)Have you tried using h:form instead of form?
-
5. Re: duplicate Id for a component _id0 from dnd example
jokerdude Sep 5, 2008 11:46 AM (in response to jokerdude)Yeah, when I tried h:form got same error behavior but then when I did the manual refresh in IE, I got the error page with the jsf component stacktrace (which I always get in FF, but as I said, in IE when I was using just form and did the manual refresh, the page did correctly show the updated list values I had modified). Not sure if this matters at all, but I've also had to comment out the org.apache.myfaces.webapp.StartupServletContextListener listener-class in web.xml; my app breaks completely when I have both that and richfaces.