-
1. Re: Using textInput inside a dataTable inside a form?
pmuir Dec 4, 2006 1:38 PM (in response to smokingapipe)What you have should work. Show the backing bean
-
2. Re: Using textInput inside a dataTable inside a form?
smokingapipe Dec 4, 2006 4:05 PM (in response to smokingapipe)I set up a simplified test case, which did work. Now I need to figure out what is going on with my more complicated real use to see why that isn't working.
-
3. Re: Using textInput inside a dataTable inside a form?
smokingapipe Dec 4, 2006 4:48 PM (in response to smokingapipe)Now I don't think it's in my code. I have checked it over. I have it working in a test case but not in a case where the entities are actually persistent. Hmm. Seam holds great promise, but for now is fragile and has almost no possibility of debugging these things. There's no way to tell which objects are being handled in the page or what is happening in the assign values phase of JSF.
-
4. Re: Using textInput inside a dataTable inside a form?
smokingapipe Dec 4, 2006 5:12 PM (in response to smokingapipe)I'm now thinking that this is a bug in JBoss' JSF implementation. The restore view phase isn't even happening on the form. I'm trying to make a test case for this.
-
5. Re: Using textInput inside a dataTable inside a form?
pmuir Dec 4, 2006 5:54 PM (in response to smokingapipe)I'm 99% that it is no bug (which is the default JBoss JSF impl). It's also highly unlikely that it is the persisting of objects that is causing this.
I notice that you don't show a h:messages component. Are you sure that there are no validation/conversion errors on your form? -
6. Re: Using textInput inside a dataTable inside a form?
pmuir Dec 4, 2006 5:54 PM (in response to smokingapipe)sorry, I meant
that it is no bug in Myfaces -
7. Re: Using textInput inside a dataTable inside a form?
smokingapipe Dec 4, 2006 6:33 PM (in response to smokingapipe)I put in: <h:messages globalOnly="false"/> after the table, and get no messages. I also turned off all the validation in the various classes. This is 99% a bug in the JSF implementation. There's no reason why it shouldn't hit the "update model values" phase, because if it were dying in the process validations phase, there would be some type of message, right? Surely with all the advanced features of Seam and JSF there's some way for it tell me which phase it's in, what it's doing, etc? In any normal programming system you can trace the values of variables.
-
8. Re: Using textInput inside a dataTable inside a form?
pmuir Dec 4, 2006 6:43 PM (in response to smokingapipe)"SmokingAPipe" wrote:
I put in: <h:messages globalOnly="false"/> after the table, and get no messages. I also turned off all the validation in the various classes. This is 99% a bug in the JSF implementation.
I think you need to produce a simple runnable test case then.There's no reason why it shouldn't hit the "update model values" phase, because if it were dying in the process validations phase, there would be some type of message, right?
There would be a message in h:messages, yes.Surely with all the advanced features of Seam and JSF there's some way for it tell me which phase it's in, what it's doing, etc? In any normal programming system you can trace the values of variables.
Sorry, I'm not in front of the right computer atm so can't give you details but you can do this by attaching a debugger into myfaces.
Also, I've just noticed that you are using tomahawk. You would be much better stripping all that out and reproducing this with just h: components -
9. Re: Using textInput inside a dataTable inside a form?
pmuir Dec 4, 2006 6:45 PM (in response to smokingapipe)If the restore view phase isn't happening you do have something weird going on...
-
10. Re: Using textInput inside a dataTable inside a form?
smokingapipe Dec 4, 2006 7:34 PM (in response to smokingapipe)Ok, following your suggestion, I removed all the Tomahawk components. Somehow they were working when they shouldn't have been. I removed all of them, and made it only one column, to just display (no input) the field I want to display, and I get an exception with this cause:
"value of context variable is not an instance of the component bound to the context variable"
So I am doing something wrong, I just need to figure out what it is. If I can figure that out, I can probably go back to the Tomahawk components, or whatever, but at least it will be working.
This whole system has so many pitfalls. Right now, if there's any error in a Servlet / JSP type of system, I can look at it and know where the error is within five minutes, because I'm so familiar with it. I feel like with the Seam world right now there are so many new things I'm unsure of where to begin to track bugs down. -
11. Re: Using textInput inside a dataTable inside a form?
smokingapipe Dec 4, 2006 9:12 PM (in response to smokingapipe)I'm getting closer to it, and it is in fact a JSF bug.
-
12. Re: Using textInput inside a dataTable inside a form?
sherkan777 Dec 5, 2006 3:34 AM (in response to smokingapipe)I have same problem but I think when U use dataTable component is submited x times (x is size of your collection).
I made some example
private String tagName;
private List tagList;
<h:dataTable var="answers" value="#{answerList}" >
<h:column>
<h:outputText id="a1" value="#{answers.answer}" escape="false"/>
<h:inputText value="#{showDetailedQuestionAction.tagName}"/>
<h:commandButton value="myButton" action="#{bbBean.action}"/>
</h:column>
</h:dataTable>
and method implemented in setter & getter for tagName;
public String getTagName() {
System.out.println("Get: " + this.tagName);
return tagName;
}
public void setTagName(String tagName) {
System.out.println("SET: " + this.tagName);
this.tagName = tagName;
}
and Result:
09:19:15,187 INFO [STDOUT] SET: null
09:19:15,203 INFO [STDOUT] SET:
09:19:15,203 INFO [STDOUT] SET:
09:19:15,203 INFO [STDOUT] SET: myInsertedString
09:19:15,203 INFO [STDOUT] Get:
09:19:15,203 INFO [STDOUT] Action method clicked
09:19:15,250 INFO [STDOUT] Get:
09:19:15,328 INFO [STDOUT] Get:
09:19:15,328 INFO [STDOUT] Get:
09:19:15,343 INFO [STDOUT] Get:
09:19:15,343 INFO [STDOUT] Get:
So, and on my final result I cant get my tagName, ony if I insert some string to last inputText.
Can anyone tell me how to get my tagName value? -
13. Re: Using textInput inside a dataTable inside a form?
sherkan777 Dec 5, 2006 3:36 AM (in response to smokingapipe)Result of my problem is to create form for each row...
-
14. Re: Using textInput inside a dataTable inside a form?
sherkan777 Dec 5, 2006 3:40 AM (in response to smokingapipe)My Propsion for smokingPipe problem, try to make somethink like this:
<t:dataTable id="invoiceTable" var="item" value="#{invoice.items}"> <t:column> <f:facet name="header"> <h:outputText value="Item name"/> </f:facet> <h:outputText value="#{item.name}"/> </t:column> <t:column> <f:facet name="header"> <h:outputText value="Quantity"/> </f:facet> <h:form> <h:inputText value="#{item.quantity}" size="5"/> <h:commandButton value="Update invoice" action="#{invoiceManager.update}"/> </h:form> </t:column> </t:dataTable>