You need to sign in to do that
Don't have an account?
Ethan Hotz
Can't pass CSS value to a pageblocktable rowClasses attribute from controller
I'm trying to implement row hiding/displaying functionality for a page of tables. Code below:
Each "dev" is an instance of a wrapper class with an "isVisible" string that matches up with a respective CSS class containing 'display:none' or no styling. ToggleVisible() switches the value of the string. This system works perfectly on the 'hourheader' column header with colors, but for whatever reason, rowClasses doesn't read the parameter given(defaulted to display:none). If I set rowClasses equal to the CSS class directly, it works fine, and I can see that the toggling function is working in debug logs.
Is this due to some weird property with rowClasses? If so, and I can't get row toggling to work this way, does anyone have any other suggestions as to how I might implement it?
<apex:repeat var="dev" value="{!userList}"> <apex:pageBlockTable value="{!dev.projectMap}" var="project" id="userTable" rendered="{!tableVisible}" columnsWidth="20%,8%" rowClasses="{!dev.isDisplayed}"> <apex:column id="devHeader" > <apex:facet name="header"><apex:commandLink action="{!dev.toggleVisible}">{!dev.userName.name}</apex:commandLink></apex:facet> <apex:outputLink id="dataDev" target="_blank" value="/{!project}" rendered="{!IF(project == null, false, true)}" >{!IF(project == caseID, 'Current Case', project)}</apex:outputLink> <!-- Set to caseNumber? --> </apex:column> <apex:repeat value="{!dev.projectMap[project]}" var="date"> <apex:column headerValue="{!dev.totalHourMap[date]}" id="hourHeader" headerClass="{!dev.colColor[date]}" > <apex:outputText id="dataOutput" rendered="{!IF(project == null || project == caseID, false, true)}">{!dev.projectMap[project][date]}</apex:outputText> <apex:inputText id="dataInput" rendered="{!IF(project == caseID, true, false)}" value="{!dev.projectMap[project][date]}" style="width:20%"/> </apex:column> </apex:repeat> </apex:pageBlockTable> </apex:repeat>
Each "dev" is an instance of a wrapper class with an "isVisible" string that matches up with a respective CSS class containing 'display:none' or no styling. ToggleVisible() switches the value of the string. This system works perfectly on the 'hourheader' column header with colors, but for whatever reason, rowClasses doesn't read the parameter given(defaulted to display:none). If I set rowClasses equal to the CSS class directly, it works fine, and I can see that the toggling function is working in debug logs.
Is this due to some weird property with rowClasses? If so, and I can't get row toggling to work this way, does anyone have any other suggestions as to how I might implement it?