This code:
public void handleRadio1ValueChange(ValueChangeEvent valueChangedEvent)
{
System.out.println("Value Change Event
is"+valueChangedEvent.getSource().toString());
}
doesn't match what you have for your valueChangeListener.
tri:selectOneRadio id ="radio" required="yes"
styleClass="selectOneRadio"
valueChangeListener= "#{editItemBean.
idHasChanged}"
immediate="true"
partialSubmit="true"
autoSubmit = "true">
The valueChangedListener attribute should be:
valueChangeListener= "#{editItemBean.handleRadio1ValueChange}"
-R
On 4/16/08, Nutulapati, Krishna <[EMAIL PROTECTED]> wrote:
>
> Hi Richard,
> Thanks for your help.
> I tried it in the way you suggested.
> Here is my jsf code
> <h:column id="column1">
> <f:facet name="header">
> <h:outputText styleClass="itemListHeader"
> value="SEL"
> id="testRadio">
> </h:outputText>
> </f:facet>
>
>
> <tri:selectOneRadio id ="radio" required="yes"
> styleClass="selectOneRadio"
> valueChangeListener= "#{editItemBean.
> idHasChanged}"
> immediate="true"
> partialSubmit="true"
> autoSubmit = "true">
> </tri:selectOneRadio >
> </h:column>
>
>
>
>
> Here is my java code
>
>
> public void handleRadio1ValueChange(ValueChangeEvent valueChangedEvent)
> {
> System.out.println("Value Change Event
> is"+valueChangedEvent.getSource().toString());
> }
>
>
> I'm getting the following exception.
> javax.el.ELException: /EditItem.jsp: Bean:
> com.ussco.substitution.view.bean.EditItemBean, property: idHasChanged
> at
> com.sun.facelets.compiler.AttributeInstruction.write(AttributeInstructio
> n.java:53)
> at
> com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java
> :39)
> at
> org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.jav
> a:441)
> at
> org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.
> java:427)
> at
> org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.jav
> a:448)
> at
> org.apache.myfaces.renderkit.html.HtmlTableRendererBase.renderColumnBody
> (HtmlTableRendererBase.java:195)
> at
> org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeColumnChil
> d(HtmlTableRendererBase.java:168)
> at
> org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(
> HtmlTableRendererBase.java:154)
> at
> org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(H
> tmlTableRendererBase.java:94)
> at
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.jav
> a:735)
> at
> com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSuppo
> rt.java:244)
> at
> com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSuppo
> rt.java:249)
> at
> com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSuppo
> rt.java:249)
> at
> com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:5
> 94)
> at
> com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.
> java:87)
> at
> com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
> at
> com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
> at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
> at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:966)
> at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:907)
> at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
> ain.java:145)
> at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
> at
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
> anceWrapper.java:190)
> at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
> ain.java:130)
> at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
> hain.java:87)
> at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:701)
> at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:646)
> at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
> per.java:475)
> at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr
> apper.java:463)
> at
> com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
> at
> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
> at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811
> )
> at
> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1
> 433)
> at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:9
> 3)
> at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio
> n(HttpInboundLink.java:465)
> at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio
> n(HttpInboundLink.java:394)
> at
> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpIC
> LReadCallback.java:102)
> at
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(Ai
> oReadCompletionListener.java:152)
> at
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.
> java:213)
> at
> com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsync
> Future.java:195)
> at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
> at
> com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
> at
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java
> :741)
> at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
>
> Can you plese suggest me where I'm going wrong. How can I explore the
> syntaxes
> corresponding to even captruing methods in backing bean.
> I appreciate your help.
>
> Thanks
> Krishna.
>
> '
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Richard Yee [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 15, 2008 10:28 PM
> To: MyFaces Discussion
> Subject: Re: Please help me
>
> Krishna,
> In order to get help on a mailing list, I suggest that you use a subject
> line that is more descriptive of your problem.
>
> With that said, I suggest using the Trinidad selectOneRadio tag that has
> the autoSubmit attribute. If you set it to true, then your event
> listener will be called when the value changes. I'm not that familiar
> with the standard JSF selectOneRadio tag. You might be able to get the
> value to submit with an onlClick handler. In my opinion though, the
> tr:selectOneRadio with autoSubmit="true" and and a valueChangeListener
> is the easier way to go.
>
> -R
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Nutulapati, Krishna wrote:
> > Hello All,
> > I need to select one among many items through radio buttons, in jsf
> > and should able to track the selected item event to identify the item
> > in the backing bean.
> >
> > The backing been has to update the item details in the panel of same
> > jsf page, and I should able to Edit the item details and save them
> > back into the same database.
> >
> > The problem I have here is listening and capturing the events.
> >
> > Here is the radio button code I wrote in jsf
> >
> > <h:selectOneRadio id="radio1"
> > styleClass="selectOneRadio"
> > valueChangeListener="#{editItemBean.
> > handleRadio1ValueChange}"/>
> >
> > Here is the backing bean code.
> > public void handleRadio1ValueChange(ValueChangeEvent
> > valueChangedEvent) {
> > System.out.println("Value Change Event
> > is"+valueChangedEvent.getSource().toString());
> > }
> >
> >
> > The control is not coming to this backingbean, after clicking the
> > radio button.
> >
> > Please suggest me the solution.
> > Thanks
> > Krishna
> >
> >
> >
> >
>
>