I have in my code:
So the question is why my code works well with HTML but not with JSF tags? Do you think is better using Dynamic Faces (JSF Ajax Extension)? To many options but I don't know what way to choose and my time is running out. They gave me an opportunity but need results!
Could you give a hand to a newbie JSF programmer? Thanks!
Mmm, I haven't played enough with JSF so I don't know if there is any way to clean the ids. What you could do without digging the Web is this:
Hope you get the idea. I'd recommend changing indexOf to a regexp to specify that there is nothing after the id parameter (with indexOf you can get more than one element if their ids is like "myEl01one", "myEl01two"). And of course since with this code you'll through every element on the page it can be slow if you use it with high frequency in you algorithm.
Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
Joined: Jul 30, 2005
Ok...I got your idea. I'll do my homework filtering the ids.
2) in the web.xml add
3) Add the followint to my page JSF page:
4) and finally in the form tag:
This new attribute in JavaServer Faces 1.2 technology advises the JavaServer Faces runtime to not prepend any naming container IDs to your component IDs within the form. The result is that the IDs you type in the markup are the actual ones that appear in the page.
Taken from the article i mentioned before and it works!
Samuel March wrote:Did you supply your own id to the form???
next is the result............
Hmm, I always had the ids this way and I always supplied the form id. So I don't know what's wrong or if there is anything wrong at all. JSF and especially Richfaces generate many elements to display one simple field and almost each elements has its id generated.
Joined: Jul 30, 2005
You're right... I supplied an id to the form and then I called it the way you said (formId:elementId) and it works as well. The first time I did it I made a mistake given a no unique id to the form...now I realized about that. Anyway with JSF Extension(Ajax) allow me to add Ajax functionality to JSF's components.
A new task has arised ... How to use Dynamic Faces in my project...too many doubts . I'm on my way...