How to set button disabled property based on backing bean method

JDeveloper 12c
I have a table and a button on the page. When user selects certain table row I want to enable/disable the button.
My backing bean (which has backing bean scope in the task flow where the page is) is
package view.backing;
public class Studybrowse {
    public Studybrowse() {
    public String b1_action() {
          //Do something here
        return null;
   public boolean b1_user_auth(){
       // Do something here to return true or false
        return true;
My button is something like this:
<af:button text="Do something" id="b4" action="#{backingBeanScope.Studybrowse.b1_action}"
               disabled="#{backingBeanScope.Studybrowse.b1_user_auth THIS DOES NOT WORK}"
               partialTriggers="t1"/>  
The first problem is in design time, it says: "Reference backingBeanScope.Studybrowse.b1_user_auth not found"
and in runtime, desired behavior does not work.
Any help is appreciated

Timo:
I changed my backing bean method like this:
    public Boolean isUserAuthorized(){
        // some code here that will return true or false, hardcode to true for now
        return true;
and the button disabled property like this:
           <af:button text="Go to Reports!" id="b5" action="#{backingBeanScope.Studybrowse.b1_action}"
                       disabled="#{backingBeanScope.Studybrowse.isUserAuthorized}"
                       partialTriggers="t1"/>                   
Still same problem in design time there is a warning and 500 error in runtime.
<Jan 22, 2014 11:36:15 AM CST> <Warning> <oracle.adf.view.rich.component.fragment.UIXRegion> <ADF_FACES-00009> <Error processing viewId: /studyBrowse URI: /studyBrowse.jsf actual-URI: null.
javax.el.PropertyNotFoundException: //C:/Documents and Settings/rade/Application Data/JDeveloper/system12.1.2.0.40.66.68/o.j2ee/drs/ADFOracleReports/ViewControllerWebApp.war/studyBrowse.jsff @41,46 disabled="#{backingBeanScope.Studybrowse.isUserAuthorized}": The class 'view.backing.Studybrowse' does not have the property 'isUserAuthorized'.
  at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
  at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
  at oracle.adfinternal.view.faces.renderkit.rich.ButtonRenderer.getDisabled(ButtonRenderer.java:436)
  at oracle.adfinternal.view.faces.renderkit.rich.ButtonRenderer.encodeAll(ButtonRenderer.java:270)
  at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1578)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
  at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1085)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
  at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:455)
  at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$1600(PanelGroupLayoutRenderer.java:30)
  at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:761)
  at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:653)
  at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:195)
  at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:326)
  at oracle.adfinternal.view.faces.taglib.region.IncludeTag$FacetWrapper.processFlattenedChildren(IncludeTag.java:683)
  at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:171)
  at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:326)
  at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:291)
  at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:366)
  at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1578)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
  at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1085)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
  at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3195)
  at oracle.adfinternal.view.faces.renderkit.rich.PageTemplateRenderer.encodeAll(PageTemplateRenderer.java:68)
  at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1578)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
  at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1085)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
  at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3195)
  at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer._encodeChildren(RegionRenderer.java:417)
  at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.encodeAll(RegionRenderer.java:228)
  at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1578)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
  at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1085)
  at oracle.adf.view.rich.component.fragment.UIXRegion.encodeEnd(UIXRegion.java:288)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
  at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3195)
  at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:275)
  at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1578)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
  at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1085)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
  at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3195)
  at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1473)
  at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1578)
  at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
  at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1085)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
  at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:102)
  at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
  at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101)
  at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101)
  at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:338)
  at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
  at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
  at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:170)
  at oracle.adfinternal.view.faces.lifecycle.ResponseRenderManager.runRenderView(ResponseRenderManager.java:52)
  at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1104)
  at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:389)
  at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:255)
  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
  at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
  at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
  at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
  at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
  at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
  at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
  at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
  at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
  at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
  at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:478)
  at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
  at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:478)
  at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:303)
  at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:208)
  at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
  at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
  at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
  at java.security.AccessController.doPrivileged(Native Method)
  at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
  at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
  at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
  at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
  at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
  at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
  at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:225)
  at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
  at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
  at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
  at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3367)
  at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3333)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
  at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
  at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2220)
  at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2146)
  at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124)
  at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
  at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
  at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
  at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
