Cant multiple JSF Forms post to same Backing Bean?

Wondering why cant i have two jsf forms (for example : Create & Update jsf form) post to same backing bean using value binding technique

I have one more question
Cant i have single JSF form post to multiple backing beans even this doesnt work for me
Please not backing bean is in session scope in both the cases

Similar Messages

  • 2 forms in one page and same backing bean

    Hi,
    Can I use the same backing bean to handle 2 forms in the same page?
    I have something like
    <h:form id="form1">
    <h:commandButton action="#{myBackingBean.doForm1}" />
    </h:form>
    <h:form id="form2">
    <h:commandButton action="#{myBackingBean.doForm2}" />
    </h:form>
    When I click the first button, "doForm1()" is invoked. But when I click the second button, "doForm2()" is not invoked!!!
    What do I do wrong here?
    Thanks!
    Qingtian

    Hi user11969500,
    If you are using same item names in the multiple forms in a page you will definitely get the error.
    Create forms in separate pages you can display those forms in a page using iframe or frames concept
    Thanks and Regards
    Maheswara

  • JSF EL: referencing programmatically generated backing beans

    Hi all,
    I create backing beans in Java code using the ValueBinding class:
    for(Question q : questions){
      ValueBinding vb = FacesUtilities.createValueBinding("#{requestScope.questionBean" + question.getId() + "}");
      vb.setValue(FacesContext.getCurrentInstance(), new QuestionBean(question));
    }No problem so far, but how can I reference these backing beans dynamically using the JSF EL?
    <c:forEach var="question" items="#{questionListBean.questions}">
      <h:outputText value="#{#{requestScope.questionBean}#{question.id}.type}"/>
      <h:outputText value="#{requestScope.questionBean#{question.id}.type}"/>
    </c:forEach>None of them seem to work because nesting expressions is not an option. Anybody got a clue?
    Thanks in advance!
    Kind regards,
    Dirk

    Make a List of QuestionBean objects and place that in the request scope instead.

  • JSF 1.0 Final - no backing bean validation of empty imputs

    Hi,
    I have simple inputText with validator in backing bean :
    <h:inputText id="layName" maxlength="30" value="#{shp.layerName}" validator="#{shp.validate}"/>
    and validator is executed properly when inputText isn't empty, but when is empty it isn't !.
    In my opinion validator should be executed in every reason, so I wonder if it is a bug ?
    I know that I can set required attribute to "true" and have additional validation of empty values :
    <h:inputText required="true" id="layName" maxlength="30" value="#{shp.layerName}" validator="#{shp.validate}"/>
    <h:message id="errors1" for="layName"/>
    but in this case I will receive standard error message. So my second question is how to overwrite this message with localized massage if backing bean validator isn't executed ?
    Thanks in advance.
    Olek

    If required is "false", then validators will not execute when the field is empty.
    The spec defines how to override the error message for when "required" validation fails, though I don't have the spec handy at the moment.
    -- Adam Winer (EG member)

  • Does Oracle support multiple pdk-forms on the same page??

    We have a portal page that contains two portlets (“summary” and “review comments”) and each in turn contains a pdk-form. When a form (say “review Comments” portlet) is submitted via post, in the resultant page, the second portlet (“summary”) gets the post parameters from the first portlet as hidden fields. Here is a snippet of the resultant HTML source that shows the second form’s automatically generated hidden fields:
    ==============================================================================
    <form name="summaryFormBean" method="post" action="http://host/portal/page">
    <INPUT TYPE="hidden" name="_pageid" value="584,1564971" />
    <INPUT TYPE="hidden" name="_dad" value="portal" />
    <INPUT TYPE="hidden" name="_schema" value="PORTAL" />
    <INPUT TYPE="hidden" name="facilityId" value="1232187" />
    <!—The parameters from the review comments portlet -->
    <INPUT TYPE="hidden" name="_piref584_1564976_584_1564971_1564971.1415711_REVIEWCOMMENTS_49519881org.apache.struts.taglib.html.TOKEN" value="2c6b4e323df1281c93602ecc9d855819" />
    <INPUT TYPE="hidden" name="_piref584_1564976_584_1564971_1564971.strutsAction" value="reviewComments.do" />
    <INPUT TYPE="hidden" name="_piref584_1564976_584_1564971_1564971.reviewFacilityComments" value="this is a test" />
    <INPUT TYPE="hidden" name="_piref584_1564974_584_1564971_1564971.strutsAction" value="summary.do" />
    Due to the presence of the “strutsAction” hidden parameter of the previously submitted “review comments”, when the form in the second portlet (“summary”) is submitted, the “review facility comments” are resubmitted erroneously.
    Is this a known issue with oracle portlets? Any thoughts/comments will be appreciated.

    Hi Omar,
    At least for me it does not help much since it looks like they are not talking about relating a parent table with one or more child tables. For me as a beginner with this product, I also wanted to know how to do that. It would be nice if the wizard allowed more then one child table to be related to the parent. When I have time I will look further into how the wizard created the relations and other bits. Also that thread was talking about forms. I noticed that the wizard created two report regions. Since I am an Oracle Forms developer, HTML DB terminology is quite different so I need to kind of re-learn what they are talking about.
    Did you try to make a Master/Detail form with the wizard yet? If you choose to go that route, please let me know how you make out.
    Thanks.
    Emad

  • Validate Multiple Inputtext and launch validation from backing bean

    Hi to all
    How can i validate multiple inputtext in a form?
    And how can i launch a validation from backin bean?
    Thanks

    Thank you very much, that is what i was looking for.
    I have one more problem:
    if i make this, it's showing me an error, i can't do it
    FacesContext context= FacesContext.getCurrentInstance();
    FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "Value entered is invalid");
    msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "component level message - Value entered is invalid");
    context.addMessage(FacesContext.getCurrentInstance().getViewRoot().findComponent("<id_of_the_inputtext_component"), msg);
    context.addMessage takes only two strings as arguments
    Edited by: 838674 on 23-mar-2011 4.56

  • 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

  • Communications between two Backing beans

    Hi all,
    Currently I am working in an application which contains two pages. For eg page1.jsp and and page2.jsp which contains separate backing beans and JSP pages.Here I have included page2.jsp with page1.jsp using jsp:include which will be shown in a rich:modalpanel.This rich model panel will be rendered only when a button is clicked, say choose button.
    page1.jsp
    <h:form>
    // page1 jsp codes written using JSF
    </h:form>
    <<rich:modalPanel id="lPanelId" autosized="true" top="20px" left="90px" moveable="true" styleClass="rich-modalpanel rich-mpnl_panel">
                    <jsp:include page="/page2.jsp"/> // Include page2.jsp using a modal panel
                           </rich:modalPanel> I have used two seperate forms for each page.Though I have used jsp:include the forms of two pages(page1 and page2) are submitted when clicked the link of page1. So If I change anything in page1 for example if I selected a check box and when I clicked the choose button in page 1 inorder to include page2.jsp in a modal panel. If the same check box takes place in Page2.jsp means it should also be selected but I cant able to communicate between the two backing beans.because the page1 and page2 constructors are called when the page 1 is loaded.So I cannot communicate between page1 and page2 after the choose button action.
    Please anyone out there give me some valuable inputs on this regardings.
    Thanks in Advance

    chrisjohn wrote:
    Hi everybody,
    I have used <jsp:include> tag in a jsf page to include another page(which comes in a modal panel).I would like to know how to pass values from the first backing bean to second backing bean without any button action or Html form.please give some valuable inputs on this regarding.
    Thanks in AdvanceJust access the backing bean the usual way. It is also available there in the included page.

  • 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

  • JSV-Validation discards some backing bean properties

    Hi guys,
    I'm facing a curious problem occuring in my jsf-application. I have a userlist on my page. Every user can be edited (change password, etc) or a new user can be created. When I click the "edit-user"-button, a new page is opened where I can change different properties of this user. When I submit the form, the jsf-validation is beeing called (because I set some properties to attribute "required"). When an error occurs, the action-command returns null and goes back to the page. But not all properties of my backing bean arent set! It seems, that only the properties beeing set to attribute "required" are saved... How can I fix this?
    My jspx-page that creates/updates a user looks like that:
    <h:form>
         <h:inputHidden value="#{userFormBean.userID}" />
         <h:panelGrid border="0" columns="2" style="margin-bottom:15px;">
              <h:outputLabel value="#{msg['ui.user.create.lastname.label']}:" />
              <h:inputText value="#{userFormBean.name}"
                              required="true"
                              label="#{msg['ui.user.create.lastname.label']}" />
              <h:outputLabel value="#{msg['ui.user.create.firstname.label']}:" />
              <h:inputText value="#{userFormBean.firstname}"
                              required="true"
                              label="#{msg['ui.user.create.firstname.label']}" />
              <!-- more properties... -->
         </h:panelGrid>
         <c:if test="#{userFormBean.state == applicationScope.constants.STATE_NEW}">     
              <h:commandButton action="#{userFormBean.createUser}" value="#{msg['ui.user.create.button']}">
                   <f:setPropertyActionListener value="#{applicationScope.constants.STATE_NEW}" target="#{userFormBean.state}"/>
              </h:commandButton>
         </c:if>
         <c:if test="#{userFormBean.state == applicationScope.constants.STATE_UPDATE}">
              <h:commandButton action="#{userFormBean.updateUser}" value="#{msg['ui.user.update.button']}">
                   <f:setPropertyActionListener value="#{applicationScope.constants.STATE_UPDATE}" target="#{userFormBean.state}"/>
              </h:commandButton>
         </c:if>          
    </h:form>     This is my backing bean that does all the logic...
    public String updateUser(){
         try{
              // do some business-logic
         }catch (Exception ex){
              // set error message and return to form
              FacesContext ctx = FacesContext.getCurrentInstance();
              // provide some error-msgs
              return null;
         return "success";
    }I need to save all the properties on my backing bean, especially my "state"-property that decides whether I create a new user or update a given user identified by its id...

    To start, do not mix JSF with JSTL this way. Remove all of those c:if tags and use the JSF 'rendered' attribute instead.
    E.g.
         <c:if test="#{userFormBean.state == applicationScope.constants.STATE_NEW}">     
              <h:commandButton action="#{userFormBean.createUser}" value="#{msg['ui.user.create.button']}">
                   <f:setPropertyActionListener value="#{applicationScope.constants.STATE_NEW}" target="#{userFormBean.state}"/>
              </h:commandButton>
         </c:if>should be
         <h:commandButton action="#{userFormBean.createUser}" value="#{msg['ui.user.create.button']}" rendered="#{userFormBean.state == applicationScope.constants.STATE_NEW}">
              <f:setPropertyActionListener value="#{applicationScope.constants.STATE_NEW}" target="#{userFormBean.state}"/>
         </h:commandButton>Back to your actual problem: I cannot correlate your problem description to the given code snippet. Which non-set values are you talking about?

  • 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].

  • Sharing backing beans across sessions

    HI,
    After doing some simple investigations I could see that different sessions were using the same backing bean instance.
    I was wondering is there any way you can configure in the JSF framework to use their own instance of the backing bean?
    Thanks.

    Declare them as session- scoped, e.g.@SessionScoped.

  • Shoul I have my backing beans extend my domain objects?

    Hi,
    In our JSF application, most of our backing beans have the same properties that a corresponding domain object.
    In order to have a clear separation between layers, we have a set of view objects and a separate set of domain objects. Once we populate the backing bean, we copy the value of properties to the domain object.
    Since all the properties of my domain object are duplicated in my backing beans, we were wondering if it is a good (or bad) idea to extend (inherit) my backing beans from my domain objects, and pass the backing beans to my persistence and business layers. This will save us some work.
    Thanks a lot for the advice.
    Mauricio L.

    I think I've solved my own issue though I'm not sure if it is the correct way to accomplish the task at hand.
    When the button for login is clicked and the logginButton_action() method is called inside of my login_jsp_backing class I do the following:
    User user = new User();
    FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("User", user);
    return user.doLogin(this.getInputUsername().getValue().toString(), this.getInputPassword().getValue().toString());
    (The String return of this method in User is a navigation rule I've setup in my faces-config)
    So my new question is that "Is this best practice?" or should I be doing it differently?
    Message was edited by:
    Steve Carlson

  • Serializing of backing beans

    I have the following backing bean:
    public class BackingBean {
       private UIData dataComp;
       public void setDataComp(UIData d) { dataComp = d; }
       public UIData getDataComp() { return dataComp; }
    }I use it in the JSP as such:
    <h:dataTable binding="#{BackingBean.dataComp}"...>
    </h:dataTable>The above code works fine when the state saving method is set to server. However, when I set the saving method to client, JSF tries to serialize my backing bean. Needless to say, I get serializable exceptions and my app doesn't work with client side state saving.
    For a variety of reasons I don't want my BackingBean to be Serializable. Any ideas on how to make my app work without my BackingBean having to implement Serializable?
    Thanks.

    ~ JSF should not be attempting to serialize your backing bean
    I was under the same impression myself. But my debugging so far suggests otherwise... Below is the stack trace (As you can see, the ViewHandlerImpl.renderView() method is trying to serialize the backing bean):
    javax.servlet.ServletException: Error while saving state in 'session': 'myPackage.MyBackingBean'.
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
         at org.apache.jsp.map$jsp._jspService(map$jsp.java:984)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)

  • Problem while invoking popup from backing bean

    I am invoking a popup from backing bean method.
    The same backing bean method has the business logic which depends on the data collected from popup(user enters some data on popup).
    So I need the business logic to be executed after popup comes up.
    The popup is coming after the execution of return statement in backing bean method . How do i make popup trigger at earlier point in the method.
    <af:commandToolbarButton text="#{corePostupgradeuiBundle.SIGN_OFF_MIG}"
    id="socb52"
    partialSubmit="true"
    actionListener="#{viewScope.signoffBean.signOffAgents}"
    partialTriggers="t3"/>
    public void signOffAgents(ActionEvent event) throws SQLException {
    DCBindingContainer bc =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding summaryIter =
    bc.findIteratorBinding("Signoff1Iterator");
    showPopup("credentials"); //will get credential details from user and store in credential Bean
    //Following logic uses the data collected from popup
    EMCredentialReference credRef= credentialBean.getCredReference();
    submitJOb(credRef);
    public static void showPopup(String popupId) {
    FacesContext context = FacesContext.getCurrentInstance();
    StringBuilder script = new StringBuilder();
    script.append("AdfPage.PAGE.findComponent(\"").append(popupId).append("\").show();");
    ExtendedRenderKitService erks =
    Service.getService(context.getRenderKit(),
    ExtendedRenderKitService.class);
    erks.addScript(context, script.toString());
    UIComponent component = context.getViewRoot().findComponent(popupId);
    RequestContext.getCurrentInstance().addPartialTarget(component);
    }

    Well, your work flow is wrong.
    What you try to accomplish should work out of the box as
    1) user hit toolbar button
    2) this opens a popup "credentials" which have listeners for ok and cancel
    3) use fills in data in popup and hit ok or cancel
    4) one of the listeners gets fired
    5a) if OK listener you do your business logic
    5b) if cancel you do something else
    So all you have to do is the use a af:af:showPopupBehavioron the toolbar button, add a popup canel listener (if you need to act on canel) dependign on your popup design (dialog or simple button) add the appropriate listeners and in the listener method so your business logic.
    Timo

