You need to sign in to do that
Don't have an account?
Michael M
rendered not working in table in vf page
Hello, I need to render a row of my table conditionally. However the "rendered" tag is not working. I don't want to use <apex:outputPanel> around the row, because then it breaks up the table and makes extra spacing that doesn't look nice. Is there a way to get this to work in the <tr> tag itself?
<table >
<tr rendered="{!IF(spellFromDate2 ='',false,true)}">
<th>SPELL</th>
<th>{!spellFromDate2}</th>
<th>{!spellToDate2 }</th>
<th>{!spellHospFullDays2 }</th>
<th>{!spellHospCoinsDays2 }</th>
<th>{!snfFullDays2 }</th>
<th>{!snfCoinsDays2 }</th>
<th style="border-left: 1px solid black;"></th>
<th></th>
<th></th>
</tr>
<tr>
<th>SPELL</th>
<th>{!spellFromDate3}</th>
<th>{!spellToDate3 }</th>
<th>{!spellHospFullDays3 }</th>
<th>{!spellHospCoinsDays3 }</th>
<th>{!snfFullDays3 }</th>
<th>{!snfCoinsDays3 }</th>
<th style="border-left: 1px solid black;"></th>
<th></th>
<th></th>
</tr>
</table>
<table >
<tr rendered="{!IF(spellFromDate2 ='',false,true)}">
<th>SPELL</th>
<th>{!spellFromDate2}</th>
<th>{!spellToDate2 }</th>
<th>{!spellHospFullDays2 }</th>
<th>{!spellHospCoinsDays2 }</th>
<th>{!snfFullDays2 }</th>
<th>{!snfCoinsDays2 }</th>
<th style="border-left: 1px solid black;"></th>
<th></th>
<th></th>
</tr>
<tr>
<th>SPELL</th>
<th>{!spellFromDate3}</th>
<th>{!spellToDate3 }</th>
<th>{!spellHospFullDays3 }</th>
<th>{!spellHospCoinsDays3 }</th>
<th>{!snfFullDays3 }</th>
<th>{!snfCoinsDays3 }</th>
<th style="border-left: 1px solid black;"></th>
<th></th>
<th></th>
</tr>
</table>
As mentioned in this link https://salesforce.stackexchange.com/questions/13348/rerender-standard-html-element-from-visualforce-component it would not be possible for Visualforce cannot re-render any element that is not managed by the view state. can you try checking the above link once.
Regards,
Anutej
All Answers
As mentioned in this link https://salesforce.stackexchange.com/questions/13348/rerender-standard-html-element-from-visualforce-component it would not be possible for Visualforce cannot re-render any element that is not managed by the view state. can you try checking the above link once.
Regards,
Anutej
Ah I see. What would you recommend I do?
Is there any specific reason for using HTML tags?