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

How to render values in the same Vf page?


  My requirement is whenever I clicked on a image in a vf page appropriate values should be displayed in th e same vf page.Now i can get the image in a vf page but When I clicked the image its doing nothing....can anyone explain me how should i acheive this.........any reply would be sincerely appreciated


Thanks in advance,


Suresh RaghuramSuresh Raghuram

Hi arun,


the following is the process.


When you click a image some information should get hidden or to be displayed,


the following is the example.

<apex:pageblocksection  id="pbs" render="{!flag}">





<apex:image .................................. onclick=" define some javascript method for setting flag to true  "  reRender="pbs">


It can be used for hiding the existing one or display the hidden one.


If you have any question regarding this post it i will help you.


It this answers your question,PLz Mark it as solution.



Suresh RaghuramSuresh Raghuram

<apex:pageBlockSection >
<apex:outputPanel id="selector" >


If above is code  you want to reRender then try as follows


<apex:pageBlockSection id="selector">
<apex:outputPanel  >

Suresh RaghuramSuresh Raghuram

actually i did not understandwhat you want to do


are you jst refreshing that section , hiding it or displaying it after you click the image (where it is in hidden mode when the page loads)


If it is to be hide or display follow my first reply, if you still want some clarity i can give you.



What actually I want to do is whenever I click on the image which is displayed by doing action.......I need to display the values as


FacebookUrl = (Textbox) (This values are dynamically from xml).


but whenever Im clicking on the image nothing is getting displayed....


Thanks sureee,

got my requirement......I made a blunder mistake in my code....checked it now itself

Suresh RaghuramSuresh Raghuram

hi aruna,


why cant you post that correct code so every one can get help of it.


Its upto you.






ya sure....Here we go with the code


public class visual4 {  

public visual4()  {  


  }      public class Network    {     

 String image;     

String name;

     string field;       


   Network[] parsesocialnetwork(XmlStreamReader reader) {  

    Network[] socialnetwork= new Network[0];  

  while(reader.hasNext()) {

         if (reader.getEventType() == XmlTag.START_ELEMENT) {          

   if ('Network' == reader.getLocalName()) {

                Network widget = parseImages(reader);       






  return socialnetwork;  


   Network parseImages(XmlStreamReader reader) {     

 Network widget = new Network();      

while(reader.hasNext())   {  

  if (reader.getEventType() == XmlTag.START_ELEMENT)  {  

   if (reader.getLocalName() == 'Image')     {;    

 if (reader.getEventType() == XmlTag.characters)      {      

   widget.image= reader.getText();   



    if (reader.getLocalName() == 'Fieldlabel')    {;  

 if (reader.getEventType() == XmlTag.characters)    { reader.getText();



if (reader.getLocalName() == 'Fieldtype')     {;  

   if (reader.getEventType() == XmlTag.characters)      {      

   widget.field= reader.getText();          





return widget ;


public boolean flag{get;set;}   

public String ImageUr{ get; set; }  

  public String url{ get; set; }    

public String typeurl{ get; set; }

    public void refer()   {   


   visual4 demo = new visual4 ();   

    String str = '<socialnetwork><Image></Image><Fieldlabel>FaceBookUrl</Fieldlabel><Fieldtype>TextBox</Fieldtype></socialnetwork>';        XmlStreamReader reader = new XmlStreamReader(str);    

  Network socialnetwork = demo.parseImages(reader);  


  url = string.valueOf(;