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
MiddhaMiddha 

Visualforce Repeat and OutputPanel Tags

Hi,

I am using Outputpanel tag just after repeat tag. Doing this gives me "An internal server error has occurred". My code looks like:

Code:
<apex:repeat value="{!Test}" var="t">
 <apex:outputpanel layout="block" rendered="{IF(t.val,true,false)}">
      <tr>
   <td colspan="2" >
    {!t.Name}
   </td>
  </tr>
 </apex:outputpanel>
</apex:repeat>
I have a table in which i want to show the rows only on some condition. There is more formatting on the table which i have removed from above example and due to some extensive formatting i am not using datatable.

Is there any other way around?

GM
 

Richie DRichie D

Hi,

Now, I'm not saying this is a correct visualforce approach but you can use inline css to hide the row. something like this:-

<tr style="{!IF(t.val,'visibility:hidden;','')} background-color: #bbb;">

This might be a way around it. I have looked at doing it within apex tags but this worked in the case I needed.

Rich.

 

Mark YoungMark Young

Hi GM,

Yes, this is an issue I've encountered before.  Changing the layout of the outputpanel to 'none' seems to resolve the issue.

See:

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=3054

Mark

MiddhaMiddha
I had some workaround for my issue. But i noticed that its due to some JS error that gets generated from salesforce. It also comes if i am using <tr><td> tags directly under <apex:repeat>.

Cheers.
GM