Container-managed / bean-managed transaction demarcation

I am trying to make sure I understand container-managed and bean-managed transaction demarcation and in particular where you have one bean calling another bean. What happens where one of the beans has container-managed transaction demarcation and the other bean-managed transaction demarcation. In fact the initial question to ask is, is this allowed?
Lets use an application scenario to illustrate the issue. The application has a payment transaction. Payments can be received in one of two ways:
1. As a payment at a branch where the individual payment is processed on a client application and resulting in the processing of a single payment transaction.
2. As a batch of payments received from a bank containing, potentially, thousands of payment transactions.
The proposed implementation for this uses two session beans. The first is a Payment session bean that implements the business logic as appropriate calling entity beans to persist the change. The second is a BatchPayment session bean. This processes the batch of payment transactions received from the bank. The BatchPayment reads through the batch of payments from a bank calling the Payment session bean for each payment transaction.
Lets look at the transactional properties of both session beans. In order to support the client application the Payment session bean can implicitly enforce transactional integrity and is therefore set to container-managed transaction demarcation. However the BatchPayment session bean will want to explicitly specify transaction demarcation for performance reasons. The transactional "commit" process is relatively expensive. When processing a large batch of transactions rather than performing a commit after every transaction is processed we want to perform the commit after a number of transactions have been processed. For example, we may decide that after every 100 transactions have been processed we commit. The processing will have a shorter elapsed time as we have not had to perform 99 commit processes. So the BatchPayment session bean will want to explicitly specify its transaction demarcation and will therefore be defined with bean-managed transaction demarcation.
How would this be implemented? A possible solution is:
Payment session bean implemented with container-managed transaction demarcation with transaction scope set to Required.
BatchPayment session bean implemented with bean-managed transaction demarcation with transaction scope set to Required.
When the client application is run it calls the Payment bean and the container-managed transaction demarcation ensures the transactional integrity of that transaction.
When a BatchPayment process is run it explicitly determines the transaction demarcation. Lets say that after every 100 Payment transactions (through 100 calls to the Payment session bean) have been processed the BatchPayment bean issues a commit. In this scenario however we have mixed container-managed and bean-managed transaction demarcation. Hence my original question. Can container-managed and bean-managed transaction demarcation be mixed? If not how is it possible to implement the requirements as described above?
Thanks for any thoughts.
Paul

BatchPayment session bean implemented with bean-managed transaction demarcation with transaction scope set to Required.Didn't quite understand this sentence.... if it's BMT it has no declarative transaction attributes such as "Required"....
Anyway, first of all I'll have to ask, Why at all would you want to commit in the middle of the business method? to get as much through as possible before a potential crash? :-)
Can container-managed and bean-managed transaction demarcation be mixed?Yes, of course. Just remember that the "direction" you are refering to ->
a BMT SB that propagates it's transaction to a method in a CMT SB that is demarcated with "Required" is the simplest case. If it were "reversed", or for that matter any BMT that might be called within an active transaction context must perform logic to manipulate the transaction state. For instance(and most common case), checking to see if a transaction is active and if so not to do anything(just use the one that is already active).
If not how is it possible to implement the requirements as described above?You could also implement this scenario with CMTs all the way through. your BatchPayment SB could consist of two methods, one (say, execute(Collection paymentsToExecute) ) with "Supports", and another(say executeBatchUnit(Collection paymentsToExecute, int beginIndex, int endIndex) ) with "RequiresNew".
then have the first just call the other with indexes denoting each time a group of payments.
Still, it does seem more suitable using BMT for these kind of things.....
Hope this helped....

