Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Works as designed
Priority: Minor Minor
Assignee: Unassigned
Reporter: jasonzhang2002gmailcom
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

programagtically generated commandButton has only name, but no id.

Created: 02/Aug/12 02:50 AM   Updated: 05/Aug/12 09:39 AM   Resolved: 03/Aug/12 10:04 PM
Component/s: ajax
Affects Version/s: 2.2.0-m04
Fix Version/s: None

Time Tracking:
Not Specified



Participants: jasonzhang2002gmailcom and Manfred Riem

 Description  « Hide

I programatically created a command button. I did not set id and leave framework to assign id to it. This button has ajax behavior attached.

In client side, it has an generated name, but not id. My client framework(YUI 3) adds an ID to it. When ajax event is triggered, the javax.faces.source is set to client-generated ID. This client-generated ID does not correspond to any component in server. So action associated with button is not invoked.

As a workaround, I just explicitly set an ID to the button. By this way, both ID and name are presented in the client side.

I think the javax.faces.source should point to name attribute instead of ID attribute. Or you can generate both ID and name at server all the time.

Manfred Riem added a comment - 03/Aug/12 10:04 PM

Using the ID is specified by the documentation, see Note that if you think this is incorrect you should file a spec issue.

jasonzhang2002gmailcom added a comment - 05/Aug/12 09:39 AM

This is not a spec issue.
JSF at client side can defifinitely use ID. But server should make sure ID is generated besides the name.