>
<Jan 22, 2014 11:36:15 AM CST> <Error> <javax.enterprise.resource.webcontainer.jsf.application> <BEA-000000> <Error Rendering View[/studyBrowse]
javax.el.PropertyNotFoundException: //C:/Documents and Settings/rade/Application Data/JDeveloper/system12.1.2.0.40.66.68/o.j2ee/drs/ADFOracleReports/ViewControllerWebApp.war/studyBrowse.jsff @41,46 disabled="#{backingBeanScope.Studybrowse.isUserAuthorized}": The class 'view.backing.Studybrowse' does not have the property 'isUserAuthorized'.
  at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
  at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
  at oracle.adfinternal.view.faces.renderkit.rich.ButtonRenderer.getDisabled(ButtonRenderer.java:436)
  at oracle.adfinternal.view.faces.renderkit.rich.ButtonRenderer.encodeAll(ButtonRenderer.java:270)
  at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1578)
  Truncated. see log file for complete stacktrace
>

Similar Messages

  • How open new browser in JSF after executing backing bean method

    hi All,
    Can you please tell me how to open a new browser after executing action method in bean.
    I have writen one java script function, i am passing the string url which i got from the backing bean action method.
    First of all i want to execute action method then only javascript function.
    waiting for your quick reply.
    thanks & regards
    bhushanam.

    hi,
    That command link in data table. The requirement is like this:
    I have datatable, the columns are
    1) <h:selectBooleanCheckbox ....
    2) <h:commandLink ....
    requirement 1:
    if user select the boolean check box and click the command link
    then I want to execute the backing bean action method , it returns string url and show in new browser window( popup window with toolbar ).
    requirement 2:
    if user not select the boolean check box and click the command link then I want to excute the backing bean action method, it returns string url and show in the same browser ( through navigation rule we can show that page.)
    Please look the below command link code.......
    <h:commandLink id="belegnr" onmousedown="return showPopupWindowForInvoiceForGraphicImage( '#{row.importKz}', '#{row.blnChecked}', '#{InvoiceMecBoxBean.printInvoiceFilePath}');" styleClass="input" style="color:blue" value="#{row.belegnr}" action="#{InvoiceMecBoxBean.editLinkAction}"/>
    Can u please give me the idea istead of command link can we use outputlink to fullfil the requirement?. Or any suggestion please......
    Here in my case commandlink value is differenet and after action the return value is different to show in new window. that is problem here.
    thanks & regards
    bhushanam.

  • How to reset RichSelectOneChoice in JSF form from backing bean method?

    resetValue() is not working in this case. So any other method to reset from backing bean?

    Did you store the component instance on a bean by selecting a “Binding” property of the “RichSelectOneChoice” component?
    yourPage.jspx:
       <af:selectOneChoice
    binding="#{myBean._selectOneChoice}">
      </af:selectOneChoice>myBean.java:
        private RichSelectOneChoice _selectOneChoice;
        public void set_selectOneChoice(RichSelectOneChoice _selectOneChoice) {
            this._selectOneChoice = _selectOneChoice;
        public RichSelectOneChoice get_selectOneChoice() {
            return _selectOneChoice;
        private void rerenderSelectOneChoice() {
            AdfFacesContext.getCurrentInstance().addPartialTarget(this._selectOneChoice);
    }

  • How to set button disabled wile processing radio button request.

    Hi,
    I have one panel gropu layout and inside that i am displaying radio buttons, select many check box and save button. Actually on change of radio button selection based on the value selected i am seltting some values selected in select many check box. the problem here is when we are changing selection for radio button and while it is in processing user can click on save button. so until the radio button change is complete we want to disable save button and once process is complete we want to enable save button.
    Please help me on this.
    Thanks in advance.

    Hi,
    try this
    <af:resource type="javascript">
            function enforcePreventUserInput(evt) {
                var popup = AdfPage.PAGE.findComponentByAbsoluteId('popupBusyPage');
                if (popup != null) {
                    AdfPage.PAGE.addBusyStateListener(popup, handleBusyState);
                    evt.preventUserInput();
            function handleBusyState(evt) {
                var popup = AdfPage.PAGE.findComponentByAbsoluteId('popupBusyPage');
                if (popup != null) {
                    if (evt.isBusy()) {
                        popup.show();
                    else {
                        popup.hide();
                        AdfPage.PAGE.removeBusyStateListener(popup, handleBusyState);
          </af:resource>
    <af:popup id="popupBusyPage" animate="false" contentDelivery="immediate"
                      autoCancel="disabled">
              <af:panelWindow id="d2" closeIconVisible="false" modal="false"
                              title="Processing"
                              titleIconSource="/images/processWind_ena.png"
                              contentHeight="10">
                <af:panelGroupLayout layout="horizontal" id="pgl2" halign="center">
                  <af:image source="/images/process_animation_blafplus.gif" id="i1"/>
                </af:panelGroupLayout>
              </af:panelWindow>
            </af:popup>add client listener tag to radiobutton
    <af:clientListener method="enforcePreventUserInput" type="valueChange"/>
    How-to show a glasspane and splash screen for long running queries
    Regards,
    Edited by: Santosh Vaza on Aug 13, 2012 12:02 PM

  • Button disabled property????? Need help!!!

    HI! I would like to know, how can I set button disabled property with more than one binding operation, for example I need to set these values to "Next record button" disabled property:
    #{!bindings.Next.enabled}
    #{bindings.Commit.enabled}
    How can I can set these EL in button disabled property together ???
    PLZ HELP!!!!!
    Best Regards
    Message was edited by:
    Debuger

    Then ai need to write in disabled property ->
    #{!bindings.Next.enabled} || #{bindings.Commit.enabled}
    I tried that, but it doesnt work!
    Can u explain what to doo???
    BEST REGARDS!

  • How to set the item property to restrict the user to not to copy from above

    Hi Guru's,
    I have a requirement like, There were two items on the form name email Id, Confirm email Id.
    I have to ristrict the user to not to copy from email Id item.. make him/her to enter the value into confirm email id item field manually.
    How to set the item property to restrict the user to not to copy from above item and paste it in this item.
    Please help.
    Thanks!!

    Just an opinion here, but that is about the dumbest requirement I have ever seen.
    I am always annoyed by web sites that ask me to enter my email twice. I ALWAYS copy the email address from the original entry and paste it into the second one.
    People enter their email addresses so often, it takes a real klutz to not get it right. And what makes you think that if they enter it twice, that they won't enter it wrong both times anyway???

  • How to refresh data in SelectOneChoice component based on backing bean

    Hello.
    I am using JD Studio Edition Version 11.1.1.5.0 on Weblogic 11.1.1.5
    I have page fragment with SelectOneCoice based on backing bean (used as filter)
    <af:selectOneChoice label="#{projectBundle['label.toolbar.spinbox.period']}"
                                        valueChangeListener="#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.onPeriodValueChangeListener}"
                                        binding="#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.soc2}"
                                        id="soc2" value="#{pageFlowScope.ContentMainView.period}" autoSubmit="true">
                      <f:selectItems value="#{pageFlowScope.YearsListBean.yearItems}"
                                     binding="#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.si2}" id="si2"/>
    </af:selectOneChoice>
    there is backing bean which reads data from database and creates list + add null value
    package sk.web.view.bean;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.share.logging.ADFLogger;
    import oracle.jbo.Row;
    import sk.web.view.common.utils.ADFUtils;
    * Class is supposed to provide list of years for the af:SelectOneChoice component.
    public class YearsListBean {
        private static final String PERIOD_ITERATOR_NAME = "PeriodView1Iterator"; //auto generated id
        private List<SelectItem> yearItems;
        public YearsListBean() {
            super();
            yearItems = new ArrayList<SelectItem>();
            addYearsToList();
        public void addYearsToList() {
            DCIteratorBinding iter = null;
            iter = ADFUtils.findIterator(PERIOD_ITERATOR_NAME);
            Row[] rows = iter.getAllRowsInRange();
            addYearItemToList("", "");       
            for(int i = 0; i < rows.length; i++){
                Row row = rows[i];
                log.info("row[" + Integer.toString(i) +"]: " + rows[i].getAttribute("Year").toString());
                addYearItemToList( rows[i].getAttribute("Year").toString(), rows[i].getAttribute("Year").toString());
        public void clearYears() {
            log.info("Called.");
            getYearItems().clear();
       private void addYearItemToList(String strInYearLabel, String strInYearValue) {
            SelectItem tObjItem = new SelectItem();
            // Setup object
            tObjItem.setLabel(strInYearLabel);
            tObjItem.setValue(strInYearValue);
            // Add it ro list
            yearItems.add(tObjItem);   
        public List<SelectItem> getYearItems() {       
            // Get Output
            return yearItems;
    When I insert new record into DB table I want to show new value into filter. How to achieve this?
    I tryied get current instance of YearsListBean
         YearsListBean yearsList = (YearsListBean)FacesUtils.getManagedBean("pageFlowScope.YearsListBean");
    then clear and fill it again
         yearsList.clearYears();
         yearsList.addYearsToList();
    at the end I refresh view adding partial target
    AdfFacesContext.getCurrentInstance().addPartialTarget(getSoc1());
    But this procedure doesn't work. Please help me find working method.
    Thanks in advance.

    Why don't you use a model driven list in the first place? Your list gets it's data from a vo do this would be the preferred solution.
    Check out my sample http://wp.me/pcBZk-vM
    Which shows an similar use case.
    Timo

  • How to refresh the input text value in backing bean

    hi all
    i want to know
    how to refresh the input text value in backing bean?
    i have tried this code ,but it doesnt work
    public void click(ActionEvent actionEvent) {
    tempConId.setValue("111111111111111");
    AdfFacesContext.getCurrentInstance().addPartialTarget(tempConId);
    sb know?
    Edited by: Joe Zou on 2012-4-6 下午9:11

    The code looks good.
    Here is a sample based on your use-case:
    InputTextSample.jspx:
    <af:form id="f1">
            <af:panelFormLayout id="pfl1">
              <f:facet name="footer">
                <af:commandButton text="Ok" id="cb1" partialSubmit="true"
                                  actionListener="#{InputTextSampleBean.onClick}"/>
              </f:facet>
              <af:inputText label="InputText" id="it1"
                            binding="#{InputTextSampleBean.myInputText}"/>
            </af:panelFormLayout>
          </af:form>
    InputTextSampleBean.java:
    import javax.faces.event.ActionEvent;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adf.view.rich.context.AdfFacesContext;
    public class InputTextSampleBean {
        private RichInputText myInputText;
        public InputTextSampleBean() {
        public void setMyInputText(RichInputText myInputText) {
            this.myInputText = myInputText;
        public RichInputText getMyInputText() {
            return myInputText;
        public void onClick(ActionEvent actionEvent) {
            this.myInputText.setValue("1234");
            AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
            adfFacesContext.addPartialTarget(this.myInputText);
    }

  • ***How to Invoke backing bean method by DOUBLE-CLICK the table ROW!!***

    Hi,
    How can I collect the selected row value & navigate to next page by DOUBLE-CLICK the result table row.
    My application got searchResult page where I am displaying the list of user in result table. Then selecting any one row and navigating to master details page by clicking the continue button. Button Action method will collect the selected row userID which I am forwarding to the masterDetails page.
    Same functionality I want to do by double click the row instead of clicking the button!!. I want to trigger the backing bean method if the user double click the row basically. Please help me in this how to do this?
    Current button action method:
    *public String userSelected() {*
    FacesCtrlHierNodeBinding binding = (FacesCtrlHierNodeBinding) searchResultTable.getSelectedRowData();
    currentRow = binding.getRow();
    selectedNetID = (String) currentRow.getAttribute("netid");
    System.out.println("selectedNetID -->"+selectedNetID);
    requestContext.getPageFlowScope().put("netid",selectedNetID);
    return "continue";
    *}*

    Puthanampatti ,
    Yes, I am using the same. Below is my code. I am trying to get the object of the MAIN jspx page region (where I am displaying the fragments) and refresh the one. But cant able to get the object for the region it is returning null. without refresh seems the navigation wont work.
    public void doDbClick(ClientEvent clientEvent) {
    FacesCtrlHierNodeBinding binding = (FacesCtrlHierNodeBinding) searchResultTable.getSelectedRowData();
    currentRow = binding.getRow();
    selectedNetID = (String) currentRow.getAttribute("netid");
    System.out.println("selectedNetID -->"+selectedNetID);
    requestContext.getPageFlowScope().put("netid",selectedNetID);
    try{
    FacesContext facesCtx = FacesContext.getCurrentInstance();
    NavigationHandler nh = facesCtx.getApplication().getNavigationHandler();
    nh.handleNavigation(facesCtx, "", "continue");
    System.out.println("region obj -->" +facesCtx.getViewRoot().findComponent("advse1"));
    // Refresh the current region; advse1 is the id of the region component inside jspx page
    AdfFacesContext.getCurrentInstance().addPartialTarget(facesCtx.getViewRoot().findComponent("advse1"));
    catch(Exception e){
    System.out.println("Error is: " +e);
    Is this correct coding to get the region object?? actually the "result table" and "Master details" are 2 different fragments which are linked with task-flow and the task flow is part of main jspx page as a region. I am using that region ID to get the obj, but cant able to get so....!!! any idea

  • How to call backing bean method from java script

    Hi,
    I would like to know how to call backing bean method from java script.
    I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
    The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
    So could any please letme know how to call backing bean method from java script
    Thanks
    Murali
    Edited by: mchepuri on Oct 24, 2009 6:17 PM
    Edited by: mchepuri on Oct 24, 2009 6:20 PM

    Hello,
    May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
    the problem is.
    1. before loading the page a javascript comes on which i clicked ok
    2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
    I m trying to do this through server listener and click listener. the code is(adf jspx page)
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
    <af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
    <af:commandButton text="commandButton 1"
    binding="#{backingBeanScope.backing_check4.cb1}"
    id="cb1" action="#{beanCheck4.submit1}"/>
    <af:clientListener type="click" method="delRow"/>
    <af:serverListener type= "jsServerListener"
    method="#{backingBeanScope.backing_check4.submit1}"/>
    <f:facet name="metaContainer">
    <af:resource type ="javascript">
    x=confirm("hi");
    // if(x){
    delRow = function(event){
    AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
    return true;
    </af:resource>
    </f:facet>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
    </jsp:root>
    the backing bean code is -----
    public class classCheck4 {
    public classCheck4() {
    public String submit1() {
    System.out.println("hello");
    return null;
    }

  • How to get the current JSF phase in backing bean?

    How to get the current JSF phase in backing bean?
    Edited by: jimmy6 on Nov 27, 2007 7:27 AM

    I am using phasetracker to trace it also.I want to know whether it is it render response phase. I know FacesContext.getCurrentInstance().getRenderResponse() work for normal jsf component but it will not work for qiupukit datatable. FacesContext.getCurrentInstance().getRenderResponse() will not return true in the following phase. Why?
    [ INFO] 27-11-07 16:20:21 : BEFORE RENDER_RESPONSE(6) (http-80-Processor23)
    I want the 'get' method of datatable being called in response phase to reduce the number of calling because i put the query in 'get' method there. Actually i still straggling with the best practice to code the datatable...

  • How to call backing bean method when user tabs out of af:inputListOfValues field

    Hi,
    I am using jdev 11.1.2.4.
    I want to call a backing bean method based on the value selected in the af:inputListOfValues field.
    The requirement is similar as Frank Nimphius-Oracle has demonstrated here  https://blogs.oracle.com/jdevotnharvest/entry/how_to_notify_the_server but with Input List of Values component.
    The fields I want to call method from is
    <af:inputListOfValues id="appealNameId"
                          popupTitle="Search and Select: #{bindings.AppealName.hints.label}"
                          value="#{bindings.AppealName.inputValue}"
                          label="#{bindings.AppealName.hints.label}"
                          model="#{bindings.AppealName.listOfValuesModel}"
                          required="#{bindings.AppealName.hints.mandatory}"
                          columns="#{bindings.AppealName.hints.displayWidth}"
                          shortDesc="#{bindings.AppealName.hints.tooltip}"
                          binding="#{backingBeanScope.backing_Donation.appealNameId}"
                          autoSubmit="true" clientComponent="false">
                          <f:validator binding="#{bindings.AppealName.validator}"/>
                          <af:autoSuggestBehavior suggestedItems="#{backingBeanScope.backing_Donation.onSuggestAppeal}"/>
                          <af:clientListener method="onBlurTxtField" type="blur"/>
    </af:inputListOfValues>
    <af:serverListener type="onBlurNotifyServer"
                       method="#{backingBeanScope.backing_Donation.onBlurNotify}"/>
    as you can see,  af:serverListener is outside the af:inputListOfValues which probably is the reason its not executing this method?
    public void onBlurNotify(ClientEvent clientEvent) {
       // get a hold of the input text component
       RichSelectOneChoice inputTxt =  (RichSelectOneChoice) clientEvent.getComponent();
       //do some work on it here (e.g. manipulating its readOnly state)
       //Get access to the payload
       Map  parameters = clientEvent.getParameters();
       System.out.println("SubmittedValue = "+parameters.get("submittedValue"));
       System.out.println("LocalValue =  "+parameters.get("localValue"));
    I've tried to put serverListener tag inside the <af:inputListOfValues> but getting below error
    "Server Listener is not valid child of Input List of Values"
    any ideas please?
    thanks

    As first, check to see that you are using correct type for af:serverListener (thet one you are queue in the javaScript onBlurTxtField function)
    If still does not work, go to directly to the page source code, and put af:serverListener "by hand", as a child for af:inputListOfValues.
    Because it is possible that these messages are false alarm...

  • SelectOneMenu: How can I fire a backing bean method just when click

    I want that when just I click one option of Dropdown list it fires a backing bean method.
    The method must take the new value of dropdown, to execute a SQL to populate a new (another one) dropdown list and refresh the page.
    My code
                            <h:commandButton id="button1" style="left: 216px; top: 216px; position: absolute" value="Cancelar"/>
                            <h:commandButton id="button2" style="left: 312px; top: 216px; position: absolute" value="Generar"/>
                            <h:outputLabel for="componentLabel5" id="componentLabel5" style="left: 120px; top: 0px; position: absolute">
                                <h:outputText id="componentLabel5Text" value="Título de la Página"/>
                            </h:outputLabel>
                            <h:selectOneMenu immediate="true" value="#{fgstb.ctoId}"  valueChangeListener="#{fgstb.cambiaValorCtos}" id="dropdown1" style="left: 264px; top: 72px; position: absolute; width: 120px">
                                <f:selectItems id="dropdown1SelectItems" value="#{fgstb.ctos}"/>
                            </h:selectOneMenu>
                            <h:selectOneRadio id="radioButtonList1" layout="pageDirection" style="left: 48px; top: 48px; position: absolute" value="#{fgstb.modo}">
                                <f:selectItem id="radioButton1" itemLabel="Generar Campeonato" itemValue="1"/>
                                <f:selectItem id="radioButton2" itemLabel="Generar desde Campeonato" itemValue="2"/>
                                <f:selectItem id="radioButton3" itemLabel="Generar Todos Campeonatos" itemValue="3"/>
                            </h:selectOneRadio>It works fine but when I push a button and I would like it works when I click over dropdown list.
    Thank you

    Hi,
    You can simply add onchange="submit()" attribute to your component to allow form to be submited when the coomponent value is changed, and add also a value change listener to allow JSF to be notiifed for component value change event :
    <h:selectOneMenu onchange="submit()"  valueChangeListener="#{fgstb.cambiaValorCtos}"
                              immediate="true" value="#{fgstb.ctoId}"   id="dropdown1" style="left: 264px; top: 72px; position: absolute; width: 120px">
                                <f:selectItems id="dropdown1SelectItems" value="#{fgstb.ctos}"/>
    </h:selectOneMenu>

  • How to call the backing bean method through javascript

    Hi
    I have a command button associated with actionListener . Action Listener method associated with backing bean methods.
    I want to fire the event on command button and backing bean method should be invoked from javascript dynamically.
    can anybody help me asap

    JSF<h:form id="formId">
        <h:commandButton id="buttonId" value="submit" actionListener="#{myBean.action}" />
    </h:form>JSdocument.getElementById('formId:buttonId').click();

  • How to call Backing Bean method from href tag in JSF. -- URGENT

    Hi guys,
    i am new to JSF. i want one option. how to call a backing bean method from href.
    I searched a lot. i found one component <commandLink>, but i cann't use <commandLink> i have to use only href which is client instructions.
    If anyone knows pls help me. Its Urgent. If u can, give me the code also.
    Suggestions will be appreciated.
    Thanks
    Rajesh

    You can make use of the constructor of the backing bean or the @PostConstruct annotation if you want to use managed properties.
    You may get some ideas out of this: [http://balusc.blogspot.com/2006/06/communication-in-jsf.html].

Maybe you are looking for

  • Upgraded to snow leopard and ilife 11 and updated itunes

    I tunes is not recognizing my ipod touch.  I recently updated itunes after upgrading to snow leopard and ilife 11.  the ipod shows that it is charging and is recognized by iphoto but not itunes.  I followed the steps listed at http://www.apple.com/su

  • Cannot Convert

    Dose anyone know how to convert for free an M4P to MP3 because I have purchased like 20 to 30 different songs now i wanna create a MP3 cd and i cannot convert it says they are protected

  • Question about transparent scroll bar?

    i have a Tree with some data in it. Verticalscrollpolicy = "ON". HorizontalScrollPolicy = "ON". When i click on one of my branches it expands, making horizontal width greater than the horizontal size of the Tree. The horizontal scroll bar springs int

  • Safari - sreamed media

    I am trying to view live TV and listen to live radio in Safari. The media is in a foreign language. Safari does not play it. Sometimes I get a message asking for Windows Media Player. Can Safari even play live media from the internet? If not how can

  • Change Layout in ScrollContainer

    Hi, I would like to change dynamically the layout of a ScrollContainer that I created dynamically: IWDScrollContainer shlpcontainer = (IWDScrollContainer)view.createElement(IWDScrollContainer.class, "name"); I would like to set the layout to GridLayo