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

How can we bind inputFieldValue of user.IsActive in VF page by negating it.
Hi,
i have staff page using User object internally(in controller staff= new User();).
I would like to negate the value staff.IsActive and want to bind with inputfileld.
becouse in Staff form i have a Lable InActive. and i can not changed that cos of UI specification.
like
........
<tr>
<td class="clsPanelInputCheckboxTD">
<apex:inputField value="{!staff.IsActive}" /><apex:outputLabel styleClass="clsPanelCheckBoxLabel" value="{!$Label.inactive}" />
</td>
</tr>
</table>
</apex:outputPanel>
Could you please suggest me the way so I can bind Active user with Inactive Lable in UI.
I dont know if this will help but you could use an IF statement:
value="{!IF(staff.IsActive, 'true', 'false')}"
Here, depending if staff.IsActive is true or false, value will equal "true" or "false".
'true' or 'false' are just string so you could do:
value="{!IF(staff.IsActive, 'Active', 'Not Active')}"
You could also use the rendered attribute to show/hide depeneding if it was active or not.
HTH