Showing posts with label ADF Faces. Show all posts
Showing posts with label ADF Faces. Show all posts

Friday, October 4, 2013

How to Allow af:inputText for Spell Checking ?

How to Allow af:inputText for Spell Checking ?







Tuesday, October 1, 2013

How to get the Handle of any UI component without binding?

How to get the Handle of any UI component without binding?


    public String callAction() {

        UIComponent component = findComponentInRoot("it1"); //it1 is the Id of the UI
        System.out.println(component.getId());
        component.setRendered(false);
        return null;
    }

    public static UIComponent findComponentInRoot(String id) {
        UIComponent component = null;

        FacesContext facesContext = FacesContext.getCurrentInstance();
        if (facesContext != null) {
          UIComponent root = facesContext.getViewRoot();
          component = findComponent(root, id);
        }

        return component;
    }
    public static UIComponent findComponent(UIComponent base, String id) {
        if (id.equals(base.getId()))
          return base;
     
        UIComponent kid = null;
        UIComponent result = null;
        Iterator kids = base.getFacetsAndChildren();
        while (kids.hasNext() && (result == null)) {
          kid = (UIComponent) kids.next();
          if (id.equals(kid.getId())) {
            result = kid;
            break;
          }
          result = findComponent(kid, id);
          if (result != null) {
            break;
          }
        }
        return result;
    }

ADF 11G : How to Customize af:query ?

ADF 11G : How to Customize af:query ?









Monday, September 30, 2013

New Custom Popup Can be attached with ADF UI LOV

New Custom Popup Can be attached with ADF UI LOV

We can Add our custom popup on Declarative LOV(af:inputListOfValue).





Friday, September 27, 2013

ADF Table Column

Sometimes we wanted to leave some space before the First Column of any ADF table.
Here is the solution for that.





Get Old value through ValueChangeEvent

Get Old value through ValueChangeEvent :


    public void Vce(ValueChangeEvent vce){
        System.out.println(this.getIt1().getValue().toString());
        System.out.println("New Values "+vce.getNewValue());
        System.out.println("Old Values "+vce.getOldValue());
        }


Thursday, September 26, 2013

ADF Faces : Handling Dialog

 ADF Faces : Handling Dialog









   public void okAction(DialogEvent event){
         
            if (event.getOutcome().equals(DialogEvent.Outcome.yes)){
                           System.out.println("Component Regreshing...");
            }
            else if(event.getOutcome().equals(DialogEvent.Outcome.no)){
                           System.out.println("Canceled");
                }
    }

How to Invoke commandButton's action programatically at Runtime?

 How to Invoke commandButton's action programatically at Runtime?

   public String initiate() {
     
        FacesContext facesContext = FacesContext.getCurrentInstance();
        UIViewRoot root = facesContext.getViewRoot();
     
        RichCommandButton button = (RichCommandButton) root.findComponent("cb2"); //"cb2" is the Id of the CommandButton
        ActionEvent actionEvent = new ActionEvent(button);
        actionEvent.queue();
        System.out.println("Exiting from initiate()....");
        return null;
    }

Tuesday, May 14, 2013

ADF 11G: How to show inline message?

ADF 11G: How to show inline message?










ADF 11G: How to show multiline message ?

ADF 11G: How to show multiline message ?








Tuesday, March 26, 2013

ADF 11G : How to Implement Internationalization in ADF application ?

ADF 11G : How to Implement Internationalization in ADF application ?