function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
drew5101drew5101 

outputpanel and rerender issue

I swear this worked 3 hours ago, then I messed with it and can't figure out how to fix it!  Please help...

 

I am using outputpanels and rerender statements to cause one row of a form to dynamically appear when the first field of the row above is not null.

 

What's happening now is that when the next row is rendered, it is actually rendered ABOVE the first row (procedure 1 in this case) and is not part of the table...  Somehow the outputpanel is rewriting the code for the pageblock to put the <tr><td> tags before the <table> tag  (I think)...

 

 

<apex:pageblock Title="Billing and Reporting Codes">
<!--<apex:pageblocksection>-->
<table width="75%">
<tr><td>
Procedure
</td><td>
Modifier
</td><td>
Diagnosis Pointer
</td><td>
Units
</td><td>
Charges
</td></tr>
<tr><td>
1)&nbsp;<apex:inputfield value="{!Charges_Collections__c.Procedure_1__c}">
<apex:actionSupport event="onchange" rerender="pro2"/>
</apex:inputfield>
</td><td>
<apex:inputfield value="{!Charges_Collections__c.Procedure_1_Modifier_1__c}" style="width:25px"/>
<apex:inputfield value="{!Charges_Collections__c.Procedure_1_Modifier_2__c}" style="width:25px"/>
<apex:inputfield value="{!Charges_Collections__c.Procedure_1_Modifier_3__c}" style="width:25px"/>
<apex:inputfield value="{!Charges_Collections__c.Procedure_1_Modifier_4__c}" style="width:25px"/>
</td><td>
<apex:inputfield value="{!Charges_Collections__c.Pro1_dp__c}" style="width:60px"/>
</td><td>
<apex:inputfield value="{!Charges_Collections__c.Procedure_1_Units__c}" style="width:25px"/>
</td><td>
$<apex:inputfield value="{!Charges_Collections__c.Procedure_1_Charges__c}" style="width:60px"/>
</td></tr>


<apex:outputpanel id="pro2">
<tr><td>
<apex:inputfield value="{!Charges_Collections__c.Procedure_2__c}" rendered="{!NOT(ISNULL(Charges_Collections__c.Procedure_1__c))}"/>
</td><td>
<apex:inputfield value="{!Charges_Collections__c.Pro2_Mod1__c}" style="width:25px" rendered="{!NOT(ISNULL(Charges_Collections__c.Procedure_1__c))}"/>
<apex:inputfield value="{!Charges_Collections__c.Pro2_Mod2__c}" style="width:25px" rendered="{!NOT(ISNULL(Charges_Collections__c.Procedure_1__c))}"/>
<apex:inputfield value="{!Charges_Collections__c.Pro2_Mod3__c}" style="width:25px" rendered="{!NOT(ISNULL(Charges_Collections__c.Procedure_1__c))}"/>
<apex:inputfield value="{!Charges_Collections__c.Pro2_Mod4__c}" style="width:25px" rendered="{!NOT(ISNULL(Charges_Collections__c.Procedure_1__c))}"/>
</td><td>
<apex:inputfield value="{!Charges_Collections__c.Pro2_dp__c}" style="width:60px" rendered="{!NOT(ISNULL(Charges_Collections__c.Procedure_1__c))}"/>
</td><td>
<apex:inputfield value="{!Charges_Collections__c.Procedure_2_Units__c}" style="width:25px" rendered="{!NOT(ISNULL(Charges_Collections__c.Procedure_1__c))}"/>
</td><td>
<apex:inputfield value="{!Charges_Collections__c.Procedure_2_Charges__c}" style="width:60px" rendered="{!NOT(ISNULL(Charges_Collections__c.Procedure_1__c))}"/>
</td></tr>
</apex:outputpanel>
</table>
<!--</apex:pageblocksection>-->
</apex:pageblock>

 

 

 

Ron HessRon Hess

which browser ?

 

if i recall correctly, partial page rerender of portions of a table is not supported by Internet Explorer because innerHTML is not updateable.

 

 

 http://msdn.microsoft.com/en-us/library/ms532998.aspx

Creating and Manipulating Tables

Dynamic control of tables is useful when displaying the contents of a database or building a table of calculated data, such as a calendar. When using Dynamic HTML (DHTML) to create a document, you can create objects and set the innerText or innerHTML property of the object. However, because of the specific structure required by tables, the innerText and innerHTML properties of the table and tr objects are read-only. To insert rows and cells, change the contents and attributes of the table, or resize table elements, you must use the DOM.