function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suresh RaghuramSuresh Raghuram 

Issue with param tag

Hi

I have cancel and ignore button when i click cancel the popup will close , when ignore clicked it should pass a flag value.

 

But when i click cancel also the flag value is passing.

 

<apex:commandButton value="Ignore" action="{!checkDupes}" oncomplete="YAHOO.force.com.hideMe();"/>
              <apex:param value="true" name="flag" assignTo="{!showDupes}"/>
          <apex:commandButton value="Cancel" immediate="true" onclick="YAHOO.force.com.hideMe();"/>

 

How it is possible to pass flag value only when ignore is clicked.

aballardaballard

You need param to be a child of the command button ...

 

<apex:commandButton value="Ignore" action="{!checkDupes}" oncomplete="YAHOO.force.com.hideMe();">
              <apex:param value="true" name="flag" assignTo="{!showDupes}"/>

</apex:commandButton>


<apex:commandButton value="Cancel" immediate="true" onclick="YAHOO.force.com.hideMe();"/>

Suresh RaghuramSuresh Raghuram

It is still not working. I also one more change but in wein

 

<apex:commandButton value="Ignore" action="{!checkDupes}" oncomplete="YAHOO.force.com.hideMe();">
              <apex:param value="true" name="flag" assignTo="{!showDupes}"/>

</apex:commandButton>


<apex:commandButton value="Cancel" immediate="true" onclick="YAHOO.force.com.hideMe();">

              <apex:param value="false" name="flag" assignTo="{!showDupes}"/></apex:commandButton>

SFRajSFRaj

Hi,

 

Apex:Param will not work in <apex:commandButton>. Use <apex:commandLink> instead of <apex:commandButton>. Give style class as btn.