Maybe you are looking for

  • Blocking of Good Issue with respect to posting date

    Hi Expert,                Is there any way out in SAP B1 to block the Good Release with respect to posting date.i.e. If User receipt the Good in stock today then system should not allow the user to issue the same good on the back date. regards, Panka

  • Itunes on windows 8 cannot authorize second computer

    When trying to authorize a second computer (running Windows 8) for iTunes I get an error that the iTunes store is unavailable.  I am able to deauthorize / reauthorize the first computer (runing Windows 7) with no errors.

  • Waht is ticketing and some real time questions

    hi abapers could u plz help me 1. in support/maintenance what is ticketing and types of ticketing 2.  in supporting client directly send is issues to abapers or he send any others like TL, PL, PM . 3. is there any interface between client and develop

  • Could I login to my iCloud ID on my school's iMac without leaking my personal information to others?

    The qustion is just as the title decribes. I have a Macbook Air but sometimes I need to use my school's iMac since only the latter has some software needed for my courses, thus I am wondering if I can login to my iCloud ID on school's iMac so that I

  • Flash player using 100% cpu, unusable

    Hi, Flashplayer is constantly using about 70, 80 somtimes even 120% of my cpu !?!?! using 10.6.2 and flashplayer 10.0.42.34 i'm now using ClickToFlash http://rentzsch.github.com/clicktoflash/  which works wonderful to regulate all the flash content w