[GLASSFISH-17831] Second submit (commandButton) fails in nested composites Created: 25/Nov/11  Updated: 12/Nov/12  Resolved: 12/Nov/12

Status: Closed
Project: glassfish
Component/s: jsf
Affects Version/s: 3.1.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: keesbroenink Assignee: rogerk
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File NestedComposites.war    
Issue Links:
is related to JAVASERVERFACES-2589 Second submit (commandButton) fails i... Closed
Tags: 3_1_2-exclude


I have developed a set of components using composites. I have layout components (<div>) and a button composite (h:commandButton). When hitting the button the action method is executed. The action does not lead to a different page. When hitting the button again the action method is not executed.

I have found this problem in JSF 2.1.3-FCS with GlassFish 3.1.1.

Comment by rogerk [ 25/Nov/11 ]

Can you please provide a test case (small app) that demonstrates this issue?

Comment by keesbroenink [ 25/Nov/11 ]

Hi Roger,
Please ignore the first attached file and look at the second (smaller) one. I have discovered the line of code that creates the problem. In the composite button.xhtml the last line is:

<h:outputStylesheet library="nl/test" name="button.css" />

Is you remove this line the submit works correctly.

Comment by keesbroenink [ 25/Nov/11 ]

I have deleted the first big attachment already myself.

Comment by rogerk [ 28/Nov/11 ]

You have not included the managed bean source file that is referenced in the index.xhtml page.
I will assume that there is no special logic in these methods, and I can create a simple bean with simple metbods for testing.

Comment by keesbroenink [ 28/Nov/11 ]

Yes, sorry about that. The Java class is indeed trivial. The action method returns null or empty string.

Comment by rogerk [ 28/Nov/11 ]

Can you tell me why button.css is not a stylesheet? You have this as composite component markup which makes no sense.

Comment by keesbroenink [ 28/Nov/11 ]

I have button.css as an empty file. But you can put some style in it. It is not meants as markup. That is button.xhtml.

Comment by rogerk [ 29/Nov/11 ]

I've discovered that the action event is never queued for the second button click.
When the page is first rendered, the id of the button is:
After the first button click, the id of the button is:
So the ButtonRenderer.decode method is looking for j_idt7:j_idt9:j_idt10:button as a request parameter
(on postback), but it is j_idt10:button - so the action event is never queued.

Comment by rogerk [ 29/Nov/11 ]

Target subsequent release - too risky for this release and there is a workaround.

Comment by Manfred Riem [ 12/Nov/12 ]

See the associated JAVASERVERFACES issue for resolution.

Generated at Sat Apr 30 18:40:15 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.