You need to sign in to do that
Don't have an account?

Is this possible at all ?
I have a pageBlockTable:
<apex:pageBlockTable value="{!dataTabTasks}" var="task" cellspacing="4" id="taskTable" style="bPageBlock">
<apex:column id="hideDiv1">
<apex:facet name="header">Action</apex:facet>
<apex:CommandLink styleClass="addNL" immediate="true" onclick="delTask('{!task.Id}','{!$Component.theHiddenInput}','{!$Component.theHiddenInput1}','{!task.CallDisposition}');" value="Del" action="{!removeTask}" reRender="out"/> |
onclick="toggleFieldEdit('{!$Component.pg1}','{!$Component.pg2}');" id="img1"/></a>
</div>
</apex:column>
<apex:column >
<apex:facet name="header">Task Subject</apex:facet>
<apex:inputField id="subject" value="{!task.subject}" required="true" style="width: 70px;"/>
</apex:column>
Before printing the page, I wanted to hide the column (hideDiv1) in the JS ... while I set the style hideDiv1.display = 'none', the header (facet in this case) is not getting hidden. The header is still being displayed. Any possible work around folks ?
I didnt want to make a Ajax function call and then set render="false" for column 1. I need to do this in JS itself. Any inputs would be helpful.
Thanks.
Message Edited by Arun Bala on 12-25-2008 03:26 PM
<apex:pageBlockTable value="{!dataTabTasks}" var="task" cellspacing="4" id="taskTable" style="bPageBlock">
<apex:column id="hideDiv1">
<apex:facet name="header">Action</apex:facet>
<apex:CommandLink styleClass="addNL" immediate="true" onclick="delTask('{!task.Id}','{!$Component.theHiddenInput}','{!$Component.theHiddenInput1}','{!task.CallDisposition}');" value="Del" action="{!removeTask}" reRender="out"/> |
onclick="toggleFieldEdit('{!$Component.pg1}','{!$Component.pg2}');" id="img1"/></a>
</div>
</apex:column>
<apex:column >
<apex:facet name="header">Task Subject</apex:facet>
<apex:inputField id="subject" value="{!task.subject}" required="true" style="width: 70px;"/>
</apex:column>
Before printing the page, I wanted to hide the column (hideDiv1) in the JS ... while I set the style hideDiv1.display = 'none', the header (facet in this case) is not getting hidden. The header is still being displayed. Any possible work around folks ?
I didnt want to make a Ajax function call and then set render="false" for column 1. I need to do this in JS itself. Any inputs would be helpful.
Thanks.
Message Edited by Arun Bala on 12-25-2008 03:26 PM
document.getElementById('{!$Component.<cloumnid>}').style.display = 'none';
Thanks for your prompt response. I did try this method earlier also. The problem here is that the header(apex:facet) is being still displayed though the table data is not displayed. Making 'rendered=false' on the concerned apex:column makes both header and data invisible but I dont want to do that because I need to access the controller then.