-
1. Re: Problem with Ajax and injection with radio boxes
dhinojosa Jan 30, 2008 10:05 PM (in response to kasim)Sure, Post the page
-
2. Re: Problem with Ajax and injection with radio boxes
kasim Jan 31, 2008 8:50 AM (in response to kasim)
Ok here we go .... in the display page:<rich:listShuttle sourceValue="#{customFlow.searchTypeList}" targetValue="#{searchTypesOrder}" var="item" listHeight="300" listWidth="300" sourceCaptionLabel="Available Items" targetCaptionLabel="Currently Active Items" fastOrderControlsVisible="false" orderControlsVisible="false" showButtonLabels="false"> <h:column> <h:outputText value="#{item}"/> </h:column> <a:support event="onlistchanged" actionExpression="#{customFlow.test}" reRender="bondStereoPanel" /> </rich:listShuttle>
Which btw the action expression never seems to do anything, i even tried actionListener, neither call the server.
But ... the reRender calls ..<a:outputPanel id="bondStereoPanel"> <h:selectOneRadio id="bondOption" class="style3" disabled="#{customFlow.stereoDisabled}" value="#{bondOption}"> <f:selectItem id="item1" itemLabel="Yes" itemValue="Y" /> <f:selectItem id="item2" itemLabel="No" itemValue="N" /> </h:selectOneRadio> </a:outputPanel>
.... then this is the bondOption@In(required = false) private String bondOption = "";
-
3. Re: Problem with Ajax and injection with radio boxes
kasim Jan 31, 2008 8:50 AM (in response to kasim)
Dangit sorry about hte junky cut and pastign -
4. Re: Problem with Ajax and injection with radio boxes
pmuir Feb 3, 2008 5:29 PM (in response to kasim)Bind to a property like
#{controller.bondOption} - injection doesn't play well with JSF input controls. -
5. Re: Problem with Ajax and injection with radio boxes
kasim Feb 3, 2008 6:42 PM (in response to kasim)"pete.muir@jboss.org" wrote:
Bind to a property like
#{controller.bondOption} - injection doesn't play well with JSF input controls.
Ok .. yeah i actually that done before.
Just to clarify though. I still will mark the bondOption with @In since i want to put it on a stateless session bean. -
6. Re: Problem with Ajax and injection with radio boxes
pmuir Feb 3, 2008 6:51 PM (in response to kasim)Err. No. Make the bean stateful. What you are suggesting won't work afaics.
-
7. Re: Problem with Ajax and injection with radio boxes
kasim Feb 4, 2008 8:37 AM (in response to kasim)
Pete>
Just out of curiosity ... i thought the @In was specifically supposed to be used with input controls? I mean i guess you can inject other beans in there.
The rest of the code actually works, and this will even work as long as its enabled when one first goes to the page. Or am i misunderstanding what you mean by "jsf input controls" -
8. Re: Problem with Ajax and injection with radio boxes
pmuir Feb 4, 2008 8:42 AM (in response to kasim)No, you need to use #{foo.bar} with input controls, otherwise a lot of JSF will break.
-
9. Re: Problem with Ajax and injection with radio boxes
kasim Feb 4, 2008 9:42 AM (in response to kasim)"pete.muir@jboss.org" wrote:
No, you need to use #{foo.bar} with input controls, otherwise a lot of JSF will break.
I changed the bean to Stateful .. and the same issue exists.
When the item is not initialized initially on the page the ajax call wont notice it when it gets enabled. -
10. Re: Problem with Ajax and injection with radio boxes
kasim Feb 4, 2008 9:47 AM (in response to kasim)
Pete - never mind ... as long as i initialize the value first it seems to be fine. -
11. Re: Problem with Ajax and injection with radio boxes
kasim Feb 4, 2008 10:13 AM (in response to kasim)
lol .... nope striek that ... it will never switch the value :(