1 Reply Latest reply: Nov 24, 2012 3:31 PM by Timo Hahn RSS

    navigating to next page using inputtext

      hi i have a situation where i have list of names,this is the names of my screens in my application,for example i got sms001,sms01 in my list.i what to double click the inputtext with value sms001 and able to navigate to sms001 screen,how can i do that am in jdeveloper

      Edited by: adf0994 on 2012/11/24 10:34 PM
        • 1. Re: navigating to next page using inputtext
          Timo Hahn
          I, as a user, would not like to use a double click to initate a navigation. When I enter text into an inputText component I hit enter...
          However, you can archive this if you add a client listener to your inputText which reacts to the dblClick event and then queue an event to a not visible button which does the navigation. The different targets you get from the inputText component. For this you add a button (which you make invisible by setting the visible property to false) and create a action in a bean which returns the navigation target.
                <af:resource type="javascript">
                  function dblClick(event) {
                      var exportCmd = AdfPage.PAGE.findComponentByAbsoluteId("cb1");
                      var actionEvent = new AdfActionEvent(exportCmd);
                        <af:inputText label="Nav Target" id="it1" value="#{bindings.navTarget1.inputValue}" autoSubmit="true">
                          <af:clientListener method="dblClick" type="dblClick"/>
          action method in a bean to get the target
              public String cb1_action() {
                  FacesContext fctx = FacesContext.getCurrentInstance();
                  UIViewRoot root = fctx.getViewRoot();
                  // get the binding container
                  BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                  // get an ADF attributevalue from the ADF page definitions
                  AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("navTarget1");
                  String val = (String)attr.getInputValue();        
                  return val;
          Then you need to add a wildcard navigation rule to your task flow which uses the entered value as navigation names.