Re: JDeveloper debugger crashes the JRE in backing bean of a jsff.

Have you find a solution for this problem ?
I face the same problem , I noticed the problem occurred when you change the code in previous written method in managed bean
Regards,

fine,
thanks for your replay Timo,
first of all I'm working in the following environment:
OS Windows 7 Ultimate Service Pack 1 64 bit
JDeveloper 11.1.2.4.0
Using the embedded  JDK 6.0_24-b50
Also I tried to solve the problem So I change the JDK to another Installed in my device 6.0_41 , but with no benefit.
Problem Description :
I create an ADF page fragment , create a manged bean (Request scope) , and create Some action listeners in the managed bean, also I change the "Hot class reload policy" from Tools -- Preferences -- Run -- WebLogic and make it Fast Swap, after that I run my application in debug mode. the page work properly but sometimes If you change the code at run-time in the manged bean and recompile the managed bean and try put break point , The embedded Weblogic application Server automatically shut down!! and raise the following in stack trace:
# A fatal error has been detected by the Java Runtime Environment:
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6da61294, pid=1216, tid=6860
# JRE version: 6.0_24-b50
# Java VM: Java HotSpot(TM) Client VM (19.1-b02 mixed mode windows-x86 )
# Problematic frame:
# V  [jvm.dll+0x1c1294]
# An error report file with more information is saved as:
# C:\Oracle\Middleware\system11.1.2.4.39.64.36.1\DefaultDomain\hs_err_pid1216.log
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
[Server Instance IntegratedWebLogicServer is shutting down.  All applications currently running will be terminated and undeployed.]
[Application termination requested.  Undeploying application AppointmentApp.]
Debugger connection to debuggee process has been lost.
Process exited.
Debugger disconnected from local process.
[04:35:25 PM] [J2EE Deployment SPI:260010]Unable to connect to 't3://localhost:7101' as user, 'weblogic'. Error received: null
[04:35:25 PM] [J2EE Deployment SPI:260010]Unable to connect to 't3://localhost:7101' as user, 'weblogic'. Error received: null
[04:35:25 PM] [J2EE Deployment SPI:260010]Unable to connect to 't3://localhost:7101' as user, 'weblogic'. Error received: null
[04:35:25 PM] t3://localhost:7101: Destination unreachable; nested exception is:
  java.net.ConnectException: Connection refused: connect; No available router to destination
[04:35:25 PM] Destination unreachable; nested exception is:
  java.net.ConnectException: Connection refused: connect; No available router to destination
#### Cannot terminate application AppointmentApp due error undeploying from IntegratedWebLogicServer.
[Application AppointmentApp stopped and undeployed from Server Instance IntegratedWebLogicServer]
[sending request to shutdown server...]
C:\Oracle\Middleware\system11.1.2.4.39.64.36.1\DefaultDomain\bin\stopWebLogic.cmd
Stopping Weblogic Server...
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Connecting to t3://localhost:7101 with userid weblogic ...
This Exception occurred at Thu Jul 11 16:35:34 EEST 2013.
javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://localhost:7101: Destination unreachable; nested exception is:
  java.net.ConnectException: Connection refused: connect; No available router to destination]
  at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
  at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:788)
  at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:366)
  at weblogic.jndi.Environment.getContext(Environment.java:315)
  at weblogic.jndi.Environment.getContext(Environment.java:285)
  at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
  at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
  at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
  at javax.naming.InitialContext.init(InitialContext.java:223)
  at javax.naming.InitialContext.<init>(InitialContext.java:197)
  at weblogic.management.scripting.WLSTHelper.populateInitialContext(WLSTHelper.java:520)
  at weblogic.management.scripting.WLSTHelper.initDeprecatedConnection(WLSTHelper.java:573)
  at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:313)
  at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:203)
  at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:61)
  at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:147)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.python.core.PyReflectedFunction.__call__(Unknown Source)
  at org.python.core.PyMethod.__call__(Unknown Source)
  at org.python.core.PyObject.__call__(Unknown Source)
  at org.python.core.PyObject.invoke(Unknown Source)
  at org.python.pycode._pyx4.connect$1(<iostream>:16)
  at org.python.pycode._pyx4.call_function(<iostream>)
  at org.python.core.PyTableCode.call(Unknown Source)
  at org.python.core.PyTableCode.call(Unknown Source)
  at org.python.core.PyFunction.__call__(Unknown Source)
  at org.python.pycode._pyx15.f$0(C:\Oracle\Middleware\system11.1.2.4.39.64.36.1\DefaultDomain\shutdown.py:6)
  at org.python.pycode._pyx15.call_function(C:\Oracle\Middleware\system11.1.2.4.39.64.36.1\DefaultDomain\shutdown.py)
  at org.python.core.PyTableCode.call(Unknown Source)
  at org.python.core.PyCode.call(Unknown Source)
  at org.python.core.Py.runCode(Unknown Source)
  at org.python.util.PythonInterpreter.execfile(Unknown Source)
  at weblogic.management.scripting.WLST.main(WLST.java:124)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at weblogic.WLST.main(WLST.java:29)
