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
Sfdc11Sfdc11 

urgent..apex:param not working!!

im not getting the value in controller for the checkbox selection...

 

pls help me out!!!!!!!!

 

Puja_mfsiPuja_mfsi

Hi,

This is a know bug in salesforce. you need  to use rerender attribute for the commandButton. This should allow the params to be passed back to the controller correctly.

 

please go to the below links:

http://boards.developerforce.com/t5/Visualforce-Development/lt-apex-param-gt-assignTo-seems-not-working-simple-code/td-p/180372

 

http://salesforce.stackexchange.com/questions/4937/why-does-apexparam-assignto-work-with-apexcommandlink-but-not-apexcommandbutt

https://success.salesforce.com/ideaView?id=08730000000YcV8AAK

 

Please let me know if u have any query on same and if this post helps u please give KUDOS by click on star at left.

Sfdc11Sfdc11

thanks..I did it already.but facing problem on this..

 

document.getElementbyId('{!$Component.updateCaseName}').value=SelChk.value; --this nt wrking

 

value is nt setting..

nbnb

Hi 

 

In the below line

document.getElementbyId('{!$Component.updateCaseName}').value=SelChk.value

 

 

you have used updateCaseName but there is no component by  that name in the code.

 

Please use the right id..

 

Thanks

NB

Sfdc11Sfdc11

sorry..updated wrngly ..

below is correct one but nt wrking

document.getElementbyId('{!$Component.upCaseName}').value=SelChk.value;  ---this nt working..

Sfdc11Sfdc11

I tried all,nothing is wrking..

 

 

nbnb

Hi Kavi,

 

While trying to access the element through document.getElementbyId, you have to go from outer tag ids to inner ones.

In this case you have to go as below:

 

document.getElementbyId('{!$Component.updatePage.frmId.pgblkId.cmdbuttn.upcase}').value=SelChk.value; 

 

I have given an id for each of the opening tags (only for the missing ones in the code)...

 

I am not sure if id needs to be given for the command button also...

 

Try and let me know if it works..

 

Thanks 

NB

Sfdc11Sfdc11

Hi I tried with commandbutton and with cmbbutton id,both arent working...

 

document.getElementbyId('{!$Component.updatePage.frmId.pgblkId.cmdId.upCaseName}').value=selName;

 

document.getElementbyId('{!$Component.updatePage.frmId.pgblkId.upCaseName}').value=selName;

Puja_mfsiPuja_mfsi

Hi Kavi,

are u set the value of param with java script.Instead of this why r u not use apex:inputHidden.

<apex:inputHidden value="{!upCaseName}" id="upCaseName"/>

 

and use the absolute id of this inputHidden and used in your code.now in java script :

document.getElementbyId('Id of input Hidden').value=SelChk.value;

and get set the "upCaseName" in controller.then it automatically pass the value in "upCaseName".

 

 

Please let me know if u have any problem on same and if this post helps u plz give KUDOS by click on star at left.

 

Sfdc11Sfdc11

this is nt returning value..

someprob with setting value..with elementbyid..