-
15. Re: Example with source code for using ajax4jsf with DataTab
sergeysmirnov May 1, 2007 4:16 AM (in response to sreejag)"change()" method does manual processing (validation and model update) for input field.
And again, you do not need it this at all, if other field passes the validation successfully. Processing performs automatically.
No need to update selectItems explicitly. The list depends of the model that is changed by input fields.
rich:dataTable and a4j:repeat have ajaxKeys attribute where you can define what rows should be updated. If this attribute is not defined, the current row is updated. -
16. Re: Example with source code for using ajax4jsf with DataTab
sreejag May 1, 2007 4:52 AM (in response to sreejag)No need to update selectItems explicitly. The list depends of the model that is changed by input fields.
I did not understand this part. The input field in my case is "accountNumber". Now, when the user tabs out of this field, the "change()" method is called. In this change method, should i update the entire DataTable? If i update the DataTable, then <a4j:repeat> just updates the current row ONLY.
is this right? -
17. Re: Example with source code for using ajax4jsf with DataTab
sreejag May 1, 2007 9:58 AM (in response to sreejag)Now, i am not even able to run the application. When the server starts up, it says that "Could not parse the faces-config.xml in META-INF" of ajax4Jsf jar files.
I researched about this problem, but did not find a clear solution yet.
any help? -
18. Re: Example with source code for using ajax4jsf with DataTab
sreejag May 1, 2007 1:17 PM (in response to sreejag)Sergey, can you help me please?
-
19. Re: Example with source code for using ajax4jsf with DataTab
sergeysmirnov May 1, 2007 1:40 PM (in response to sreejag)sounds like a problem with version of XML parser shipped with JDK. If it is on your local machine, reinstall JDK.
-
20. Re: Example with source code for using ajax4jsf with DataTab
sreejag May 1, 2007 1:46 PM (in response to sreejag)Sergey, the weird thing is, the jars worked fine earlier, but all of a sudden it started giving me this problem and it doesn't work anymore now.
Can you tell me if i understood your previous post correctly:
The input field in my case is "accountNumber". Now, when the user tabs out of this field, the "change()" method is called. In this change method, should i update the entire DataTable? If i update the DataTable, then <a4j:repeat> just updates the current row ONLY.
is this right? -
21. Re: Example with source code for using ajax4jsf with DataTab
sergeysmirnov May 1, 2007 1:51 PM (in response to sreejag)no. In your case you do not have updateBean at all. Also, you do not need binding and action attribute. It should work without them.
-
22. Re: Example with source code for using ajax4jsf with DataTab
sreejag May 1, 2007 1:54 PM (in response to sreejag)it's confusing. How will the values (these should come from the Database) be populated automatically when we change the value of the accountNbr?
also, to which method will this submit go to?
I really appreciate all your time and effort in making this clear to me Sergey. -
23. Re: Example with source code for using ajax4jsf with DataTab
sergeysmirnov May 1, 2007 2:12 PM (in response to sreejag)It is a role of data model how you sync with data base.
Solving two problems at the same time might be complicated for you. So, Complete your example without A4J, first. As soon it is done, you can add Ajax than. -
24. Re: Example with source code for using ajax4jsf with DataTab
sreejag May 1, 2007 2:14 PM (in response to sreejag)Sergey,
I actually finished the implementation without Ajax. I used a valueChangeListener for the accountNumber field and populated the entire row.
But now, i have to use AJAX because the client doesn't want to refresh the screen. -
25. Re: Example with source code for using ajax4jsf with DataTab
sergeysmirnov May 1, 2007 2:16 PM (in response to sreejag)so, post your current code snippet. The one above has no valueChangeListener