Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Accessing method from one bean to another, it returns NULL

854299May 12 2011 — edited May 12 2011
Hi,

After refrring some posts on the forum, I tried the following to access the method in one bean into another however it returns NULL.

Here is the code.
          AttachmentListManagedBean attachmentListManagedBean = (AttachmentListManagedBean ) facesCtx.getApplication().createValueBinding("#{attachmentListManagedBean}").getValue(facesCtx);
              if(attachmentListManagedBean != null){ 
                log.info(">>>> attachmentListManagedBean NOT NULL");
                    boolean manualRefund = attachmentListManagedBean.isManualRefund();
                    boolean invoiceAttached =attachmentListManagedBean.getIsInvoiceAttachedCheckbox();
                    log.info(">>> Invoice attached : "+ invoiceAttached + " IS this manual Refund:  " + manualRefund );
              }else{
                    log.info(">>>> attachmentListManagedBean is NULL");  
              }
In the log I see : >>>> attachmentListManagedBean is NULL

adfc-config.xml
<managed-bean id="__14">
    <managed-bean-name id="__11">invoiceTableManagedBean</managed-bean-name>
    <managed-bean-class id="__12">initiaterequest.InvoiceTableManagedBean</managed-bean-class>
    <managed-bean-scope id="__13">pageFlow</managed-bean-scope>
  </managed-bean>
  <managed-bean id="__16">
    <managed-bean-name id="__15">attachmentListManagedBean</managed-bean-name>
    <managed-bean-class id="__17">initiaterequest.AttachmentListManagedBean</managed-bean-class>
    <managed-bean-scope id="__18">pageFlow</managed-bean-scope>
    <managed-property id="__21">
      <property-name id="__19">isInvoiceAttachedCheckbox</property-name>
      <property-class>java.lang.Boolean</property-class>
      <value id="__20">false</value>
    </managed-property>
:
:
     </managed-bean>
Can someone put some highlight on this as to why it is returning NULL?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2011
Added on May 12 2011
6 comments
438 views