I want to display Popup Window in Edit Mode only, not in Read only.Could you tell me code or Suggestion ?
My Code :
Java script :
function popup(){
var conf=confirm(" Would you like to copy Service Options of Unit Type")
if(conf==true){
document.getElementById("{!$Component.iscopy}").value='true';
}else{
document.getElementById("{!$Component.iscopy}").value='false';
}
}
</script>
<apex:commandButton action="{!sasm.selectPage}" value="{!ctrl.caption}" onclick="popup()"
rerender="frm" disabled="{!NOT(ctrl.isActive)}"
status="pagingStatus">
<apex:param value="{!ctrl.id}" name="pageName"/>
</apex:commandButton>
controller :
public Boolean canBeEdited {
get {
if (aprove!=null && aprove.isInApproval)
{
return false;
}
else{
return true;
}
}
}
$Component.iscopy
? and how is that related to the controller? Please add to the posted code. BTW, your controller method can be much simpler:get {return aprove!=null && aprove.isInApproval ? false: true;}