0

We use a outputpanel which encloses a table and it is rendered by selecting the listview. the problem is inside the table we are using outputpanel for different purposes. When the list view is rendered the parent outputpanel is rendered but the condition rendered given in the siblings outputpanel is not working. In the action support, "OppTable" is given to rerender. Even I gave id's to siblings outputpanel and tried rendering but not working.

        <apex:outputPanel id="OppTable">
                <table class="dataTable stripe" cellspacing="0">
                    <thead>
                        <tr>
                            <th>
                                <input type="checkbox" name="" id="checkBox_selectAll" />
                            </th>
                            <th>
                                Record Type
                            </th>
                            <apex:repeat value="{!columns}" var="col">
                                <th>{!col.label}</th>
                            </apex:repeat>
                        </tr>
                    </thead>
                    <tbody>

                        <apex:repeat value="{!Opportunities}" var="opp">
                            <tr>
                                <td>
                                    <input type="checkbox" id="checkBox1" />
                                    <apex:inputhidden id="idValue" value="{!opp.Id}" />
                                </td>
                                <td>
                                    <apex:outputField value="{!opp.RecordType.Name}"></apex:outputField>
                                </td>
                                <td>
                                    <apex:outputField value="{!opp.AccountId}"></apex:outputField>
                                </td>
                                <td>
                                    <apex:outputField value="{!opp.Univar_Product__c}"></apex:outputField>
                                </td>
                                <apex:outputPanel rendered="{!opp.RecordType.Name == 'CPP'}">
                                    <td class="edit-cell">
                                        <apex:outputField value="{!opp.Current_Status__c}"></apex:outputField>
                                        <input name="edit-input" type="text" data-id="{!opp.Id}" data-field="Current_Status__c" data-type="PICKLIST" value="{!opp.Current_Status__c}" style="display:none; width: 100%"></input>
                                    </td>
                                </apex:outputPanel>
                                <apex:outputPanel rendered="{!opp.RecordType.Name != 'CPP'}">
                                    <td>
                                        <apex:outputField value="{!opp.Current_Status__c}"></apex:outputField>
                                    </td>
                                </apex:outputPanel>
                                <apex:outputPanel rendered="{!opp.RecordType.Name == 'CPP'}">
                                    <td class="edit-cell">
                                        <apex:outputField value="{!opp.Current_Price_per_UOM__c}"></apex:outputField>
                                        <input name="edit-input" type="text" data-id="{!opp.Id}" data-field="Current_Price_per_UOM__c" data-type="CURRENCY" value="{!opp.Current_Price_per_UOM__c}" style="display:none; width: 100%"></input>
                                    </td>
                                </apex:outputPanel>
                                <apex:outputPanel rendered="{!opp.RecordType.Name != 'CPP'}">
                                    <td>
                                        <apex:outputField value="{!opp.Current_Price_per_UOM__c}"></apex:outputField>
                                    </td>
                                </apex:outputPanel>
                            </apex:repeat>
                    </tbody>
                </table>
            </apex:outputpanel>
0

Instead of applying rendered property to an output-panel, apply Style to class direct from displaying .

Instead this

 <apex:outputPanel rendered="{!opp.RecordType.Name == 'CPP'}">
     <td class="edit-cell">
     <apex:outputField value="{!opp.Current_Status__c}"></apex:outputField>
     <input name="edit-input" type="text" data-id="{!opp.Id}" data-field="Current_Status__c" data-type="PICKLIST" value="{!opp.Current_Status__c}" style="display:none; width: 100%"></input>
      </td>
 </apex:outputPanel>

Try this

   <td class="edit-cell" style="display:{if(opp.RecordType.Name == 'CPP',block,none)}" >
   <apex:outputField value="{!opp.Current_Status__c}"></apex:outputField>
   <input name="edit-input" type="text" data-id="{!opp.Id}" data-field="Current_Status__c" data-type="PICKLIST" value="{!opp.Current_Status__c}" style="display:none; width: 100%"/>
   </td>

Also terminate input box as inline Tag. <input ... />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.