1 Reply Latest reply: Nov 21, 2012 10:46 PM by Gandhaveedi RSS

    To triggerTable field based on another field of same table

    Gandhaveedi
      Hi there,

      I am facing problem in accessing inputText component which is present inside the table.

      here are the details about hte problem.

      1. I created One uptable view object based on entity object.
      2.Updatable view object has 3 attributes Student_Name, Student_Id & Result.
      3.Same updatable view object from data controls is drag and dropped on the page as table(ADF Table).

      Now my requirement is, I need to enable/disable the Result field in the table once Student_Id field is validated.

      Problems I am facing is, I cannot access Result field based on Id directly since this component is child component of table.

      How can I access child components of table inside java?

      Is there any other way to achieve this functionality(Like at entity level or view object level can we chaieve this functionality?).

      please suggest me.

      thanks,
      Veeru
        • 1. Re: To triggerTable field based on another field of same table
          Gandhaveedi
          Hi All,

          I found something for my problem.

          To access a component by Id if that is not accessible directly is shown below:

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

          here Id is the component Id which you exactly want to access.

          thanks,
          Veeru