You need to sign in to do that
Don't have an account?
aaishaa19
Button's Action in Page blocks
I have a VF page, with two page blocks in it Both blocks contain pageBlockButtons ,
containing one button in each..
There are few field in each block which are populated on button click ...
The Problem is when I click on one button .. The action of the button invoked and populate and when I click
on 2nd nothing happen.. And vice versa..
At time only one button's action is invoked and other remain idle..
Please tell me where im going wrong.!!
Any kinda help will b appreciated
Regards;
Aisha
omG after spending my hours on R&D and diagnosing the problem i finally revealed that i was entering a field date time which was bugging it somehow..
:S i finally resolve this issue .. loll.. thnx for ur support .. Thank u very much :)
All Answers
Provide valid id values for pageblock sections, and in the apex line with action, add rerender to include this pageblock section id.
I already did same , assign an id to the page block ...
Still only one button's action calling at time ...
I even put them in a single block , in different sections .. But im still having same issue ...
:smileysad:
Disastered ;
Aish.. ~~
How about adding 'rendered=true' added on each page block? I know SF takes true as default if nothing is given but, sometimes it seems to work.
Can you post the pageblocks that you are using that are with buttons to better understand replace it in my org and see if its local to you or not etc.
Apex Controller
im able to get jus one client at time ... or either im able to call save method ..
i even make a single pageblock and two sectionblocks having two client's data ...
n yea .. i knw really nothing much about salesForce ... lol :smileysad:
Aisha .. !!!
Try the following:
<apex:pageblockbuttons >
<apex:commandbutton value="get 1st client" action="{!GetClient1}" id="CL1" rerender="pb_cl1" />
<apex:commandbutton value="get 2nd client" action="{!GetClient2}" id="CL2" rerender="pb_cl2"/>
</apex:pageblockbuttons>
<apex:pageblocksection title="my content section" id="pb_cl1" columns="2">
----------- blah blah ...columns for client 1
</apex:pageblocksection>
<apex:pageblocksection title="my content section" id="pb_cl2" columns="2">
----------- blah blah ...columns for client 2
omG after spending my hours on R&D and diagnosing the problem i finally revealed that i was entering a field date time which was bugging it somehow..
:S i finally resolve this issue .. loll.. thnx for ur support .. Thank u very much :)