Caused by: java.net.ConnectException: t3://localhost:7101: Destination unreachable; nested exception is:
  java.net.ConnectException: Connection refused: connect; No available router to destination
  at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216)
  at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
  at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
  at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:345)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
  at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:340)
  ... 38 more
Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is:
  java.net.ConnectException: Connection refused: connect; No available router to destination
  at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:470)
  at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:321)
  at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:254)
  at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
  at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
  at weblogic.rjvm.RJVMFinder.findOrCreateRemoteCluster(RJVMFinder.java:316)
  at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:205)
  ... 44 more
Problem invoking WLST - Traceback (innermost last):
  File "C:\Oracle\Middleware\system11.1.2.4.39.64.36.1\DefaultDomain\shutdown.py", line 6, in ?
  File "<iostream>", line 22, in connect
  File "<iostream>", line 646, in raiseWLSTException
WLSTException: Error occured while performing connect : Error getting the initial context. There is no server running at t3://localhost:7101
Use dumpStack() to view the full stacktrace
Done
Stopping Derby Server...
So how can I solve This problem?

Similar Messages

  • CommandButton doesn't invode the function in backing bean.

    I have a jsp page which contains three buttons, and based on a session level state, only one shown at the beginning. Once this button is clicked, the other two are shown and the first one is hidden.
    When the first button (add) is clicked, the other two are shown correctly. But when I clicked any one of them, none of their backing bean methods are called. I checked the log, no exception.
    Then I tried to show all buttons at begining, and click them. Both backing bean methods are invoked.
    Did I miss something in the life cycle of JSF?
    Here is the part of jsp page:
    <h:commandButton action="#{manageBranches.doAddBranches}" image="/images/add.gif" rendered="#{!manageBranches.isAdd}"
    styleClass="toolbaricon" title="#{messages['branches.dropdown.add.branches']}"
    onmouseover="swapImage( this, 'add.gif', 'add_down.gif' );"
    onmouseout="swapImage( this, 'add.gif', 'add_down.gif' );" />
    <h:commandButton action="#{manageBranches.doEditBranches}" image="/images/edit_icon.gif" rendered="#{manageBranches.isAdd}"
    styleClass="toolbaricon" title="#{messages['branches.dropdown.edit.branches']}"
    onmouseover="swapImage( this, 'edit_icon.gif', 'edit_icon_down.gif' );"
    onmouseout="swapImage( this, 'edit_icon.gif', 'edit_icon_down.gif' );" immediate="true" />
    <h:commandButton action="#{manageBranches.doSaveBranches}" image="/images/save.gif" rendered="#{manageBranches.isAdd}"
    styleClass="toolbaricon" title="#{messages['branches.dropdown.save.branches']}"
    onmouseover="swapImage( this, 'save.gif', 'save_down.gif' );"
    onmouseout="swapImage( this, 'save.gif', 'save_down.gif' );" />
    Here are corresponding backing bean methods:
         public String doAddBranches()
              Logger.logEnterPublic(MY_CLASS, "doAddBranches()");
              setIsAdd(true);
              return null;
         public String doSaveBranches()
              Logger.logEnterPublic(MY_CLASS, "doSaveBranches()");
              String forward = null;
              if(addedBranchIds ==null || addedBranchIds.length()==0)
    MessageFactory.addErrorMessage( null, "branches.selectAtLeastOneBranch", null );
    this.successMsg = false;
    return forward;
              else
                   String[] branchIdArray = addedBranchIds.split(":");
              this.successMsg = true;
              //TODO: add save logic
              return forward;
         public String doEditBranches()
              Logger.logEnterPublic(MY_CLASS, "doEditBranches()");
              String forward = null;
              setIsAdd(false);
              return forward;
    The add button worked fine. But when save and edit button were shown and add button was hidden. Both save and edit button can't access the backing bean methonds. I put a break point on the constructor of the backing bean, it WAS accessed!
    Very confusing!
    Thanks for any helps.
    jm.

    Ok, I'm not 100% on this, but it's something you can try. In your action methods, you often return null when you want the page to just be reloaded. I believe in JSF, returning null and returning a string that represents the same page is quite different. I think this is because the component tree will get re-initialized when you return a proper string. It's quite possible that you need to have the component tree re-initialized for everything to work properly.
    Therefore, whenever you want to reload "pageA" then return an abbreviation called "A" (or whatever you want). In your faces-config.xml set up a rule that when outcome "A" is received (while on pageA) then load pageA.jsp.
    Hope that makes some sense! Let me know if it works.
    CowKing

  • Executing Javascript AFTER the action in Backing Bean

    I have a commandButton on my JSP which is bound to a method in my backing bean by the action attribute. However, I also have a Javascript function call in onClick. But, the Javascript function call is always executed first and then my action method is executed. Is there a way to execute the action method first and THEN the Javascript call? I simply just want to popup a message that says 'Save successful' or something to that effect.

    put a onload on your body.
    The javascript function reads a form value and if a certain condition is true you show the alert.
    For example, i've this to clean up error messages. (JavaScript)
    // Cleans the application error messages if there are jsf errors
    function cleanErrorMessages(){
        if(document.getElementById('form1:jsfErrorMessages') != null){
            document.getElementById('form1:applicationErrorMessages').innerText='';
    }

  • How to track PropertyChangeEvent for the backing beans?

    Hello
    I'm working on JSF 1.2 + JDK 1.6. Would like to know wether any direct support for tacking the PropertyChangeEvent for the backing bean. Objective is to keep track of the modified entities ( backing bean) and update the corresponding Database records at later stage with the modified attribute/record.
    E.g:
    Assume a datatable is populated with list, and 3 rows alone is modified, So the DB update is supposed to happen only for those rows. I prefer to have the PropertyChange tracking logic in one place. Dont want to add PropertyChangeListener for all backing beans.
    Can anybody help me on this.
    Thanks in advance
    Jobinesh
    Edited by: JobineshP on Jun 20, 2008 6:52 AM

    This is no direct support in JSF for PropertyChangeEvents.
    As for other solutions to your problem, first looking specifically at the database updates, Hibernate tracks modifications to fields and can be configured to only update the needed columns (see the dynamic-update attribute). So perhaps Hibernate can suit your needs or you could use their techniques to solve your problem.
    Taking a wider view of the general problem of adding PropertyChangeListeners to managed beans, I would be inclined to use Spring and AOP to add the PropertyChangeEvents to all the setters. Spring might also help the configuration of the PropertyChangeListeners. Although I have to say that I think that PropertyChangeEvents are of limited use in a web application.
    Another approach might be to hook into the JSF EL expression engine. You could add a special ELResolver whose purpose is to discover when the property changes happen. The drawback is that all the setting must be done via the EL in order for this to work.

  • We should NEVER use the session back bean?

    Because the user can open a new window by right click the link, and the session scope back bean is not thread-safe.
    So we should forget it?

    Your concern makes really no sense, or you must be storing request scoped data in a session scoped bean instead of a request scoped bean, which can indeed lead to undesireable behaviour in multiple requests on the same session.

  • How to show popup from backing bean code immediately?

    Hi,
    I'm using JDeveloper 11.1.2.1.0 and have problems with showing popups. I have a button with an action on my page and a method in backing bean.
    I want to rise up few popups from this method in backing bean (for example just an anouncement that something will happen) or a dialog
    (for example a question if you want to continue).
    I understand how to get a dialog response to deal with it in code, but the problem is that the popup doesn't show up immediately, but only when
    this method called on button finishes. I'd like to handle dialog responses in the middle of the action and then the code to continue with the execution.
    Here is my backing bean code:
    private RichPopup popup;
    public String test() {
    //Some code...
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    popup.show(hints);
    //Here is the place for code which I want to be executed after popup closes,
    //but is executed before the popup shows...
    return null;
    And here is part of my jssf:
    <af:commandButton text="Test" id="cb1"
    action="#{popupBean.test}"/>
    <af:popup id="popup" binding="#{popupBean.popup}">
    <af:dialog id="dialog" type="yesNo"
    title="Dialog"
    dialogListener="#{popupBean.onDialogAction}"
    binding="#{popupBean.dialog}" clientComponent="true">
    <af:outputText value="Do you want to continue?" id="ot1"/>
    <af:clientListener method="onDialogCancel" type="dialog"/>
    <af:serverListener type="DialogCancelHandlerEvent" method="#{popupBean.onDialogCancel}"/>
    </af:dialog>
    </af:popup>
    Can someone give me some answer how to show the popup from backing bean code immediately?
    Thanks in advance,
    Tina

    If you want to execute code after popup closes, then put this code in PopupCanceledListener or in DialogListener(you can't block method execution).
    Dario

  • Need help with fillling backing bean w/info

    I am new to JSP and have some very basic questions regarding filling a JSF with data from the database and then allowing the user to edit and save the data back to the database.
    I am using JDeveloper 10.1.3 developer preview
    This is what I have so far (which may be suspect in itself):
    1. A method called DatabaseUtil.getProductApproval(productApprovalNbr) which creates and returns a ProductApprovalBean
    2. A JSF called search.jsp with backing bean Search.java.
    3. Another JSF called productApproval.jsp with backing bean ProductApproval.java
    4. Successful navigation defined from search.jsp to productApproval.jsp
    5. The backing bean Search.java has a SearchButton_action that returns success if productApprovalNbr specified is OK (edit currently hard-coded)
    6. The productApproval.jsp has a component called productApprovalNbr with binding to backing_search.productApprovalNbr
    This is want I want to do but don’t know how:
    1. Make a call to create the ProductApprovalBean and fill the productApproval.jsp backing bean with info from ProductApprovalBean before the productApproval.jsp is displayed to the user.
    2. Allow the user to change values and save them back to the db after clicking on the save command button.
    How do I wire this stuff up?
    Any advice will be greatly appreciated because I am stuck big time.
    Regards,
    Al Malin

    Thanks for the reply Brian.
    I’ve looked at directly binding to the ProductApprovalBean and that looks like a good approach to take in other cases but for the UI design I currently have I am not sure.
    Basically, the ProductApprovalBean is a master entity with several related detail entities. This is so because the user wants to see all of the related data on a single page instead of showing one page for a master, another for a detail, another for another detail, etc. So I am designing a JSF form that consists of multiple sections, each section presenting an entity. Each detail section would have its own command buttons for editing, adding, and deleting rows.
    Since my first post I have figured out how to fire an event in search.jsp and catch it in an event handler in the backing_bean. (This was great progress --- only took me 9 hours to write 6 lines of code. :-) From here I figured I could access the db and load up the fields for the first screen and do updates with the subsequent screens.
    After looking through the documentation, I not sure I’m up to the task. New problem, I don’t know the JSF classes well enough to load up the fields, and after they are loaded, how do I get the data out. (At first, JSF looked really slick but there has been a steep leaning curve associated with it, I'm real close to reverting to JSPs and servlets.)
    If I am on the wrong path and this approach is all wet, please say so.
    Regards,
    Al Malin

  • Need to Add and Remove Columns of ADF Read Only table from Backing bean

    I have a scenario where I am trying to Populate TransientVO which is shown has a ADF Read Only Table in page.
    I have couple of Check Boxes Based on their selection I am trying to render and hide certain Columns.
    But the Issue which I am facing is only the Column Header seems to change where as the Rows and Values doesnt..
    even If I apply the expression language rendering condition on the outputText inside those columns.. ..
    So I am thinking to add and remove VO Attribute columns to the table from backing bean.
    Need some sample code snippet or a better design to achieve this. Its kind of urgent too...having an aggressive deadline :(
    Please chip in People..
    Thanks in Advance .
    TK

    Table Code..
    <af:table value="#{bindings.InventoryGridTrans.collectionModel}"
                                    var="row"
                                    rows="#{bindings.InventoryGridTrans.rangeSize}"
                                    emptyText="#{bindings.InventoryGridTrans.viewable ? 'No data to display.' : 'Access Denied.'}"
                                    fetchSize="#{bindings.InventoryGridTrans.rangeSize}"
                                    rowBandingInterval="0" id="t4"
                                    partialTriggers="::sbcSales ::sbcUsage ::cb1">
                            <af:column sortProperty="Period" sortable="false"
                                       headerText="#{bindings.InventoryGridTrans.hints.Period.label}"
                                       id="c38">
                              <af:outputText value="#{row.Period}" id="ot33"/>
                            </af:column>
                            <af:column sortProperty="Past12SalesCount"
                                       sortable="false"
                                       headerText="#{bindings.InventoryGridTrans.hints.Past12SalesCount.label}"
                                       id="c29"
                                       rendered="#{backingBeanScope.IndexPageBackingBean.onUsage != true and backingBeanScope.IndexPageBackingBean.onSales == true}">
                              <af:outputText value="#{row.Past12SalesCount}"
                                             id="ot40"
                                             rendered="#{backingBeanScope.IndexPageBackingBean.onUsage != true and backingBeanScope.IndexPageBackingBean.onSales == true}"
                                             visible="#{backingBeanScope.IndexPageBackingBean.onUsage != true and backingBeanScope.IndexPageBackingBean.onSales == true}">
                                <af:convertNumber groupingUsed="false"
                                                  pattern="#{bindings.InventoryGridTrans.hints.Past12SalesCount.format}"/>
                              </af:outputText>
                            </af:column>
                            <af:column sortProperty="Past12UsageCount"
                                       sortable="false"
                                       headerText="#{bindings.InventoryGridTrans.hints.Past12UsageCount.label}"
                                       id="c40"
                                       rendered="#{backingBeanScope.IndexPageBackingBean.onUsage == true and backingBeanScope.IndexPageBackingBean.onSales != true}"
                                       visible="#{backingBeanScope.IndexPageBackingBean.onUsage == true and backingBeanScope.IndexPageBackingBean.onSales != true}">
                              <af:outputText value="#{row.Past12UsageCount}"
                                             id="ot47"
                                             rendered="#{backingBeanScope.IndexPageBackingBean.onUsage == true and backingBeanScope.IndexPageBackingBean.onSales != true}"
                                             visible="#{backingBeanScope.IndexPageBackingBean.onUsage == true and backingBeanScope.IndexPageBackingBean.onSales != true}">
                                <af:convertNumber groupingUsed="false"
                                                  pattern="#{bindings.InventoryGridTrans.hints.Past12UsageCount.format}"/>
                              </af:outputText>
                            </af:column>
                            </af:column>
                    </af:table>

  • Backing bean properties not getting updated

    I have an input text in my JSP page and it is component-bound to backing bean. The problem is that when I change value of the InputText in the JSP, the value is not getting updated in the backing bean.
    Here is the InputField definition in JSP page.
    <h:inputText binding="#{backing_employeeEdit.firstName}"
    id="firstName"/>
    and here is the setter in backing bean
    public void setFirstName(HtmlInputText inputText1) {
    this.firstName = inputText1;
    Pls note that there is no validation errors because the page navigates successfully. The only problem is that new value is not updated.

    I don't know, wht exactly u wants to do... Here is java code and is working fine for me...
    Emp.java
    public void action() {
         System.out.println(inputText.getValue());
         Emp tt = new Emp();
         inputText.setValue(inputText.getValue().toString()+"bilal");
         tt.setInputText(inputText);
         System.out.println(inputText.getValue());
    JSP...
    <f:view>
    <h:form>
    <h:inputText binding="#{emp.inputText}" />
    <h:commandButton value="submit" action="#{emp.action}" />
    </h:form>
    </f:view>
    faces-config file contents....
    <managed-bean>
              <managed-bean-name>emp</managed-bean-name>
              <managed-bean-class>
                   com.nous.application.Emp
              </managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    Here scope has to be session, otherwise u will lose old value...

  • Confusion about backing beans and multiple pages

    Hello:
    I'm new to JSF and am confused by several high level and/or design issues surrounding backing beans. The
    application I am working on (not unlike many apps out there, I suspect), is comprised of several forms which
    collect various query parameters and other pages that display the query results via dataTables. Additionally, the
    displayed results have hyper-text enabled content sprinkled throughout in order to allow further "drill-down" to
    greater details about a given result.
    Obviously, the initial forms are backed by a managed bean that has the getters/setters for each of the various
    fields. From a modularization perspective, I'd prefer to have the query execution in a separate class entirely,
    which I can accomplish via delegation or actionListeners. Where I get confused is in the case that one of the
    hyper-text enabled fields needs to invoke yet another query requiring specific values from the original result.
    In this case, how should I design the beans to store the pertinent selection information AND still be able to
    have the resulting 'details' query in a separate class.
    For example, let's assume that I have a form with a simple backing bean to collect initial query params. The user
    fills out the form and clicks on submit. The action field of the <h:commandButton> tag inside the <h:form>
    delegates to a method which performs the query and returns a navigation string to the results display page. The
    results page then uses a <h:dataTable> tag to display the results. However, through the process of displaying the
    results, it will create the hyper-text links as follows:
                        <h:form>
                            <h:commandLink action="viewDetails">
                                <h:inputHidden id="P_ID" value="#{results.id}"/>
                                <h:outputText value="Click here to see details"/>
                            </h:commandLink>
                        </h:form>Notice that the value="#{results.id}" is the key field (in some case I may need more than one) that the subsequent
    details page will need to perform the query. However, this value is stored in the results attribute of the original
    query backing bean. I do NOT want to add yet another level of queries into the same backing bean as I would like
    to keep the original and details query beans separated for maintenance and style reasons. How then, can I get this
    specific value ("#{results.id}") into another backing bean that could be accessed by the subsequent details page
    and query? In general, how does one map a single display element to multiple backing beans (or accomplish the
    effect of having one 'source' bean's value end up in another 'destination' bean's attr? If this is not possible,
    then isn't the details query/page forced to use the same backing bean in order to get the data it needs? If so,
    how can it determine which id was selected in this case?
    I'd appreciate any thoughts, ideas and suggestions here! Is there a better way to design the above in order to
    maintain the separation of logic/control? What is the 'best practice' approach for this sort of stuff?
    Thanks much in advance!

    This is what I have done in the pass
    <h:commandLink action="#{AppAction.getRecord}" >
    <h:outputText value="#{bbr.id}"/>
    <f:param name = "recordid" value ="#{bbr.id}" />
    </h:commandLink>
    within the getRecord method
    String key = "";
    FacesContext facesContext = FacesContext.getCurrentInstance();
         ServletContext servletContext = ServletContext)facesContext.getExternalContext().getContext();
    key = (String)facesContext.getExternalContext().getRequestParameterMap().get("recordid");
    then call you dbmethod passing in the key of the record the user wants to edit
    and then simply return a string to what page you want the user to go to
    I think this is what your looking for

  • Page scoped backing bean keeps old data, why???

    I have two pages, a search/list page and an add page. On the search/list page there is an add buttom that simply navigates to the add page.
    The first time I press the add button all fields in the page are blank so I enter data and submits. The data i saved and we are navigated back to the search/list page. The next time I press the add button and are naviagted to the add page, all fields are filled with the same values as the last time I visited the page.
    The add page backing bean is (annotated by Seam) to reside in PAGE scope so it should loose its values between invokations of the add page.
    I get the exact same instance of the bean every time I nav to the add page. (Until the session is closed of course)
    Why this behaviour?
    Thanx.

    Check if a session scoped bean or other class is keeping a reference to the bean

  • Differences between servlet and backing bean

    Could anyone please tell me whether everywhere that servlet can be used, backing bean and JSF can be used too? Are JSF and backing beans the new alternatives for JSP and servlets? please clarify the relations between these concepts for me.
    Thanks
    Laura

    Laura_Jlover wrote:
    Thank you. You mean backing beans can do every thing that servlets can do? Yes.
    JSF pages can work with servlets? Strictly speaking, every JSF page gets passed through the FacesServlet which does all the task. The lifecycle, creating the FacesContext, putting the request parameters in backing beans, rendering the response, etcetera.
    what are the advantages of servlet and the advantages of backing beans? what's the disadvantages? In general, which one is better?In context of JSF, you should be using backing beans, not Servlets. There is nothing what a Servlet can offer you as an advantage in the JSF context. It is simply not an option/alternative. You can't even call a Servlet (directly) using a JSF h:form. You, however, can access backing beans in any JSP or Servlet outside the JSF context.
    Just carefully read the JSF specification or buy a JSF book and the picture will be clear.
    JSF spec: [http://jcp.org/aboutJava/communityprocess/final/jsr252/index.html].
    JSF book: [http://www.amazon.com/JavaServer-Faces-Complete-Reference/dp/0072262400].

  • About backing bean method's invokation

    Hi,
    I have a backing bean method binded to a component:
    <af:selectOneChoice value="#{bindings.managerId.inputValue}"
    label="Manager" valign="middle"
    binding="#{backing_searchDocuments.managersList}"
    valuePassThru="true" immediate="false"
    rendered="#{bindings.ListManagersIterator.estimatedRowCount > 1}">
    <f:selectItems value="#{bindings.managerId.items}"/>
    When page refreshes component executes his binding method. But in some cases, actually when I press the commandMenuItem leading to the same page where I am it seems that it doesn't get invoked.. how can I manage the invocation of backing bean's methods? I need it invoked every time any request is made.. How to do that?

    Mario,
    this method is executed when the component re-draws. So anything other than a PPR request makes this binding method being called.
    If PPR is used with your commandMenuItem, them make sure the PPR trigger is set to refresh the component.
    I don't know what code it is that you need to execute each time, but maybe putting this on a action listener is a better idea
    Frank

  • How to prepopulate properties of a backing bean

    Hi Everybody,
    I am new to JSF. In order to display a form with fields set to some value, I was trying to prepopulate properties of the form's backing bean based on properties of another bean. I tried the following and it doesnot work
    <managed-bean>
    <description>blah blah</description>
    <managed-bean-name>visitBean</managed-bean-name>
    <managed-bean-class>com.x.y.VisitBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    managed-bean>
    <description>blah blah</description>
    <managed-bean-name>infoBean</managed-bean-name>
    <managed-bean-class>com.x.z.InfoBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>name</property-name>
    <value>#{visitBean.user.name}</value>
    </managed-property>
    <managed-property>
    <property-name>phoneNumber</property-name>
    <value>#{visitBean.user.phoneNumber}</value>
    </managed-property>
    </managed-bean>
    I want to use the InfoBean class to capture data from info.jsp. I also want the info.jsp to be prepopulated with data from VisitBean.
    I first populate the visit bean from the database and then when the user clicks on the edit information link, the information form in info.jsp should be prepopulate with his information.
    Am I doing something wrong ? Is there a more elegant way of initializing the properties of a backing bean ?
    Any help will be appreciated.
    Thanks in advance.

    You can use the constructor to set the initial values of your bean.
    You may need to retrieve the visitBean from the session scope to do this.
    FacesContext.getCurrentInstance().getExternalContext().
                   getSessionMap().get("visitBean");Hope this helps.
    CowKing

  • ADF Faces Declarative Component onLoad event call Backing Bean Method

    Hello.
    We are trying to implement a declarative component, that will be used as Flex Fields for our application, ie, the components will be created dynamically through a database configuration, and who is responsible for organizing and creating the components, is the declarative components, and its own backing bean.
    The declarative component, will receive a List of custom components, and with this list it is possible to create the components dynamically. We want the components to be created as soon as the page is loaded. The developer could place this declarative component in any region of his page, and even in another tab if he wishes. The problem is, that we cannot register a load event in the declarative component, since it doesn't have a document Object, to call the declarative components backing bean method that is responsible for creating components.
    How could we simulate the onLoad (of the declarative components) so that the backing bean method (responsible for creating component, and putting it in the view tree) could be called ?
    I've tried with a RENDER_RESPONSE phaseListener, but the beforePhase has no objects in the tree, and the afterPhase has already rendered to the client.
    Any ideas on how to achieve this ?
    Thanks a lot.
    Regards,
    John

    Hi Frank, thanks for the response.
    I'm curious about the dynamic declarative component. Any place I could check it out ?
    Back to my scenario. I'll try to be more clear to what we need!
    We have to have dynamic creation of components, based on a database configuration. This will allow our customers to have custom flex fields, without the need of us developing custom pages for each customer.
    One solution we are trying out, is the declarative component. Why ? Because the developer (when developing the page), knows that this specific page, is possible of customization by the client (custom flex fields). With this, the developer would choose where on his page the custom flex fields will be placed. Note that at this point (design time), no component (input, buttrons, etc) is created. The idea of the declarative component, is just so the Developer knows where he wants the custom fields placed in his page (a tab, below the form fields, in a another panel group, and so on). The declarative component, has only a container, PanelFormLayout, and no other component.
    What we want, is a way of calling our managed bean (the managed bean of the declarative component, that now I did configure it in the adfc-config.xml file , thanks for the tip) method, that's responsible for creating the custom components. The declarative component, receives a list of all the custom fields that needs to be created, at design time, through an attribute. The developer is responsible for setting this list when he drags the declarative component on his page.
    Now that I've put the declarative components managed bean in the adfc-config.xml file, the @PostConstruct is called correctly, but I still have a problem. At this moment (postContstruct call), my component PanelFormLayout (that is binded to the managed bean), is null. So I cannot add any component to the PanelFormLayout.
    Am I way out of line here Frank ?
    Really appreciate your comments.
    Thanks a lot.
    John

Maybe you are looking for

  • OS 9 No longer works on my powerbook g4

    Hi, I can no longer use certain software because OS 9 no longer opens in my computer. Not sure what to do and I can no loner use my printer for example. I really need it for work please help. Thank you, Sandra

  • AP standard report

    HI all, Is there any standard report available so taht the AP user can see the Purchase order details ( PO no, Qty, Amount, date of PO) as well the Invoice details together  for the PO and the Invoice details (Paymnet terms, due date, paymnet method

  • OBIEE 11G authentication integration with EBS 11 - is it possible?

    Hi experts, My OBIEE 11.1.1.5 is installed on Linux 64 bit machine. I've thoroughly performed all the action listed in the guide, but I'm getting the famous 'You are not logged in' message. Has anybody succeeded to enable security integration between

  • Using names instead of codes in our forms.

    I have two tables: 1. Table A which has next 3 fields: Code: CHAR 2 Name: VARCHAR2 40 Code_B: CHAR 1 2. Table B which has next 2 fields: Code: CHAR 1 Primary key Name: VARCHAR2 40 Between the table A and the table B there is a relationship which is m

  • Is there any easier way to set as homepage

    Is there an easy way to ask our users to set my website [http://www.itsmysearch.com] (or any other page on that website) as Homepage. I mean, currently i ask users to 'drag the link' on their homepage icon. But isn't there a way so that, they just cl