eclipse-ee4j / mojarra-jsf-extensions

Other
1 stars 3 forks source link

AjaxZone With SelectOne #24

Closed glassfishrobot closed 17 years ago

glassfishrobot commented 17 years ago

I have a very simple jsp page:

The managed bean sets a default color of "blue". When the selectone component displays I see "blue" displayed rom the outputText component. However, when I select another color from the selectOne list, say, "Red", the outputText still says "blue". Subsequent selections appear to work - so it appears to not work just on the selection. #### Environment Operating System: All Platform: All #### Affected Versions [current]
glassfishrobot commented 5 years ago
glassfishrobot commented 17 years ago

@glassfishrobot Commented Reported by rogerk

glassfishrobot commented 17 years ago

@glassfishrobot Commented @edburns said: Roger, thanks for reporting this. I'll look at it.

glassfishrobot commented 17 years ago

@glassfishrobot Commented rogerk said: More Information:

This only seems to happen after a page refresh. After a page refresh (either from the page displaying for the first time, or, after a buttn press that redisplays the same page), it seems that only the first ajaxZone is being sent as can be seen from this:

http://localhost:8080/ajaxzone1/home.jsf;jsessionid=2f15617856d005f1c5767a2fb88

POST /ajaxzone1/home.jsf;jsessionid=2f15617856d005f1c5767a2fb88 HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20 061025 Firefox/1.5.0.8 Accept: text/javascript, text/html, application/xml, text/xml, / Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: close X-Requested-With: XMLHttpRequest X-Prototype-Version: 1.5.0_rc1 Content-Type: application/x-www-form-urlencoded com.sun.faces.avatar.Partial: true com.sun.faces.avatar.Render: form:zone1 Content-Length: 82 Cookie: JSESSIONID=2f15617856d005f1c5767a2fb88 Pragma: no-cache Cache-Control: no-cache options=%5Bobject%20Object%5D&javax.faces.ViewState=j_id1%3Aj_id2&form:menu=yell ow HTTP/1.x 200 OK X-Powered-By: Servlet/2.5, JSF/1.2, JSP/2.1 Cache-Control: no-cache Content-Type: text/xml;charset=ISO-8859-1 Content-Language: en-US Date: Tue, 28 Nov 2006 15:01:34 GMT Server: Sun Java System Application Server Platform Edition 9.0_01 Connection: close

After subsequent choices from the selectOneMenu component, both zones are sent correctly:

http://localhost:8080/ajaxzone1/home.jsf;jsessionid=2f15617856d005f1c5767a2fb88

POST /ajaxzone1/home.jsf;jsessionid=2f15617856d005f1c5767a2fb88 HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20 061025 Firefox/1.5.0.8 Accept: text/javascript, text/html, application/xml, text/xml, / Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: close X-Requested-With: XMLHttpRequest X-Prototype-Version: 1.5.0_rc1 Content-Type: application/x-www-form-urlencoded com.sun.faces.avatar.Partial: true com.sun.faces.avatar.Render: form:zone1,form:zone2 Content-Length: 79 Cookie: JSESSIONID=2f15617856d005f1c5767a2fb88 Pragma: no-cache Cache-Control: no-cache options=%5Bobject%20Object%5D&javax.faces.ViewState=j_id1%3Aj_id3&form:menu=red HTTP/1.x 200 OK X-Powered-By: Servlet/2.5, JSF/1.2, JSP/2.1 Cache-Control: no-cache Content-Type: text/xml;charset=ISO-8859-1 Content-Language: en-US Date: Tue, 28 Nov 2006 15:03:39 GMT Server: Sun Java System Application Server Platform Edition 9.0_01 Connection: close

glassfishrobot commented 17 years ago

@glassfishrobot Commented @edburns said: Thanks for sharing the HTTP output.

glassfishrobot commented 17 years ago

@glassfishrobot Commented @edburns said: Created an attachment (id=7) Sample ware source

glassfishrobot commented 17 years ago

@glassfishrobot Commented @edburns said: I can reproduce this. I have attached my sample war.

glassfishrobot commented 17 years ago

@glassfishrobot Commented @edburns said: I have discovered the cause of the problem. It's a bug in com_sun_faces_ajaxZone.js. If you place zone2 before zone1 in the page, it works. This is because the zoneList isn't populated until it is encountered.

I'm working on a fix now.

glassfishrobot commented 17 years ago

@glassfishrobot Commented @edburns said: Created an attachment (id=8) Fix for this bug, first iteration

glassfishrobot commented 17 years ago

@glassfishrobot Commented rogerk said: r=rogerk

glassfishrobot commented 17 years ago

@glassfishrobot Commented @edburns said: Fix checked in.

glassfishrobot commented 17 years ago

@glassfishrobot Commented File: cvslog.txt Attached By: @edburns

glassfishrobot commented 17 years ago

@glassfishrobot Commented File: rogerk-24.tar.gz Attached By: @edburns

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JSF_EXTENSIONS-24

glassfishrobot commented 17 years ago

@glassfishrobot Commented Marked as fixed on Tuesday, November 28th 2006, 4:15:42 am