0

I have an <apex:dataTable value="{!dtos}" var="dto">. There I have

<apex:column>
  <apex:facet name="header">rrr</apex:facet>
  <apex:outputPanel id="rrr">
    <apex:selectList id="rrrr" value="{!dto.rrr}" multiselect="false" size="1">
      <apex:selectOptions id="rrrrr" value="{!rrrrr}"/>
      <apex:actionSupport id="rrrrrr" event="onchange"  immediate="false"
                          reRender="ddd, ccc"
                          status="actionStatus"/>
    </apex:selectList>
  </apex:outputPanel>
</apex:column>

and two more guys

<apex:column>
  <apex:facet name="header">Description</apex:facet>
  <apex:outputPanel id="ddd">
    <apex:input value="{!dto.ddd}" type="text"
                id="dddd"/>
  </apex:outputPanel>
</apex:column>

<apex:column>
  <apex:facet name="header">Cost Rate</apex:facet>
  <apex:outputPanel id="ccc">
    <apex:outputText value="{0, number, currency}">
      <apex:param value="{!dto.cccc}"/>
    </apex:outputText>
  </apex:outputPanel>
</apex:column>

So. Description is not updated on picklist change and Cost Rate is.

In controller I have

class DTOClass {
  public String rrr {
    get;
    set {
      if (rrr != value) {
        rrr = value;
        ddd = 'asdf';
        ccc = 13;
      }
    }
  }
}
1
  • What is inside of aBunchOfIdsHere? Commented Aug 18, 2017 at 15:52

1 Answer 1

2

You need to create an apex method in controller. On change of picklist try like below-

<apex:actionSupport event="onchange" action="{!apexMethodName}" rerender="ddd,ccc"/>

and set the value of Description and Cost Rate in controller method.

1
  • I must say it was not obvious for me that a method should be created in order to get input fields updated... Commented Aug 19, 2017 at 7:30

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.