Similar Messages

  • Wiring managed beans - managed-property not updated.

    I have a search page with a text field for entering a substring search.
    Upon clicking submit, a list will be displayed below based on the given substring.
    I wired two managed beans together: one was a substring of type String,
    the other a facade that has a getSubstring and setSubstring method.
    The Facade also has a getList method that returns a list.
    Session:<h:outputText value="#{substring}"/>
    List: <h:outputText value="#{Facade.list}"/>
    What happens is that the session variable is being updated everytime I submit the form
    but the list is the one that was displayed the very first time the form was submitted.
    Subsequent changes to the substring has no effect on the list.
    I tried this because I read somewhere that this is an alternative to putting the
    properties of the form together with the facade.
    However, upon reading the documentation of the struts-config,xml,
    The managed-property will only be set at the creation of the managed bean.
    and not everytime the tag referencing the bean is evaluated.
    Any workaround to making this work?
    Given the scenario above, what is the best design for it?
    I'm thinking of putting an action field in the commandButton
    and then set the list as a session variable,
    which will be accessed by the jsp after the action forwards to the page.
    Is this strategy any good?

    Sure... here it is...
    <faces-config>
    <managed-bean>
    <managed-bean-name>substring</managed-bean-name>
    <managed-bean-class>java.lang.String</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>Facade</managed-bean-name>
    <managed-bean-class>com.Facade</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
         <property-name>substring</property-name>
         <value>#{substring}</value>
    </managed-property>
    </managed-bean>
    </faces-config>
    public class GroupingFacade {
         private String substring;
         public void setSubstring(String substring;
              this.substring=substring;
         public String getSubstring(){
              return substring;
         public List getList(){
              ArrayList list=new ArrayList();
              //Get list from DAO
              //DAO.getList(substring);
              return list;
    }

  • Action / actionListener in h:commandButton with managed beans

    I have a problem with a backing bean whose method is not invoked when i click it. I've seen some posts on here about this yet, I still don't understand what I am doing wrong, if anything.
    Some context...I've modeled my application after 'jcatalog' from this article:
    http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html . It's simpler than the article -- I'm not using Spring/Hibernate and the persistence is the file system. For each business object (Resource), there's a backing bean (ResourceBean).
    In short, I can't get the backing bean to respond to the button event for 'Add' bound to addAction. This is just like the jcatalog 'createProduct' impl -- which doesn't use the (FacesEvent fe ) approach.
    Anyway, I would appreciate anyone's help to get past this.
    -Lorinda
    (Below are the codes...)
    Here's my beans-config.xml:
         <!-- view -->
         <managed-bean>
              <description>
                   Managed bean that is used as an application scope cache
              </description>
              <managed-bean-name>applicationBean</managed-bean-name>
              <managed-bean-class>
                   com.intalio.qa.tcm.view.beans.ApplicationBean
              </managed-bean-class>
              <managed-bean-scope>application</managed-bean-scope>
              <managed-property>
                   <property-name>viewServicesManager</property-name>
                   <value>#{viewServicesManagerBean}</value>
              </managed-property>
              </managed-bean>
         <managed-bean>
              <description>
                   View service manager impl for business services
              </description>
              <managed-bean-name>viewServicesManagerBean</managed-bean-name>
              <managed-bean-class>
                   com.intalio.qa.tcm.view.beans.ViewServicesManagerBean
              </managed-bean-class>
              <managed-bean-scope>application</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <description>
                   Backing bean that contains product information.
              </description>
              <managed-bean-name>resourceBean</managed-bean-name>
              <managed-bean-class>
                   com.intalio.qa.tcm.view.beans.ResourceBean
              </managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
    (Note, the applicationBean uses view services manager. The manager is used by the ResourceBean. (It's initialized by the h:output dummy variable reference at the top of my .jsp page)). I can see the initialization in the debug trace.
    Here's the resource bean:
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.FacesException;
    import javax.faces.model.SelectItem;
    import com.intalio.qa.exceptions.DuplicateIdException;
    import com.intalio.qa.exceptions.TCMException;
    import com.intalio.qa.tcm.model.Resource;
    import com.intalio.qa.tcm.view.builders.ResourceBuilder;
    import com.intalio.qa.tcm.view.util.FacesUtils;
    * Resource backing bean.
    public class ResourceBean extends RootBean {
    * The Resource id
         private String id;
         * The Resource name
         private String name;
    * Description
    private String description;
         * the resource type id associated with the Resource
         private String resourceTypeId;
    // the resource type id associated with the Resource
    private List resourceTypeIds;
    * @return Returns the resourceTypeIds.
    public List getResourceTypeIds() {
    return resourceTypeIds;
    * @param resourceTypeIds The resourceTypeIds to set.
    public void setResourceTypeIds(List resourceTypeIds) {
    this.resourceTypeIds = resourceTypeIds;
         * Default constructor.
         public ResourceBean() {
    super();
    init();
         * Initializes ResourceBean.
         * @see RootBean#init()
         protected void init() {
              try {
                   LOG.info("ResourceBean init()");
                   if (id != null) {
                        Resource resource = viewServicesManager.getResourceService().getResourceById(id);
                        ResourceBuilder.populateResourceBean(this, resource);
              } catch (TCMException ce) {
                   String msg = "Could not retrieve Resource with id of " + id;
                   LOG.info(msg, ce);
                   throw new FacesException(msg, ce);
         * Backing bean action to update Resource.
         * @return the navigation result
         public String updateAction() {
              LOG.info("updateAction is invoked");
              try {
         //          Resource Resource = ResourceBuilder.createResource(this);
              //     LOG.info("ResourceId = " + Resource.getId());
              //     viewServicesManager.getResourceService().updateResource(Resource);
                   //remove the ResourceList inside the cache
                   //FacesUtils.resetManagedBean(BeanNames.RESOURCE_LIST_BEAN);
              } catch (Exception e) {
                   String msg = "Could not update Resource";
                   LOG.error(msg, e);
                   FacesUtils.addErrorMessage(msg + ": Internal Error.");
                   return NavigationResults.FAILURE;
              LOG.info("Resource with id of " + id + " was updated successfully.");
              return NavigationResults.SUCCESS;
         * Backing bean action to create a new Resource.
         * @return the navigation result
         public String addAction() {
              LOG.info("addAction is invoked");
              try {
                   Resource resource = ResourceBuilder.createResource(this);
    LOG.info("between");
                   viewServicesManager.getResourceService().saveResource(resource);
              } catch (DuplicateIdException de) {
                   String msg = "This id already exists";
                   LOG.info(msg);
                   FacesUtils.addErrorMessage(msg);
                   return NavigationResults.RETRY;
              } catch (Exception e) {
                   String msg = "Could not save Resource";
                   LOG.error(msg, e);
                   FacesUtils.addErrorMessage(msg + ": Internal Error");
                   return NavigationResults.FAILURE;
              String msg = "Resource with id of " + id + " was created successfully.";
              LOG.info(msg);
              return NavigationResults.SUCCESS;
         * Backing bean action to delete Resource.
         * @return the navigation result
         public String deleteAction() {
              LOG.info("deleteAction is invoked");
              try {
         //          Resource Resource = ResourceBuilder.createResource(this);
         //          viewServicesManager.getResourceService().deleteResource(Resource);
                   //remove the ResourceList inside the cache
    //               FacesUtils.resetManagedBean(BeanNames.RESOURCE_LIST_BEAN);
              } catch (Exception e) {
                   String msg = "Could not delete Resource. ";
                   LOG.error(msg, e);
                   FacesUtils.addErrorMessage(null, msg + "Internal Error.");
                   return NavigationResults.FAILURE;
              String msg = "Resource with id of " + id + " was deleted successfully.";
              LOG.info(msg);
              FacesUtils.addInfoMessage(msg);
              return NavigationResults.SUCCESS;
         public String getId() {
              return id;
         * Invoked by the JSF managed bean facility.
         * <p>
         * The id is from the request parameter.
         * If the id is not null, by using the id as the key,
         * the Resource bean is initialized.
         * @param newQueryId the query id from request parameter
         public void setId(String newId) {
              id = newId;
         public String getName() {
              return name;
         public void setName(String newName) {
              name = newName;
         public String getDescription() {
              return description;
         public void setDescription(String newDescription) {
              description = newDescription;
         public String getResourceTypeId() {
              return resourceTypeId;
         public void setResourceTypeId(String newResourceTypeId) {
              resourceTypeId = newResourceTypeId;
         public String toString() {
              return "id=" + id + " name=" + name;
    Here's the jsp:
    <f:subview id="resourcesCombinedView_subview">
         <h:form id="createResourceForm" target="dataFrame">
              <h:outputText value="#{applicationBean.dummyVariable}" rendered="true" />
              <div align="center">
              <head>
              <link href="../../css/stylesheet.css" rel="stylesheet" type="text/css">
              <FONT color="#191970" size="4" face="Arial">Resources View</FONT>
              </head>
              <table style="margin-top: 2%" width="35%" cellpadding="10">
              <div align="left">
              <FONT color="#191970" size="3" face="Arial">Update Resources </FONT>
              </div>
                   <tr>
                        <td align="center" valign="top" align="center" style="" bgcolor="white" />
                        <table>
                             <tbody>
                                  <tr>
                                       <td align="left" styleClass="header" width="100" />
                                       <td align="left" width="450"/>
                                  </tr>
                                  <tr>
                                       <td align="right" width="100"><h:outputText value="Id" /></td>
                                       <td align="left" width="450"><h:inputText
                                            value="#{resourceBean.id}" id="id" required="true" /> <h:message
                                            for="id" styleClass="errorMessage" /></td>
                                  </tr>
                                  <tr>
                                       <td align="right" width="100"><h:outputText value="Name" /></td>
                                       <td align="left" width="450"><h:inputText
                                            value="#{resourceBean.name}" id="name" required="true" /> <h:message
                                            for="name" styleClass="errorMessage" /></td>
                                  </tr>
                                  <tr>
                                       <td align="right" width="100" valign="bottom"><h:outputText
                                            value="Type" /></td>
                                       <td align="left" width="550">
                                       <h:selectOneMenu
                                            value="#{resourceBean.resourceTypeId}" id="resourceTypeId">
                                            <f:selectItem itemValue="" itemLabel="Select Resource Type" />
                                            <f:selectItem itemValue="database" itemLabel="Database" />
                                            <f:selectItem itemValue="external application"
                                                 itemLabel="External Application" />
                                            <f:selectItem itemValue="internal"
                                                 itemLabel="Intalio|n3 Products" />
                                            <f:selectItem itemValue="os" itemLabel="Operating System" />
                                       </h:selectOneMenu> <h:outputText
                                            value="#{resourceBean.resourceTypeId}" /> <h:message
                                            for="resourceTypeId" styleClass="errorMessage" /></td>
                                  </tr>
                                  <tr>
                                       <td align="right" width="100" valign="bottom"><h:outputText
                                            value="Description" /></td>
                                       <td align="left" width="450"><h:inputText
                                            value="#{resourceBean.description}" id="description" size="96" />
                                       <h:message for="description" styleClass="errorMessage" /></td>
                                  </tr>
                             </tbody>
                        </table>
                        </h:form></td>
                        <!-- END DATA FORM -->
                        <!-- BEGIN COMMANDS -->
                        <td width="30%" align="left" valign="top"><h:form
                             id="buttonCommandsForm">
                             <h:panelGroup id="buttons">
                                  <h:panelGrid columns="1" cellspacing="1" cellpadding="2"
                                       border="0" bgcolor="white">
                                       <h:commandButton value="Add"
                                            style="height:21px; width:51px;font-size:8pt; font-color: black;"
                                            actionListener="#{resourceBean.addAction}">
                                       </h:commandButton>
                                       <h:commandButton id="deleteCB" value="Delete"
                                            style="height:21px; width:51px;font-size:8pt"
                                            action="#{resourceBean.deleteAction}">
                                       </h:commandButton>
                                       <h:commandButton id="spaceFillerButton" tabindex="-1"
                                            style="height:21px; width:51px;font-size:8pt;background-color: #ffffff;color: #ffffff;border: 0px;">
                                       </h:commandButton>
                                       <h:commandButton id="saveCB" value="Save"
                                            style="height:21px; width:51px;font-size:8pt"
                                            actionListener="#{resourceBean.saveAction}">
                                       </h:commandButton>
                                       <h:commandButton id="updateCB" value="Update"
                                            style="height:21px; width:51px;font-size:8pt"
                                            actionListener="#{resourceBean.updateAction}">
                                       </h:commandButton>
                                  </h:panelGrid>
                             </h:panelGroup>
                        </h:form> <!-- end buttons --></td>
                   </tr>
              </table>
              <HR align="center" size="2" width="60%" />
              <!-- data table --></div>
    </f:subview>

    Hey, anyway, have you note your jsp reference to the backing bean begins with a lowercase letter, and your backing bean class name begins with an uppercase letter?? I think that's it... I think, cause I'm too unexperienced in JSF.... Bye!!

  • Urgent - can't set managed bean value using a form, getting null

    I have a form with a bean -- unbelievably, I can't get the values entered into the form by the user to get stored into the bean. Everything is null... I've looked at a zillion examples, posts and compared etc...yet still can't see what is missing.
    Here's part of a trace :
    [cc]Dec-31 01:25:02 ApplicationImpl - Created bean resourceBean successfully
    [cc]Dec-31 01:25:02 ApplicationImpl - Storing resourceBean in scope request
    [cc]Dec-31 01:25:02 VariableResolverImpl - resolveVariable: Resolved variable:id=null name=null
    [cc]Dec-31 01:25:02 ValueBindingImpl - getValue Result:id=null name=null
    [cc]Dec-31 01:25:02 ValueBindingImpl - -->Returning id=null name=null
    If you have any ideas, please let me know--it seems just as I solve one JSF issue, I run into another on unexpectedly simple things.
    Here's the ResourceBean.java, the bean-config.xml and my jsp.
    package com.intalio.qa.tcm.view.beans;
    import java.util.Map;
    import javax.faces.context.FacesContext;
    import javax.faces.model.SelectItem;
    import org.apache.log4j.Logger;
    import com.intalio.qa.exceptions.DuplicateIdException;
    import com.intalio.qa.tcm.model.Resource;
    import com.intalio.qa.tcm.view.builders.ResourceBuilder;
    import com.intalio.qa.tcm.view.util.FacesUtils;
    * Resource backing bean.
    public class ResourceBean extends RootBean {
         * Class logger
         public static final Logger LOG =
              Logger.getLogger(ResourceBean.class);
    * The Resource id
         private String id = null;
         * The Resource name
         private String name = null;
    * Description
    private String description= null;
         * the resource type id associated with the Resource
         private String resourceTypeId= null;
         private static SelectItem[] resourceTypeIds = new SelectItem[] {
              new SelectItem("External Software"),
              new SelectItem("Hardware"),
              new SelectItem("Intalio Product Software"),
              new SelectItem("Machine - Dual CPU"),
              new SelectItem("Machine - CPU Single"),
              new SelectItem("Memory - UNIX"),
              new SelectItem("Memory - Windows") };
    * @return Returns the resourceTypeIds.
    public SelectItem[] getResourceTypeIds() {
    return resourceTypeIds;
    * @param resourceTypeIds The resourceTypeIds to set.
    public void setResourceTypeIds(SelectItem[] typeIds) {
    resourceTypeIds = typeIds;
         * Default constructor.
         public ResourceBean() {
    super();
    init();
         * Initializes ResourceBean.
         * @see RootBean#init()
         protected void init() {
         /*True, but I'd strongly recommend instead using:
    FacesContext fContext = FacesContext.getCurrentInstance();
    Map requestParams = fContext.getExternalContext().getRequestParameterMap();
    String companyId = (String) requestParams.get("companyID");
    The getRequest(), getSession(), and getContext() methods of ExternalContext should only be used as a last resort.*/
         * Backing bean action to update Resource.
         * @return the navigation result
         public String updateAction() {
              LOG.info("updateAction is invoked");
              try {
                   Resource Resource = ResourceBuilder.createResource(this);
                   LOG.info("ResourceId = " + Resource.getId());
              //     viewServicesManager.getResourceService().updateResource(Resource);
              } catch (Exception e) {
                   String msg = "Could not update Resource";
                   LOG.error(msg, e);
                   FacesUtils.addErrorMessage(msg + ": Internal Error.");
                   return ActionResult.FAILURE;
              LOG.info("Resource with id of " + id + " was updated successfully.");
              return ActionResult.SUCCESS;
         * Backing bean action to create a new Resource.
         * @return the navigation result
         public String addAction() {
              try {
                   Resource resource = ResourceBuilder.createResource(this);
    LOG.info("resource created: " + resource.getName() + " with typeId = " + resource.getResourceTypeId());
                   viewServicesManager.getResourceService().saveResource(resource);
              } catch (DuplicateIdException de) {
                   String msg = "This id already exists";
                   LOG.info(msg);
                   FacesUtils.addErrorMessage(msg);
                   return ActionResult.RETRY;
              } catch (Exception e) {
                   String msg = "Could not save Resource";
                   LOG.error(msg, e);
                   FacesUtils.addErrorMessage(msg + ": Internal Error");
                   return ActionResult.FAILURE;
              String msg = "Resource with id of " + id + " was created successfully.";
              LOG.info(msg);
              return ActionResult.SUCCESS;
         * Backing bean action to delete Resource.
         * @return the navigation result
         public String deleteAction() {
              LOG.info("deleteAction is invoked");
              try {
         //          Resource Resource = ResourceBuilder.createResource(this);
         //          viewServicesManager.getResourceService().deleteResource(Resource);
                   //remove the ResourceList inside the cache
    //               FacesUtils.resetManagedBean(BeanNames.RESOURCE_LIST_BEAN);
              } catch (Exception e) {
                   String msg = "Could not delete Resource. ";
                   LOG.error(msg, e);
                   FacesUtils.addErrorMessage(null, msg + "Internal Error.");
                   return ActionResult.FAILURE;
              String msg = "Resource with id of " + id + " was deleted successfully.";
              LOG.info(msg);
              FacesUtils.addInfoMessage(msg);
              return ActionResult.SUCCESS;
         public String getId() {
              return id;
         * Invoked by the JSF managed bean facility.
         * <p>
         * The id is from the request parameter.
         * If the id is not null, by using the id as the key,
         * the Resource bean is initialized.
         * @param newQueryId the query id from request parameter
         public void setId(String newId) {
              LOG.info("setId " + newId);
              id = newId;
         public String getName() {
              return name;
         public void setName(String newName) {
              name = newName;
         public String getDescription() {
              return description;
         public void setDescription(String newDescription) {
              description = newDescription;
         public String getResourceTypeId() {
              return resourceTypeId;
         public void setResourceTypeId(String newResourceTypeId) {
              resourceTypeId = newResourceTypeId;
         public String toString() {
              return "id=" + id + " name=" + name;
         <!-- view -->
         <managed-bean>
              <description>
                   Managed bean
              </description>
              <managed-bean-name>applicationBean</managed-bean-name>
              <managed-bean-class>
                   com.intalio.qa.tcm.view.beans.ApplicationBean
              </managed-bean-class>
              <managed-bean-scope>application</managed-bean-scope>
              <managed-property>
                   <property-name>viewServicesManager</property-name>
                   <value>#{viewServicesManagerBean}</value>
              </managed-property>
              </managed-bean>
         <managed-bean>
              <description>
                   View service manager impl for business services
              </description>
              <managed-bean-name>viewServicesManagerBean</managed-bean-name>
              <managed-bean-class>
                   com.intalio.qa.tcm.view.beans.ViewServicesManagerBean</managed-bean-class>
              <managed-bean-scope>application</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <description>
                   Backing bean that contains product information.
              </description>
              <managed-bean-name>resourceBean</managed-bean-name>
              <managed-bean-class>
                   com.intalio.qa.tcm.view.beans.ResourceBean
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
              <managed-property>
                   <property-name>viewServicesManager</property-name>
                   <value>#{viewServicesManagerBean}</value>
              </managed-property>
         </managed-bean>
    </faces-config>
    <f:view>
         <h:form id="createResourceForm" target="dataFrame">
              <h:outputText value="#{applicationBean.dummyVariable}" rendered="true" />
              <div align="center">
              <head>
              <link href="../../css/stylesheet.css" rel="stylesheet" type="text/css">
              <FONT color="#191970" size="4" face="Arial">Resources View</FONT>
              </head>
              <table style="margin-top: 2%" width="35%" cellpadding="10">
                   <div align="left">
                   <FONT color="#191970" size="3" face="Arial">Update Resources </FONT>
                   </div>
                   <tr>
                        <td align="center" valign="top" align="center" style="" bgcolor="white" />
                        <table>
                             <tbody>
                                  <tr>
                                       <td align="left" styleClass="header" width="100" />
                                       <td align="left" width="450" />
                                  </tr>
                                  <tr>
                                       <td align="right" width="100"><h:outputText value="Id" /></td>
                                       <td align="left" width="450"><h:inputText value="#{resourceBean.id}" id="id"/> <h:message for="id" styleClass="errorMessage" /></td>
                                  </tr>
                                  <tr>
                                       <td align="right" width="100"><h:outputText value="Name" /></td>
                                       <td align="left" width="450"><h:inputText value="#{resourceBean.name}" id="name" /> <h:message for="name" styleClass="errorMessage" /></td>
                                  </tr>
                                  <tr>
                                       <!--td align="right" width="100" valign="bottom"><h:outputText value="Type" /></td>
                                       <td align="left" width="550"><h:selectOneMenu>
                                            <f:selectItems value="#{resourceBean.resourceTypeIds}" />
                                       </h:selectOneMenu> <h:outputText value="#{resourceBean.resourceTypeId}" id="dresourceTypeId" /> <h:message for="resourceTypeId" styleClass="errorMessage" />
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" width="100" valign="bottom"><h:outputText value="Description" /></td>
                                       <td align="left" width="450"><h:inputText value="#{resourceBean.description}" id="description" size="96" /> <h:message for="description" styleClass="errorMessage" /></td>
                                  </tr>
                             </tbody>
                        </table>
         </h:form>
         </td>
         <!-- END DATA FORM -->
         <!-- BEGIN COMMANDS -->
         <td width="30%" align="left" valign="top"><h:form id="buttonCommandsForm">
              <h:panelGroup id="buttons">
                   <h:panelGrid columns="1" cellspacing="1" cellpadding="2" border="0" bgcolor="white">
                        <h:commandButton value="Add" style="height:21px; width:51px;font-size:8pt; font-color: black;" action="#{resourceBean.addAction}">
                        </h:commandButton>
                        <h:commandButton id="deleteCB" value="Delete" style="height:21px; width:51px;font-size:8pt" action="#{resourceBean.deleteAction}">
                        </h:commandButton>
                        <h:commandButton id="spaceFillerButton" style="height:21px; width:51px;font-size:8pt;background-color: #ffffff;color: #ffffff;border: 0px;">
                        </h:commandButton>
                        <h:commandButton id="saveCB" value="Save" style="height:21px; width:51px;font-size:8pt" action="#{resourceBean.saveAction}">
                        </h:commandButton>
                        <h:commandButton id="updateCB" value="Update" style="height:21px; width:51px;font-size:8pt" action="#{resourceBean.updateAction}">
                        </h:commandButton>
                   </h:panelGrid>
              </h:panelGroup>
         </h:form> <!-- end buttons --></td>
         </tr>
         </table>
         <HR align="center" size="2" width="60%" />
         <!-- data table -->
         </div>
    </f:view>
    THANKS.
    -L

    I solved this.
    Since I was testing the action code only, I didn't define a navigation entry corresponding to the action string returned for this button:
    <h:commandButton value="Add" style="height:21px; width:51px;font-size:8pt; font-color: black;" action="#{resourceBean.addAction}">
    </h:commandButton>After I added a nav definition, it worked. I don't know why at this point. I suspect a key step in the lifecycle was pre-empted...someone else can probably explain why. If I get a chance to research it after I'm done with my project, I'll update this post.
    Thanks.
    -L

  • Wierd Managed bean

    I created a managed bean (ss.LoginBean) to play with some different login routines. I then used this bean as a field for SessionBean1. Things tested fine... but after a bit, the loginBean was no longer available for binding (although it was sill visible in SessionBean1) and this showed up in the managed-beans.xml file:
    <managed-bean>
    <managed-bean-name>LoginBean</managed-bean-name>
    <managed-bean-class>ss.LoginBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>ss$LoginBean</managed-bean-name>
    <managed-bean-class>ss.LoginBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    Now the fields that were bound to the loginBean values inside of SessionBean1 are painted red, and I am getting a startup error message of loginBean in the status line (lower left)
    Anyone else see this? Where do I fix it?
    harold

    Just for completeness sake, I've dumped the log, from startup, through the first of 6 similiar error messages:
    Log Session: Friday, August 6, 2004 2:08:05 PM PDT
    System Info: Product Version = Java Studio Creator (Build 040621)
    Operating System = Windows XP version 5.1 running on x86
    Java; VM; Vendor = 1.4.2_04; Java HotSpot(TM) Client VM 1.4.2_04-b05; Sun Microsystems Inc.
    Java Home = C:\Sun\Creator\java\jre
    System Locale; Encod. = en_US; Cp1252
    Home Dir; Current Dir = C:\Documents and Settings\Harold; C:\Sun\Creator\bin
    IDE Install; User Dir = C:\Sun\Creator; C:\Documents and Settings\Harold\.Creator\1_0
    CLASSPATH = C:\Sun\Creator\lib\ext\boot.jar;C:\Sun\Creator\lib\ext\jgraph.jar;C:\Sun\Creator\lib\ext\naming.jar;C:\Sun\Creator\lib\ext\pbclient.jar;C:\Sun\Creator\lib\ext\pbtools.jar;C:\Sun\Creator\lib\ext\rowset.jar;C:\Sun\Creator\lib\ext\smbase.jar;C:\Sun\Creator\lib\ext\smdb2.jar;C:\Sun\Creator\lib\ext\sminformix.jar;C:\Sun\Creator\lib\ext\smoracle.jar;C:\Sun\Creator\lib\ext\smresource.jar;C:\Sun\Creator\lib\ext\smsqlserver.jar;C:\Sun\Creator\lib\ext\smsybase.jar;C:\Sun\Creator\lib\ext\smutil.jar;C:\Sun\Creator\lib\ext\sql.jar;C:\Sun\Creator\lib\ext\sqlx.jar;C:\Sun\Creator\java\lib\dt.jar;C:\Sun\Creator\java\lib\tools.jar
    Boot & ext classpath = C:\Sun\Creator\java\jre\lib\rt.jar;C:\Sun\Creator\java\jre\lib\i18n.jar;C:\Sun\Creator\java\jre\lib\sunrsasign.jar;C:\Sun\Creator\java\jre\lib\jsse.jar;C:\Sun\Creator\java\jre\lib\jce.jar;C:\Sun\Creator\java\jre\lib\charsets.jar;C:\Sun\Creator\java\jre\classes;C:\Sun\Creator\java\jre\lib\ext\dnsns.jar;C:\Sun\Creator\java\jre\lib\ext\ldapsec.jar;C:\Sun\Creator\java\jre\lib\ext\localedata.jar;C:\Sun\Creator\java\jre\lib\ext\sunjce_provider.jar
    Dynamic classpath = C:\Sun\Creator\lib\core.jar;C:\Sun\Creator\lib\openfile-cli.jar;C:\Sun\Creator\lib\openide-loaders.jar;C:\Sun\Creator\lib\openide.jar;C:\Sun\Creator\lib\ravelnf.jar
    [org.netbeans.core.modules #4] Warning: the extension C:\Sun\Creator\modules\ext\sac.jar may be multiply loaded by modules: [C:\Sun\Creator\modules\css.jar, C:\Sun\Creator\modules\insync.jar]; see: http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/classpath.html#class-path
    Turning on modules:
         org.openide/1 [4.26.1 040621]
         org.openide.src [1.1.1 040621]
         org.netbeans.modules.schema2beans/1 [1.7.1 040621]
         org.netbeans.libs.j2eeeditor/1 [1.1.1 040621]
         org.openide.loaders [4.11.1 040621]
         org.openide.io [1.1.1 040621]
         org.openide.execution [1.1.1 040621]
         org.openide.compiler [1.2.1 040621]
         org.netbeans.core/1 [1.21.1 040621]
         org.netbeans.lib.terminalemulator [1.1.1 040621]
         org.netbeans.core.output/1 [1.1.1 040621]
         org.netbeans.core.compiler/1 [1.4.1 040621]
         org.netbeans.modules.javahelp/1 [2.1.1 040621]
         org.netbeans.api.java/1 [1.3.1 040621]
         org.netbeans.core.execution/1 [1.3.1 040621]
         org.netbeans.libs.xerces/1 [1.4.1 2.6.0]
         org.apache.tools.ant.module/3 [3.6.1 040621]
         org.openide.debugger [1.1.1 040621]
         org.netbeans.modules.j2eeapis/1 [1.0 040621]
         org.netbeans.modules.settings/1 [1.4.1 040621]
         org.netbeans.api.xml/1 [1.3.1.3.6.0 3.6.0 040621]
         org.netbeans.modules.debugger.core/3 [2.10.1 040621]
         org.netbeans.modules.j2eeserver/3 [1.1.2 040701_4]
         org.netbeans.modules.debugger.jpda/1 [1.17.1 040621]
         org.netbeans.api.web.dd/1 [1.1.1 1.0 040621]
         com.sun.rave.project/1 [1.0.1 040701_4]
         com.sun.rave.jsfsupport/1 [1.0.1 040701_4]
         org.netbeans.modules.editor/1 [1.14.2 040701_4]
         com.sun.rave.insync/1 [1.0.1 040701_4]
         org.netbeans.modules.diff/1 [1.7.1 040621]
         com.sun.rave.jsfmetadata/1 [1.0 040621]
         com.sun.rave.toolbox/1 [1.0.1 040701_4]
         org.netbeans.modules.classfile/1 [1.8 040621]
         org.netbeans.modules.java/1 [1.16.1 040621]
         com.sun.rave.designer/1 [1.0.1 040701_4]
         com.sun.rave.navigation/1 [1.0.1 040701_4]
         org.netbeans.modules.servletapi24/1 [2.0.1 2.0.1 040621]
         org.netbeans.core.ui/1 [1.3.1 040621]
         org.netbeans.modules.beans/1 [1.11.1 040621]
         com.sun.rave.layoutmgr/1 [1.1 040621]
         com.sun.rave.plaf/1 [0.1 040621]
         com.sun.rave.windowmgr/1 [1.1 040621]
         com.sun.rave.jwsdpsupport/1 [1.0 040621]
         org.netbeans.modules.schema2beansdev/1 [1.1.1 040621]
         com.sun.rave.sam/1 [1.0.1 040701_4]
         com.sun.rave.websvc/1 [1.0.1 040701_4]
         org.netbeans.modules.image/1 [1.11.1 040621]
         com.sun.rave.servernav/1 [1.0 040621]
         org.netbeans.modules.properties/1 [1.11.1 040621]
         org.netbeans.modules.properties.syntax/1 [1.11 040621]
         org.netbeans.modules.html/1 [1.12.1 040621]
         org.netbeans.modules.text/1 [1.12.1 040621]
         org.openidex.util/2 [2.7.1 040621]
         org.netbeans.modules.utilities/1 [1.15.1 040621]
         com.sun.rave.licensemgr/1 [1.2 040621]
         org.netbeans.modules.autoupdate/1 [2.8.1 040621]
         com.sun.rave.raveupdate/1 [1.0.1 040621]
         org.netbeans.modules.web.jspparser/2 [2.0.1 040621]
         org.netbeans.modules.xml.core/2 [1.1.1.3.6.0 3.6.0 040621]
         org.netbeans.modules.xml.text/2 [1.1.1.3.6.0 3.6.0 040621]
         org.netbeans.modules.web.core.syntax/1 [1.13.1 040621]
         com.sun.rave.jspsyntaxint/1 [1.0 040621]
         com.sun.rave.welcome/1 [1.0 040621]
         org.netbeans.modules.xml.catalog/2 [1.1.1.3.6.0 3.6.0 040621]
         com.sun.tools.appserver/1 [2.0 20040621-1109]
         org.netbeans.modules.clazz/1 [1.13.1 040621]
         com.sun.rave.dataconnectivity/1 [1.0.1 040701_4]
         org.netbeans.modules.css/2 [1.1.1.3.6.0 3.6.0 040621]
         org.netbeans.core.ide/1 [1.3.1 040621]
         com.sun.rave.errorhandler.server/1 [0.1 040621]
         org.netbeans.modules.extbrowser/1 [1.3.1 040621]
    *********** Exception occurred ************ at Fri Aug 06 14:09:18 PDT 2004
    javax.faces.el.PropertyNotFoundException: loginBean
         at com.sun.rave.jsfsupp.container.Beans2PropertyResolver.getValue(Unknown Source)
         at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
         at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
         at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
         at com.sun.faces.el.ValueBindingImpl.getValue(Unknown Source)
         at com.sun.faces.el.ValueBindingImpl.getValue(Unknown Source)
         at javax.faces.component.UIOutput.getValue(UIOutput.java:147)
         at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82)
         at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:191)
         at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:169)
    [catch] at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
         at com.sun.rave.insync.faces.FacesPageUnit.renderBean(Unknown Source)
         at com.sun.rave.insync.faces.FacesPageUnit.renderNode(Unknown Source)
         at com.sun.rave.insync.faces.FacesPageUnit.renderBean(Unknown Source)
         at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(Unknown Source)
         at com.sun.rave.css2.FacesSupport.getFacesHtml(Unknown Source)
         at com.sun.rave.css2.CssContainerBox.addNode(Unknown Source)
         at com.sun.rave.css2.CssContainerBox.createChildren(Unknown Source)
         at com.sun.rave.css2.DocumentBox.createChildren(Unknown Source)
         at com.sun.rave.css2.DocumentBox.relayout(Unknown Source)
         at com.sun.rave.css2.PageBox.layout(Unknown Source)
         at com.sun.rave.css2.PageBox.paint(Unknown Source)
         at com.sun.rave.css2.PageBox.paint(Unknown Source)
         at com.sun.rave.designer.DesignerPaneUI.paintSafely(Unknown Source)
         at com.sun.rave.designer.DesignerPaneUI.paint(Unknown Source)
         at com.sun.rave.designer.DesignerPaneUI.update(Unknown Source)
         at javax.swing.JComponent.paintComponent(JComponent.java:541)
         at com.sun.rave.designer.DesignerPane.paintComponent(Unknown Source)
         at javax.swing.JComponent.paint(JComponent.java:808)
         at javax.swing.JComponent.paintChildren(JComponent.java:647)
         at javax.swing.JComponent.paint(JComponent.java:817)
         at javax.swing.JViewport.paint(JViewport.java:722)
         at javax.swing.JComponent.paintChildren(JComponent.java:647)
         at javax.swing.JComponent.paint(JComponent.java:817)
         at javax.swing.JComponent.paintChildren(JComponent.java:647)
         at javax.swing.JComponent.paint(JComponent.java:817)
         at javax.swing.JComponent.paintChildren(JComponent.java:647)
         at javax.swing.JComponent.paint(JComponent.java:817)
         at javax.swing.JComponent.paintChildren(JComponent.java:647)
         at javax.swing.JComponent.paint(JComponent.java:817)
         at javax.swing.JComponent.paintChildren(JComponent.java:647)
         at javax.swing.JComponent.paint(JComponent.java:817)
         at javax.swing.JComponent.paintChildren(JComponent.java:647)
         at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
         at javax.swing.JComponent.paint(JComponent.java:817)
         at javax.swing.JComponent.paintChildren(JComponent.java:647)
         at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
         at javax.swing.JComponent.paint(JComponent.java:817)
         at javax.swing.JComponent.paintChildren(JComponent.java:647)
         at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
         at javax.swing.JComponent.paint(JComponent.java:817)
         at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4787)
         at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4740)
         at javax.swing.JComponent._paintImmediately(JComponent.java:4685)
         at javax.swing.JComponent.paintImmediately(JComponent.java:4488)
         at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    INFORMATIONAL *********** Exception occurred ************ at Fri Aug 06 14:09:18 PDT 2004
    Annotation: Component HTML encoding error
    javax.faces.el.PropertyNotFoundException: loginBean
    ....repeated 5 times
    harold

  • Sharing managed beans

    Ok �. This is driving me nuts. I�m relatively new to JSF (2 week profession &#61514; ), and I may not have grasped the concept of Managed Beans. The problem is detailed below:
    Development Environment:
    WebSphere Studio 1.5.2 � This creates a backing bean for each respective JSP page that is created, including setters and getters for each managed bean. The two backing beans I�ll talk about whilst specifying the problem are stored in session scope.
    The Problem:
    I can�t share data between two pages. On the first page I create managed bean in session scope and make this reusable (let�s say person). On the second page I add the reusable Person bean. The resulting entry in the faces.config file is:
    <managed-bean>
    <managed-bean-name>person</managed-bean-name>
    <managed-bean-class>ibm.wlrs.model.PersonVO</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    Both pages however maintain an independent copy of the managed bean instead of JSF maintaining a shared one. I�ve looked at several documents, and too me it seems as though this bean should be shared between the two pages�� HELP!
    On the first page I create a new Person object with the relevant details. This person is created upon a button click added to the backing beans managed bean.
    //Page 1 add person from button click
    public String doLnkInsertEntryAction() {
    System.out.println("Insert");
         Person p1 = new Person();
         p1.setName("Duncan");
         setPerson(p1);
    System.out.println(getPerson().getName());
    //This prints the person�s name
         return "insert";
    I have also setup a page load event to test that the person object stays in the session
    //Page 1 page load
    public void onPageLoadBegin(FacesContext facescontext) {
         System.out.println(getPerson().getName());
    //Prints the person name that was added during the button click event� on Postback or even after going from page1 � page2 and back again.
    On Page two if I try and access the managedBean contained within the session, the �name� will always print out as null.
    //Page 2 page load
    public void onPageLoadBegin(FacesContext facescontext) {
         System.out.println(getPerson().getName());
    If I add an any information to the managed bean on page two i.e. person.setName(�Another�), this data stays in the session, only for page two though.
    Is this how JSF is supposed to work? I though if a managed bean was stored in the session, the object (and it�s data) should be reusable between pages.
    Sorry for the long post�. I though it would be worth while to try and be as specific as possible.
    Thanks
    Duncan

    And� I still don�t understand why two independent
    copies are kept by the pages�Because YOU create the copy.
    JSF (exactly speaking the default VariableResolver) at first searches for an attribute in
    request scope, then session scope, then application scope with the matching name.
    Only when no attribute is found, it examines faces-config.xml, creates an instance of
    the specified class, and stores the instance in the specified scope.
    It never creates two instances with a same name.
    I.E� On Page 1�. Several Person objects are stored in
    a DataTable. The Vector containing the Person objects
    is a managed bean bound to this data table. Upon a
    button click I require to extract a person from the
    data table and place it into the managed bean session
    scope for person. Humm, I guess you misunderstand what the managed bean is.
    h:dataTable has the "var" attribute which is used to refer each Person object.
    JSF implements the "var" variable as a request scope attribute and re-binds it
    to each Person object in the iteration. So, it is not a managed bean but is simply an attribute.
    The entry of faces-config.xml is not required.
    To know how to pass the selected row data to the next page, please see some
    example using h:dataTable and javax.faces.model.DataModel.

  • Scope of managed bean for a modifiable list

    I have a business entity set stored in database. I want to show them with JSF as elements of a list with each element having a delete button. If the database changes in the background because entitites are removed or inserted, the delete function certainly must work well.
    I'm clear of the key stuff I have to use:
    -a managed bean, probably containing some list coming from database through dao or o/r mapper.
    -some iterator, e.g. t:dataList (using Tomahawk)
    -h:commandButton with action referring to methods in the managed-bean's elements.
    The question is, what usually would be the scope of the managed-bean.
    If the scope is "request", delete function may work wrong when database changes between the first and the "delete" request.
    -First request: managed-bean created with ids and event handlers.
    -Database changes: new entity is inserted.
    -Secont request: managed-bean created with id-s and event handlers according to the new database content. id-s have been shifted.
    It may help if I override somehow the default id generation of the JSF, by using directly id-s of business entities but I think it's an unproposed hack.
    If the scope of the managed bean is "session", the delete function works well, however we've a lot of stuff to store in the session.
    So, what would be the scope of the managed-bean?
    Or a completely different approach should be used?

    hi,
    faces-config:---------
    <faces-config version="1.2"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
    <!-- ***************Country************-->
    <managed-bean>
    <managed-bean-name>countryMBean</managed-bean-name>
    <managed-bean-class>com.tnhsp.mbeans.CountryMBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <!-- ***************country************-->
    <navigation-case> <!-- DEfault mode - Fetches all data in datatable -->
    <from-outcome>fetch_country</from-outcome>
    <to-view-id>/hospitalAdmin/country/countryDisplayContent.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    <navigation-case> <!-- Displayes the screen to add data -->
    <from-outcome>add_country</from-outcome>
    <to-view-id>/hospitalAdmin/country/countryCreateContent.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    </faces-config>
    MBEAN:-----
    public class CountryMBean {
    @EJB
    CountrySRemote countrySRemote;
    private Country country = new Country();
    public CountryMBean() {
    System.out.println("countryMBean.countryMBean()");
    country = new Country();
    fc = FacesContext.getCurrentInstance();
    public String actionAdd() {
    renderFlag = 1;
    errorStatus = "";
    System.out.println("countryMBean. - actionadd");
    retValue = "add_country";
    setLinkMode(ADD_MODE");
    setDisableCodeField("false");
    saveStatus = "false";
    listEmptyStatus = "false";
    country = new Country();
    Date dt = new Date();
    country.setEffectFromDt(dt);
    country.setCreatedDate(dt);
    country.setLastUpdatedDate(dt);
    country.setCreatedUser("user");
    country.setLastUpdatedUser("user");
    System.out.print("returning from actionadd");
    return retValue;
    Please help.

  • Managed bean returns null on SetActionListener

    Hi,
    I'm trying to implement a filter for my table (something similar to what's done in the "OracleAS 10g R3: Oracle ADF for Forms/4GL Developers/Volume II" student guide, practice 9-5). The idea is to have a request-scoped managed bean which holds the filter value - the value is set using a SetActionListener, and later bound to a bind variable in a view with a view criteria. I have problem re-creating this in Trinidad (JDev 11 TP3, to be exact).
    I have created a request-scoped bean in adfc-config.xml (called 'ecnStatusBean'), with a managed property (named 'Status'). I am referencing it from my SetActionListener: setting #{'E'} to #{requestScope.ecnStatusBean.Status}. The reference compiles fine in the Expression Builder (it didn't before I created the managed bean), but when running and clicking the CommandLink with the SetActionListener, I get a runtime error:
    oracle.security.jazn.JAZNRuntimeException: Target Unreachable, 'ecnStatusBean' returned null
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:480)
    To make things more interesting, I tried changing the scope to session, and got a different error:
    oracle.adf.controller.ControllerException: ADFC-10001: Cannot instantiate class 'pelephone.cdma_ecn.ecn_manager.model.ecnStatusMB'.
         at oracle.adfinternal.controller.util.Utils.createAndLogFacesException(Utils.java:169)
    Am I doing a rookie's mistake? Is this a Trinidad issue? Something else?
    Thanks in advance for any help,
    Boris

    Are you sure about the reference you use here: #{requestScope.ecnStatusBean.Status}.
    Here is a simple sample of what works for me:
    The first page has this:
          <af:form binding="#{backing_start.form1}" id="form1">
            <af:inputText label="Label 1" binding="#{backing_start.inputText1}"
                          id="inputText1"/>
            <af:commandButton text="commandButton 1"
                              binding="#{backing_start.commandButton1}"
                              id="commandButton1" action="go">
              <af:setActionListener from="#{backing_start.inputText1.value}"
                                    to="#{backing_start.paramToPass}"/>
            </af:commandButton>
          </af:form>It references a bean that has this:
        private RichInputText inputText1;
        public void setInputText1(RichInputText inputText1) {
            this.inputText1 = inputText1;
        public RichInputText getInputText1() {
            return inputText1;
        public String paramToPass;
        public void setParamToPass(String paramToPass) {
            this.paramToPass = paramToPass;
        public String getParamToPass() {
            return paramToPass;
        }And then I can see it in the next page that I navigated to like this:
            <af:outputText value="the current value is #{backing_start.paramToPass}"/>In the adf-config.xml I have this:
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <view id="start">
        <page>/start.jspx</page>
      </view>
      <view id="end">
        <page>/end.jspx</page>
      </view>
      <control-flow-rule>
        <from-activity-id>start</from-activity-id>
        <control-flow-case>
          <from-outcome>go</from-outcome>
          <to-activity-id>end</to-activity-id>
        </control-flow-case>
      </control-flow-rule>
      <managed-bean>
        <managed-bean-name>backing_start</managed-bean-name>
        <managed-bean-class>backing.backing_start</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>
    </adfc-config>

  • Get the current value of a managed bean.

    Hi guys
    I have a register page which takes the Login ID and the password and retype password whose values are stored in the "Managed Beans" in registerServer.java.
    I have a (PwdValidator.java) Custom validator for Re-type Password which validates itself against the password.
    Now my problem is from the PwdValidator.java how can I access the value of the password which is stored in the managed bean in registerServer.java.
    here is a copy of my faces-config.xml
         <managed-bean>
              <managed-bean-name>registerServer</managed-bean-name>
              <managed-bean-class>com.sun.registerServer</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
    Help is really appreciated,
    Thanks,
    Chaprasi Baba

    Thanks for the reply but my question is how do I get
    the password value from the managed bean
    FacesContext context =
    FacesContext.getCurrentInstance();
    Application application = context.getApplication();
    CountryValueObject registerServer =
    (CountryValueObject)application.getVariableResolver().r
    solveVariable(context, "registerServer");
    String pwd = registerServer.password // So will this
    give me the current value for that session.You didn't go far enough in replacing the example code . Try this:
    FacesContext context = FacesContext.getCurrentInstance();
    Application application = context.getApplication();
    RegisterServer registerServer = (RegisterServer)application.getVariableResolver().resolveVariable(context, "registerServer");
    String pwd = registerServer.password // So will this give me the current value for that session.

  • Problem with Action binding for a command button in a Managed Bean

    Hi
    Thank you for reading my post
    I am trying to use a backing bean for a button action binding.
    I followed all steps as they seems to be correct. i did not made any changes directly by hand , all of changes are introduced by oracle
    Jdeveloper wizards. but now i get this exception
    Managed bean is defined in faces-config.xml (it shows in preview mode) , the method is there in managed bean (Jdeveloper itself create the method i just enter its name)
    can you please take a look and tell me what can be wrong?
    thanks
    here is method and its body in managed bean
    public String userAccept_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding =
                bindings.getOperationBinding("Commit");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        }here is the exception that i recive
    javax.faces.FacesException: #{ButtonActions.userAccept_action}: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: The scope of the referenced object: '#{bindings}' is shorter than the referring object
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
         at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adf.share.security.authentication.AuthenticationFilter.handleAuthentication(AuthenticationFilter.java:177)
         at oracle.adf.share.security.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:112)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at webui.common.CharacterEncoding.doFilter(CharacterEncoding.java:26)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:105)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:167)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:415)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:619)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: The scope of the referenced object: '#{bindings}' is shorter than the referring object
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:143)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         ... 34 more
    Caused by: javax.faces.FacesException: javax.faces.FacesException: The scope of the referenced object: '#{bindings}' is shorter than the referring object
         at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:292)
         at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:97)
         at oracle.adfinternal.view.faces.el.AdfFacesVariableResolver.resolveVariable(AdfFacesVariableResolver.java:40)
         at oracle.adfinternal.view.faces.model.VariableResolverUtils$JspResolver.resolveVariable(VariableResolverUtils.java:79)
         at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:145)
         at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)
         ... 37 more
    Caused by: javax.faces.FacesException: The scope of the referenced object: '#{bindings}' is shorter than the referring object
         at com.sun.faces.config.ManagedBeanFactory.evaluateValueBindingGet(ManagedBeanFactory.java:911)
         at com.sun.faces.config.ManagedBeanFactory.setPropertiesIntoBean(ManagedBeanFactory.java:567)
         at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:253)
         at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:282)
         ... 43 more

    Thank you for reply , but it does not helps or maybe i did not apply it correctly
    here is faces-config.xml code snippet :
    <managed-bean>
        <managed-bean-name>ButtonActions</managed-bean-name>
        <managed-bean-class>webui.common.actionListener.ButtonAction</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
          <property-name>bindings</property-name>
          <value>#{bindings}</value>
        </managed-property>
      </managed-bean>here is binding for the button in jsp file :
    <af:commandButton
                                    text="#{res['button.accept']}"
                                    disabled="#{!bindings.Commit.enabled}"
                                    action="#{ButtonActions.userAccept_action}"/>and here is some code portion of ButtonAction class
    package webui.common.actionListener;
    import oracle.binding.BindingContainer;
    import oracle.binding.OperationBinding;
    public class ButtonAction {
        private BindingContainer bindings;
        public ButtonAction() {
        public BindingContainer getBindings() {
            return this.bindings;
        public void setBindings(BindingContainer bindings) {
            this.bindings = bindings;
        public String userAccept_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding =
                bindings.getOperationBinding("Commit");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
    }and i still get the same error.

  • ADF Faces: How to get the ADF BindingContainer in a managed bean?

    Hi,
    I not sure how to get the BindingContainer instance from inside of a managed bean method. I have tried the following config, but it does not work in all situations.
      <managed-bean>
        <managed-bean-name>backing_showBooks</managed-bean-name>
        <managed-bean-class>view.backing.ShowBooks</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
        <managed-property>
          <property-name>bindingContainer</property-name>
          <property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
          <value>#{bindings}</value>
        </managed-property>
        <!--oracle-jdev-comment:managed-bean-jsp-link:1showBooks.jsp-->
      </managed-bean>When an ActionListener- method of my ShowBooks bean is called the property bindingContainer is NULL!!
    Is there a save way to get the BindingContainer in my bean??
    Any hints are welcome.
    Thanks,
    Markus

    Maybe I just need another pair of eyes but when I set this up as explained and watch it in the debugger my method public void setBindingContainer(DCBindingContainer bc) gets called but bc is null. Can anyone help?
    Thanks
    Backing Bean-
    private DCBindingContainer bindingContainer;
    public void setBindingContainer(DCBindingContainer bc) {
    this.bindingContainer = bc;
    public DCBindingContainer getBindings() {
    return bindingContainer;
    //I just threw this method on there in case I was missing something & I also
    //tried using a getBindingContainer method above but that didn;t work.
    public void setBindings(DCBindingContainer bindings) {
    this.bindingContainer = bindings;
    adf-faces.conf entry
    <managed-bean>
    <managed-bean-name>backing_VunerabilityDetail</managed-bean-name>
    <managed-bean-class>viewcontroller.backing.VunerabilityDetail</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindingContainer</property-name>
    <property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
    <value>#{bindings}</value>
    </managed-property>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1VunerabilityDetail.jsp-->
    </managed-bean>

  • Can't get JSF to access managed bean methods from web page

    I'm using NetBeans 6.7.1 and Glassfish v2.1
    Having problems here can somebody please help? It is really
    frustrating because I have written apps like this before in fact I
    used one as a model to create an even simpler app and still can't get
    it to work. I ran it through the debugger and it stops in the
    constructor so it looks like the bean object is being created, but the
    setUid method and the testit method are not being entered when I click
    on the enter commandbutton. Can somebody PLEASE give me an idea as to
    what might be going on? I am totally stumped and this is holding up
    some important work I need to get done. Any help would be greatly
    appreciated:
    web.xml:
    - Show quoted text -
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>faces/welcomeJSF.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    faces-config.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <faces-config version="1.2"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
    <managed-bean>
    <managed-bean-name>testbean</managed-bean-name>
    <managed-bean-class>com.lingosys.quoteest.testbean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/go.jsp</from-view-id>
    <navigation-case>
    <from-outcome>correct</from-outcome>
    <to-view-id>/ok.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    go.jsp:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%--
    This file is an entry point for JavaServer Faces application.
    --%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>JSP Page</title>
    </head>
    <body>
    <f:view>
    <h1>JAS Generator</h1>
    <p/>
    <h:form id="testForm" enctype="multipart/form-data" >
    <p/>Both fields are required.
    <p/>Enter Test ID: <h:inputText id="pid"
    value="#{testbean.uid}" required="true"/>
    <p/><h:commandButton value="Enter"
    action="#{testbean.testit}"/>
    </h:form>
    </f:view>
    </body>
    </html>
    testbean.java:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.lingosys.quoteest;
    * @author mphoenix
    public class testbean {
    private String uid;
    public testbean() {
    int x=0;
    public String getUid() {
    return uid;
    public void setUid(String uid) {
    this.uid = uid;
    public String testit() {
    return "correct";
    }

    MikePhoenix wrote:
    enctype="multipart/form-data"
    Why?
    Oh, in the future please post code in code blocks. Use the CODE button to get them. Use the Preview tab to see if anything went right.

  • Problems setting managed bean property of type Integer

    I got a problem when I use valueBinding #{param.productId} in faces-config.xml for my managed bean:
    My property 'productId' in bean Product is of type Integer, and my bean is in request scope. When I try to invoke some action on page, wich should navigate me to another view - JSF is trying to set productId for current view, and of course it is empty (""), and for the reasons given above I'm getting an error:
    javax.faces.FacesException: Can't set managed bean property: 'applicationId'.
    at com.sun.faces.config.ManagedBeanFactory.setPropertiesIntoBean(ManagedBeanFactory.java:576)
    at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:233)
    at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:256)
    ... 60 more
    Caused by: java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:489)
    at java.lang.Integer.<init>(Integer.java:609)
    at com.sun.faces.config.ManagedBeanFactory.getConvertedValueConsideringPrimitives(ManagedBeanFactory.java:855)
    at com.sun.faces.config.ManagedBeanFactory.setPropertiesIntoBean(ManagedBeanFactory.java:555)
    Should I use requestScope instead of param to have my parameter null, and not "" ?
    If so, how should I pass requestScope parameter using commandLink?

    Hi! I have a problem with setting params too. Probably my one is different.
    I have a jsp page which show a datatable, where I can see a row for each Product. If I click on its name I would navigate to another page that shows product informations, as several ecommerce sites do.
    But I can't understand what and how I must set to inform the details page on which product have to show.
    I read in this forum that it's possible to set a parameter in productBean, and then the constructor of product bean loads others fields knowing its id.
    The snippet of my faces-config.xml is:
      <managed-bean>
        <managed-bean-name>product</managed-bean-name>
        <managed-bean-class>test.backing.ProductBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
        <managed-property>
          <property-name>idToLoad</property-name>
          <property-class>java.lang.Integer</property-class>
          <value>#{param.id}</value>
        </managed-property>
      </managed-bean>It is possible? is a correct solution? and if it is, how can I do that?
    Thanks very much if someone can resolve my problem.
    Claudio.

  • Managed Bean Help for Definition Help

    I am working on creating Managed Bean Help for Definition Help as described in ‘19.5.3 How to Create Managed Bean Help’ section of the Web User Interface Developer's Guide fpr ADF. Using JDev Version 11.1.2.1.0.
    Thought I had all the artifacts assembled but when I run the log message is: <ELHelpProvider> <_getTranslationMap> ELHelpProvider's helpSourceExpression is null.
    Any suggestions would be greatly appreciated.
    Here is the managed bean:
    public class ELHelpProviderProjRequest extends ELHelpProvider {
        public ELHelpProviderProjRequest() {       
        /* To use the HelpProvider, the EL expression in the helpTopicId attribute must point to a Map, otherwise
           * you will get a coerceToType error. */
        public Map<String, String> getHelpMap()
              Iterator iterator = _HELP_MAP.entrySet().iterator();                
              while(iterator. hasNext()){       
              System.out.println("hash map entry " + iterator.next());
            return _HELP_MAP;
        static private final Map<String, String> _HELP_MAP = new HashMap<String, String>();
            static {
              // each element [put] can be for a separate helpTopicId attribute
              _HELP_MAP.put("MAPHELP_CATEGORY_CAPITAL_DEFINITION", "Map value for credit card definition");
              _HELP_MAP.put("MAPHELP_CATEGORY_OTHER_DEFINITION", "Map value for credit card instructions");         
    }  Here is the adf-setting.xml in Application sources / META-INF:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adf-settings xmlns="http://xmlns.oracle.com/adf/settings" > 
      <adf-faces-config xmlns="http://xmlns.oracle.com/adf/faces/settings">
      <help-provider prefix="MAPHELP_">
        <help-provider-class>   
            com.corpnet.abc.util.ELHelpProviderProjRequest
        </help-provider-class>
        <property>
          <property-name>helpSource</property-name>
          <value>#{helpTranslationMap.helpMap}</value>
        </property>
      </help-provider>
    </adf-faces-config> 
    </adf-settings>Here is the faces-config:
    <managed-bean>
        <managed-bean-name>helpTranslationMap</managed-bean-name>
        <managed-bean-class> com.corpnet.abc.util.ELHelpProviderProjRequest </managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>Here is the helpTopicId in the inputText component:
    <af:inputText value="Test" inlineStyle="font-weight: bold;" id="it31" simple="true" helpTopicId="MAPHELP_CATEGORY_CAPITAL" readOnly="true"/>

    Register the managed-bean as a help provider in the adf-settings xml like:
    Example 19-9 Registering a Managed Bean as a Help Provider
    <adf-settings xmlns="http://xmlns.oracle.com/adf/settings">
    <adf-faces-config xmlns="http://xmlns.oracle.com/adf/faces/settings">
    <help-provider prefix="MAPHELP_">
    <help-provider-class>
    oracle.adf.view.rich.help.ELHelpProvider
    </help-provider-class>
    <property>
    <property-name>helpSource</property-name>
    <value>#{helpTranslationMap.helpMap}</value>
    </property>
    </help-provider>
    </adf-faces-config>
    </adf-settings>
    As you've pointed out, Review section 19.5.3 for more details -> http://docs.oracle.com/cd/E24382_01/web.1112/e16181/af_message.htm#CHDHIGIA
    You could also investigate use the OHW product available here: http://www.oracle.com/technetwork/developer-tools/help/index-083946.html

  • How to change MANAGED-BEAN-SCOPE??????

    Hi Gurus,
    How to change the managed-bean-scope? In my ADF application I have created one backing bean which has attched with the page fragment. I cant able to set the bean scope other than REQUEST....
    If I set the bean scope request, then page and the inside fragment is rendering without any error. But I need to make that bean scope to pageFlow... but if I do, getting the below error. Non of the scopes are working except request... Please help me how to set the other scope which will solve my major development issue!!!!
    Error:
    Error trying to include:viewId:/advsearch-flow-definition/advUserSearch uri:/app/advUserSearch.jsffjavax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'UserSearch' resolved to null
    My ADFC-Config.xml:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <managed-bean>
    <managed-bean-name>backing_app_idm</managed-bean-name>
    <managed-bean-class>edu.syr.oim.backing.app.Idm</managed-bean-class>
    <managed-bean-scope>backingBean</managed-bean-scope>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1app/idm.jspx-->
    </managed-bean>
    <managed-bean>
    <managed-bean-name>backing_app_userMgmt</managed-bean-name>
    <managed-bean-class>edu.syr.oim.backing.app.UserMgmt</managed-bean-class>
    <managed-bean-scope>backingBean</managed-bean-scope>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1app/userMgmt.jspx-->
    </managed-bean>
    *<managed-bean>*
    *<managed-bean-name>UserSearch</managed-bean-name>*
    *<managed-bean-class>edu.syr.oim.backing.app.UserSearch</managed-bean-class>*
    *<managed-bean-scope>request</managed-bean-scope>*
    *</managed-bean>*
    </adfc-config>
    -kln
    Edited by: klogube on Jan 14, 2010 7:23 AM

    *public class UserSearch {*
    private RichTable searchResultTable;
    private Row currentRow;
    private String selectedNetID;
    private RichInputText inputOne;
    private RichInputText inputTwo;
    private RichInputText inputThree;
    private RichSelectOneChoice choiceOne;
    private RichSelectOneChoice choiceTwo;
    private RichSelectOneChoice choiceThree;
    private RichRegion region;
    private String choiceOneVal;
    private String choiceTwoVal;
    private String choiceThreeVal;
    DCBindingContainer bindings;
    int choiceOneRowIndex;
    int choiceTwoRowIndex;
    int choiceThreeRowIndex;
    Row choiceOnerw;
    Row choiceTworw;
    Row choiceThreerw;
    String choiceOneUserSelected = null;
    String choiceTwoUserSelected = null;
    String choiceThreeUserSelected = null;
    static String  txnTypeOne  = null;
    static String  txnTypeTwo  = null;
    static String  txnTypeThree  = null;
    String netid;
    RequestContext requestContext = RequestContext.getCurrentInstance();
    HashMap rcBackupHM = new HashMap();
    FacesContext facesContext = FacesContext.getCurrentInstance();
    Application app = facesContext.getApplication();
    ExpressionFactory elFactory = app.getExpressionFactory();
    ELContext elContext = facesContext.getELContext();
    FacesContext fc = FacesContext.getCurrentInstance();
    HttpServletRequest request = (HttpServletRequest)fc.getExternalContext().getRequest();
    HttpSession session = request.getSession();
    *public UserSearch() {*
    *public String userSelected() {*
    FacesCtrlHierNodeBinding binding = (FacesCtrlHierNodeBinding) searchResultTable.getSelectedRowData();
    currentRow = binding.getRow();
    selectedNetID = (String) currentRow.getAttribute("netid");
    requestContext.getPageFlowScope().put("netid",selectedNetID);
    return "goToDetails";
    ** Invoke this method when user double click the row in searchResult*
    *public void doDbClick(ClientEvent clientEvent) {*
    FacesCtrlHierNodeBinding binding = (FacesCtrlHierNodeBinding) searchResultTable.getSelectedRowData();
    currentRow = binding.getRow();
    selectedNetID = (String) currentRow.getAttribute("netid");
    requestContext.getPageFlowScope().put("netid",selectedNetID);
    *try{*
    FacesContext facesCtx = FacesContext.getCurrentInstance();
    NavigationHandler nh = facesCtx.getApplication().getNavigationHandler();
    nh.handleNavigation(facesCtx, "", "goDetails");
    *// Refresh the current region; advse1 is the id of the region component inside jspx page*
    AdfFacesContext.getCurrentInstance().addPartialTarget(region);
    *catch(Exception e){ }*
    *public void setSearchResultTable(RichTable searchResultTable) {*
    this.searchResultTable = searchResultTable;
    *public RichTable getSearchResultTable() {*
    return searchResultTable;
    *public void setInputOne(RichInputText inputOne) {*
    this.inputOne = inputOne;
    *public RichInputText getInputOne() {*
    return inputOne;
    *public void setInputTwo(RichInputText inputTwo) {*
    this.inputTwo = inputTwo;
    *public RichInputText getInputTwo() {*
    return inputTwo;
    *public void setInputThree(RichInputText inputThree) {*
    this.inputThree = inputThree;
    *public RichInputText getInputThree() {*
    return inputThree;
    *public void setChoiceOne(RichSelectOneChoice choiceOne) {*
    this.choiceOne = choiceOne;
    *public RichSelectOneChoice getChoiceOne() {*
    return choiceOne;
    *public void setChoiceTwo(RichSelectOneChoice choiceTwo) {*
    this.choiceTwo = choiceTwo;
    *public RichSelectOneChoice getChoiceTwo() {*
    return choiceTwo;
    *public void setChoiceThree(RichSelectOneChoice choiceThree) {*
    this.choiceThree = choiceThree;
    *public RichSelectOneChoice getChoiceThree() {*
    return choiceThree;
    *public void setChoiceOneVal(String choiceOneVal) {*
    this.choiceOneVal = choiceOneVal;
    *public String getChoiceOneVal() {*
    return choiceOneVal;
    *public void setChoiceTwoVal(String choiceTwoVal) {*
    this.choiceTwoVal = choiceTwoVal;
    *public String getChoiceTwoVal() {*
    return choiceTwoVal;
    *public void setChoiceThreeVal(String choiceThreeVal) {*
    this.choiceThreeVal = choiceThreeVal;
    *public String getChoiceThreeVal() {*
    return choiceThreeVal;
    *public void setRegion(RichRegion region) {*
    this.region = region;
    *public RichRegion getRegion() {*
    return region;
    Can you please explain how to define the 2nd bean in the pageFlowScope and injnect?...bacially my problem is I am loosing the pageFlowScope value when I navigate from first page to next page which I am setting by this above class....I need to carry forward the netid which I am losing ...any idea plz

Maybe you are looking for

  • GetFaultAsString returns no details

    Hi, In a BPEL process I have a Validate step (in SOA Suite 11g 11.1.1.4.0). In my audit trail I see this message when the Valide step raises an exception: Invalid data: The value for variable "xmVariable" does not match the schema definition. Invalid

  • Transfering data between servlets

    hi how would i transfer data between servlets - Im creating a form (form1) which asks the user to enter information - the user then submits, and this takes them to the next form (form2) - i need to transfer the data from form1 to form2 (ie. name, las

  • Recommendation for FHA mortgage lender in Michigan?

    Hey folks! I'm gearing up for my 2016 home ownership quest and am in search of a good mortgage lender/broker in Michigan. I am a first time home buyer who is confused as heck and knows next to nothing about the process except that I need at least a 6

  • Droid x crashing/freezing

    After updating the facebook app and a few others my droidx has been crashing/freezing and sometimes come back othertimes needs a hard battery pull.  now after that has happened I can't get it to even go past the droid eye.  was going to uninstall the

  • In french please, thank: problème de connexion ou problème de compréhension de ma part? j'aimerai bien être remboursée!!!

    j'ai acquis en février dernier cette application, en ayant besoin aujourd'hui j'ai été surprise de constater que je n'étais pas reconnue. j'ai don refait l'acquisition. Est-ce normal? merci de me rembourser.