This combo is dependent on another combo selection.
I want to set default value based on the previous combo's selected value.
So in my Java code , I set like this
but it doesnt set the default value, even I can see proper value in Logs.
I have observed that whatever value I select manually, it is setted default every time.
You also need to reRender this component on selection of the previous drop down. Assign an id to this select one menu that you have here and use the reRender attribute on the previous drop down and give the id you just gave as its value. Something like reRender="theidname". I think that should work fine.
Vaibhav Mittal wrote:You also need to reRender this component on selection of the previous drop down. Assign an id to this select one menu that you have here and use the reRender attribute on the previous drop down and give the id you just gave as its value. Something like reRender="theidname". I think that should work fine.
Sorry, but I dont understand "reRender", see, my managed bean scope is "request" so it will refresh the page on each request, right? so in case of "onchange" of Drop down also it will refresh the whole page, right? so is it required to use "reRender"?
Vaibhav Mittal wrote:You also need to reRender this component on selection of the previous drop down. Assign an id to this select one menu that you have here and use the reRender attribute on the previous drop down and give the id you just gave as its value. Something like reRender="theidname". I think that should work fine.
Sorry, but I dont understand "reRender", see, my managed bean scope is "request" so it will refresh the page on each request, right? so in case of "onchange" of Drop down also it will refresh the whole page, right? so is it required to use "reRender"?
Vaibhav was referring to a feature of the RichFaces tagset that uses AJAX to do partial page rendering, not a full-page re-render like you're attempting.
JSF requires session-scope beans in places where other frameworks can get by with request-scope beans. That has to do with the JSF postback functionality and the fact that request-scope beans are destroyed and after use and re-created from scratch on the next request, losing things like datamodel objects in the process.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Vaibhav Mittal wrote:You also need to reRender this component on selection of the previous drop down. Assign an id to this select one menu that you have here and use the reRender attribute on the previous drop down and give the id you just gave as its value. Something like reRender="theidname". I think that should work fine.
Sorry, but I dont understand "reRender", see, my managed bean scope is "request" so it will refresh the page on each request, right? so in case of "onchange" of Drop down also it will refresh the whole page, right? so is it required to use "reRender"?
Vaibhav was referring to a feature of the RichFaces tagset that uses AJAX to do partial page rendering, not a full-page re-render like you're attempting.
JSF requires session-scope beans in places where other frameworks can get by with request-scope beans. That has to do with the JSF postback functionality and the fact that request-scope beans are destroyed and after use and re-created from scratch on the next request, losing things like datamodel objects in the process.
But what should I do to resolve this issue?
Please help...
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad: