• SalesforceLearnerNewbie
  • NEWBIE
  • 20 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 28
    Questions
  • 23
    Replies

Hi,

I hope someone could answer my question. 

Basically, I created my own Visual Page with several functionalities which allow users to input their tasks and then output some information based on it. What I wish to do is to allow this page visible by users, preferably first:

1) Ask them to log in to Salesforce account then it will direct to my Visual page
2) In that page, user will get output such as Date and time.
3) this data should be stored into their Standard Object Task. I have already created the class for storing the task into the Standard Object task but since my page is created with my account, so it will only store it to my account. However, what I wish for is to have it store into the user's account.

I tried "Site" but it just doesnt have the function to transfer the output back to Standard Object Task. 

Could anyone please assist me in this if possible? 


Thank you and looking forward to your response and help. 

Hi,

I wish to create a calendar in VF page that takes all the task list records. Example, a calendar and when user press on a date, it will show whether this date has task or not. 

Is this possible to make?

I have a button created and I wish to have a function where user could just hover to the button and then it will pop up a small window showing the information(String) that I have initialized in the controller.


VF page:

                        <a href="/{!showing}" id="aa" onblur="LookupHoverDetail.getHover('aa').hide();" onfocus="LookupHoverDetail.getHover('aa', '/{!showing}/m?retURL=%2F{!showing}&isAjaxRequest=1').show();" onmouseout="LookupHoverDetail.getHover('aa').hide();" onmouseover="LookupHoverDetail.getHover('aa', '/{!showing}/m?retURL=%2F{!showing}&isAjaxRequest=1').show();">

                            <apex:commandButton value="submit" action="{!submit}" style=""/>

</a>

 

Controller:

public with sharing class toshow{

public String showing {get;set;}

public toshow{
     showing = 'I just want to show information';
}
}

I tried this but it just load and then nothing shown, the small window dissappeared after loading. Can anyone assist me?

 

Hi,

I have made my code for the vf page to be this way:

<apex:page standardController="Task">  
   <!-- This will import Necessary Jquery js File and StyleSheets, maybe I should declare the website to another 3rd party API instead of google map-->  
   <apex:includeScript value="https://maps.googleapis.com/maps/api/js?key=AIzaSyDMX_jQIEOUZKyrthQdQwRPZA-e1hXlGGE&sensor=false"/>  
   <apex:includeScript value="{!URLFOR($Resource.jQuery_BlogForce9_162, 'js/jquery-1.6.2.min.js')}"/>  
   <apex:includeScript value="{!URLFOR($Resource.jQuery_BlogForce9_162, 'js/jquery-ui-1.8.16.custom.min.js')}"/>  
   <apex:includeScript value="{!URLFOR($Resource.jqPlugin, '/jquery.blockUI.js')}"/>  
   <apex:stylesheet value="{!URLFOR($Resource.jQuery_BlogForce9_162, 'css/ui-lightness/jquery-ui-1.8.16.custom.css')}"/>  
   <script>  
      var map,geocoder,infowindow;  
      var latLngs = [];  
      $j = jQuery.noConflict();   
      $j(document).ready(function(){  
        initialize();  
      });  
      function initialize() {  
       geocoder = new google.maps.Geocoder();  
       //initial cordinates for map init based on Tokyo 
       var latlng = new google.maps.LatLng(35.6895, 139.6917);  
       var myOptions = {  
         zoom: 4,  
         center: latlng,  
         mapTypeId: google.maps.MapTypeId.ROADMAP  
       };  
       //This will load the map and print information
       map = new google.maps.Map($j('#map')[0], myOptions);  
       codeAddress();  
      }  
      /*This function codes the address using the Billing Address in the Acoount*/  
      function codeAddress(){  
        //prepare a string for geocoding  
          var address = '{!Task.Site_Street__c},{!Task.Site_City__c},{!Task.Site_State__c},{!Task.Site_Zip__c}';  
        console.log(address);  
        //geocode the address  
        geocoder.geocode( { 'address': address }, function(results, status) {  
          //if it is a success  
          if (status == google.maps.GeocoderStatus.OK) {  
            var location = results[0].geometry.location;  
            var marker=addMarker(location );  
            //attach info window to the marker  
            attachInfoWindow(marker,results[0]);  
          }  
          else {  
            alert(status);  
              }  
        });   
      }  
      /*  
      *This method adds a marker to the provided location  
      **/  
      function addMarker(location) {  
       marker = new google.maps.Marker({  
           position: location,  
           map: map  
         });  
         //set the bounds and initial zoom  
       var latlngbounds = new google.maps.LatLngBounds();  
       latlngbounds.extend(marker.getPosition());  
       map.fitBounds(latlngbounds);  
       map.setZoom(14);  
       return marker;  
      }  
     //this function shows the address of a marker when it is clicked  
     function attachInfoWindow(marker,address){  
        google.maps.event.addListener(marker, 'click', function() {  
          if(infowindow!=null)  
           {  
             infowindow.close();  
           }  
         //HTML formated string that is used to dispaly info window over the map markers currently showing the formated address  
         var contentString = '<div class=" ui-state-active ui-corner-top" style="font-size: 1em; padding: 5px;">Address</div>'  
                   +'<div class="ui-widget-content ui-corner-bottom" style="font-size: .9em; padding: 15px;">'+address.formatted_address+'</div>';  
         infowindow = new google.maps.InfoWindow({  
           content: contentString  
         });  
          infowindow.open(map,marker);  
        });  
     }  
   </script>  
   <style>  
     #map {  
       width:100%;  
       height:200px;   
       margin-left:1.5%;  
     }  
   </style>  
   <div id="map" class="ui-widget-content ui-corner-all ui-state-default"></div>  
 </apex:page>






However, I received an error such as 

[c.ap0.visual.force.com

REQUEST_DENIED]


I do not know why it doesnt take the address in the task whenever I already specified the everything from address, city, state and zipcode. Please someone help me. 

Hi,

I wish to load the list inside the Task while at the same time I wish to understand some of the basics. 

Example,

public List<Task> allSubject {get;set;} // why do we use List<Task> and not List<String>?

allSubject = [select Subject from Task];
for (Task a : allSubject){
      //what to use here so that it will take the element inside Object/Dictionary 'Task'?
      // After taking the Task, then I wish to only take the values for 'Subject'
}

System.debug(//here I wish to check the value for 'Subject')

thank you. 
I wish to make something like the picture shown below; will this be feasible?User-added image
Hi,

Is there a way to pass the param of a clicked radio button back to controller?

Example of my vf page:

<apex:outputPanel id="repeating">
<apex:repeat value="{!change}" var="c">
<apex:selectRadio value="{!save}">
<apex:selectOption itemValue="{!c}" itemLabel="{!c}"><apex:param value="{!c}" assignTo="{!information}" name="c"></apex:selectOption>
</apex:selectRadio>
</apex:repeat>
<apex:actionSupport event="onchange" reRender="repeating" action="{!saveInformation}">
</outputPanel>

Example, if I clicked on button 1 then the information for button one that store in the param could be passed to controller. 
Hi,

I build a radiobutton within a repeat of a list and then use actionsupport with event set to "onchange".

Example,
<apex:outputPanel id="repeating">
<apex:repeat value="{!change}" var="c">
<apex:selectRadio value="{!save}">
<apex:selectOption itemValue="{!c}" itemLabel="{!c}" />
</apex:selectRadio>
</apex:repeat>
<apex:actionSupport event="onchange" reRender="repeating" action="{!saveInformation}">
</outputPanel>

However, this code only work on the final/last button. What I wanted it to do is to be able to save more than 1 button and any button that is changed. My current code only work on example;

button 1 *when pressed, nothing happen*
button 2 *when pressed, nothing happen*
button 3 *when pressed, this button can be saved* 

I wish it to be able to save any pressed buttons and also able to take more than 1 buttons to save. 

Is there a way to alter my code or should I make any changes?
I would like to have a VF page and controller that could ask user to click on any 3 of this information inside an array:

a = [["I have a thing"], ["I have thing", "I got something"]]

I know I can use repeat to
<apex:variable value="{!0}" var="v" />
<apex:repeat value="a" var="t">
<apex:commandLink action="{!showPopUp}">{!v}</apex:commandLink>
</apex:repeat>
<apex:variable value="{!v + 1}" var ="v" />



then it will print(in link form so that user can press) it according to :

*I have a thing*
*I have thing*
*I got something*

What I want is to have the VF page show information that map to the clicked one. Example, 

INSIDE "I have a thing", there is information such as gender=male, location=World and comments="something too good".
INSIDE "I got something", there is information such as gender =Female, location=Nowhere and comments="Not so good"

So when user pressed on "I have a thing". information such as  gender=male, location=World and comments="something too good" instead of other value. My main problem is I do not know how can I map this information to be printed on VF page. How can can I tell the VF page which one of these links is chosen and how to map the chosen one to the related information provided?

Please assist me in this or you can just tell me the algorithm and I will do it myself. please

Hi,

 

I try to save the information into "task" based on the checked box by the user but it wont work. The information is not stored. 

VF page:

<apex:pageBlockTable value="{!sentence}" var="var">
                                        <apex:column headerValue="Task">
                                            <apex:repeat value="{!IF((todo_index < listtodocombined.size), listtodocombined[todo_index], false)}" var="td" id="tt">
                                                <div class="slds-checkbox">
                                                    <input type="checkbox" name="default" id="checkbox-27" onchange="taskInsert()" value="{!subj}" />
                                                    <label class="slds-checkbox__label" for="checkbox-27">
                                                      <span class="slds-checkbox_faux"></span>
                                                      <span class="slds-form-element__label"><apex:commandLink action="{!showPopup}" value="{!td}"></apex:commandLink></span>
                                                      <apex:actionSupport event="onchange" action="{!taskInsert}" reRender="todotesting" />
                                                    </label>
                                                  </div>
                                            </apex:repeat>
                                        </apex:column>&nbsp;
                                    </apex:pageBlockTable>&nbsp;



Controller(Apex):

 public PageReference taskInsert() {
            
      /*  Task t = new Task();
    t.FileType__c = selectedFileType;
    t.Task_Comment__c = comment;
    
    insert t;*/
    
     
        
        String userId = UserInfo.getUserId();
            
        
         
        Task t = new Task();
        t.OwnerId = userId;
        t.Subject = subj;
        t.Status = 'Open';
        t.Priority = 'Normal';
        for (String text_add: textt){
            t.Description = text_add;
        }
        insert t;

How can I print the repeat ID of an apex:repeat?

example my loop is  ["I have " ,"something", "todo"]

I wish to print each repeat ID of this list. 
I have a List<List<String>> "named" with the value inside is is [['I have something'], ['I have nothing'], ['I have a thing']].

By refering to the picture below:

User-added image

I wish to have these three checkbox buttons to be in the same column. Here we have two columns and I wanted it to be in one column.

parameters: 

index: is a variable I created that is initialized at 1
special = [['I have something'], ['I have nothing'], ['I have a thing']]


My vf page code is as below:

<apex:pageBlockTable value="{!sentence}" var="var">
                                        <apex:column headerValue="Special case">
                                            <apex:repeat value="{!IF((index < special.size), special[index], false)}" var="td">
                                                <div class="slds-checkbox">
                                                    <input type="checkbox" name="default" id="checkbox-27" onchange="{!subj}" value="{!td}" />
                                                    <label class="slds-checkbox__label" for="checkbox-27">
                                                      <span class="slds-checkbox_faux"></span>
                                                      <span class="slds-form-element__label"><apex:commandLink action="{!showPopup}" value="{!td}"></apex:commandLink></span>
                                                    </label>
                                                  </div>
                                            </apex:repeat>
                                        </apex:column>&nbsp;
                                    </apex:pageBlockTable>&nbsp;


Does anyone know how can I make this happen?
I have this vf page code:

 <div class="slds-checkbox">
                                                    <input type="checkbox" name="default" id="checkbox-27" onchange="{!subj}" value="thanksgiving" />
                                                    <label class="slds-checkbox__label" for="checkbox-27">
                                                      <span class="slds-checkbox_faux"></span>
                                                      <span class="slds-form-element__label"><apex:commandLink action="{!showPopup}" value="Thanksgiving"></apex:commandLink></span>
                                                    </label>
                                                  </div>


When I check the box for "thanksgiving" then it should save this "thanksgiving" value back to my controller. Please do note that, I might not have only 1 checkbox but many checkboxes so is there a way to loop the list<String> subject. then each element in the string will be represented next to checkbox, then when user check any of the checkbox, Example, when user checked "thanksgiving", "No way" and "One way" then these checked information will be passed back to controller. 

Is there a way to do so?
I had posted a lot of questions asking the same question and problem arise due to not able to pass my parameter or values in the apex:repeat back to controller many times but to no avail, no response, no reply, no solution. 

I kind of giving up in learning this language. Before I quit, I really wish to understand how can this works, how can I pass a parameter back to controller WITHOUT THE USE of commandlink or any functions but only by

My list is like this  List<String> something{get;set;} // ["I have something", "I got something"]

I wanted to save each of the value inside the list "something" to <String> some // I have to pass the List"something" to VF page before passing it back from VF page to controller, this is my requirement. 

I then try to pass it to VF page:

<apex:repeat value="!something" var="s">
<apex:param value="!s" assignTo="{!some}"> // this has been create in controller <String>something {get;set;}
</apex:repeat>

My question, why I cant pass the value back to my controller? I try this method but nothing is stored in "some". I still do not know why. Many said use rerender but this "rerender" is only in function or commandlink, BUT I DO NOT WANT TO use these links. I just want to pass the parameter without any buttons or anything.

Please help. Its my final trial and its urgent! Thank you so much
I wish to make the selectionOption to be next to my "man eater" link. How can I do so. My code is as below:

<apex:selectCheckboxes value="{!subj}">
                                                <apex:selectOption itemValue="{!td}"><apex:commandLink action="{!showPopup}" value="man eater"></apex:commandLink></apex:selectOption>
                                                <apex:actionSupport event="onchange" action="{!Insert}" reRender="test" />
                                            </apex:selectCheckboxes>

Picture is belowUser-added image
I have a List of IDs "a" = ["12dfd1", "123hte32", "dslkf3134"]
and when I use in VF page.
I do not know how to pass this var = "t" within the repeat apex command back to controller. I want it to pass the value from 12dfd1, 123hte32 to dslkf3134 one by one.
I created public String get_id {get;set;} in apex controller but how can I store the value from the apex:repeat after it loop each value. I need the value to be loop one by one and printed on VF page and then these value each will send back to controller based on the "var" if possible

I have a dictionary like this:

{information=({id=73dndfie, valid=false, words=I wish to claim, task=()}, {id=8dfhdfw223, valid=true, words=get all the values for my computer, task=({id=1op8273, data={value=something, idea=Not sure will continue、}, task=emailing})}

I am wondering how can I create a VF page that will print the "words" when "valid" is true. Example, we have one valid data with id = 8dfhdfw223. Each ID is specifically for each dictionary set, meaning that id = 8dfhdfw223 has all the value for 

 

words=get all the values for my computer, task=({id=1op8273, data={value=something, idea=Not sure will continue、}, task=emailing}

 

My point is, I wanted to create a VF page that will print the words based on this ID on the page and then this ID value will be stored in a controller. The controller can then use this ID for an external API. Example, https://external.api.com/8dfhdfw223 will give us 

 

words=get all the values for my computer, task=({id=1op8273, data={value=something, idea=Not sure will continue、}, task=emailing} too. 

 

I have been researching for a while but could not find the right way to store the ID into the controller while using repeat to print the value - I am using repeat because sometimes we have more than one words dictionary in this ID. Example, we have words x 3 within this ID. 

I tried in VF page using repeat 

<apex:repeat value="{!id}" var="i" />
but then if I use "{!i}" it will only print the ID and not the words. I am wondering how can I achieve this while at the same time also passing the value of the ID back to controller. The reason I want it to be passed back because I need to create a link on this word based on this ID and then when pressed it will show information related to this ID .

Hi,

I wish to assign the output from my IF-ELSE method to a variable and I do not know why the value is not stored into "v"

<apex:variable var="td" value="{!IF((total_index <= total_index2 && total_index2 < v.size),listtodotemp[total_index][total_index2], total_index2 + 1)}" />
Hi,

I am wondering whether is it possible to combine these two functions; CommandLink + SelectOption? I get a lot of errors when try to combine it. 

                                            <apex:commandLink value="{!tc}" action="{!showPopup}" reRender="calloutViewer_Controller" /> <br />

                                            <apex:selectCheckboxes value="{!subj}">
                                            <apex:selectOption itemValue="{!tc}" itemlabel="{!tc}"/>
                                            <apex:actionSupport event="onchange" action="{!taskInsert}" reRender="test" />
                                        </apex:selectCheckboxes>
I tried to print my output based on the index by making a variable named "todo_index" and then assign it +1 after looping once but somehow it wont add 1:

My code:


<apex:page id="page" standardcontroller="Task" extensions="calloutViewer_Controller" >
    <style>
        .account{
            font-weight: bold;
        }
       a{
           color: #FF0000;
        }
    
    </style>
    <apex:form id="form" >
        <apex:sectionHeader title="Salesforce - Test " />
        <apex:pageMessages id="pageMessages" />
        <apex:pageBlock >
            <apex:pageBlockSection columns="2" title="Salesforce - Todo Parser" collapsible="False">
                <apex:pageBlockSectionItem >
                    <apex:outputPanel >
                        <div style="text-align:center;font-size: 13px;" class="account">
                            <apex:outputLabel value="Todo text" styleClass="account" />
                        </div>
                        &nbsp;<apex:inputTextarea style="width:100%;height:75px;" label="Left Side" value="{!requestBody}" id="theTextInput"  />&nbsp;
                        <div align="center">
                            <apex:commandButton value="Submit" action="{!deserializedd}" style=""/>
                        </div>
                    </apex:outputPanel>
                </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputPanel style="width:100%;height:100% ">
                        <div style="text-align: center;font-size: 13px;" class="account">
                            <apex:outputLabel value=" . " styleClass="account" />
                        </div>
                            <apex:variable var="todo_index" value="{!0}" />
                                &nbsp;<apex:pageBlockTable value="{!sentence}" var="var">
                                    <apex:column headerValue="ToDo">
                                        <apex:repeat value="{!IF ((todo_index < listtodocombined.size), listtodocombined[todo_index], "None")}" var="tc">
                                        <apex:selectCheckboxes value="{!subj}">
                                            <apex:selectOption itemValue="{!tc}" itemlabel="{!tc}"/>
                                            <apex:actionSupport event="onchange" action="{!taskInsert}" reRender="test" />
                                        </apex:selectCheckboxes>
                                        </apex:repeat>
                                    </apex:column>
                                </apex:pageBlockTable>&nbsp;
                            <apex:variable var="todo_index" value="{!todo_index + 1}"     />
                                <div align="center">
                                    <apex:commandButton value="Add Task" action="{!showPopup}" reRender="calloutViewer_Controller" />
                                </div>
                        </apex:outputPanel>
                    </apex:pageBlockSectionItem>
            </apex:pageBlockSection> 
        </apex:pageBlock>
        
        <apex:variable var="total_index" value="{!0}" />
        <apex:outputPanel id="calloutViewer_Controller">
        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}"/>
            <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
                <apex:repeat value="{!IF((total_index < listtodotemp.size),listtodotemp[total_index], "None")}" var= "td" >
                    <apex:repeat value="{!IF((total_index < listtodogoals.size),listtodogoals[total_index], "None")}" var="tg">
                    <br /><div align="center" style="text-align:center;font-size: 13px;" class="account">
                    Todo Description <br />
                    </div>
                    Subject : {!td} <br /> 
                    Time : {!total_index} <br />
                    Place : <br />
                    Action : {!tg} <br /><br />
                    <apex:commandButton value="Edit" action="{!editing}" reRender="calloutViewer_Controller" />
                    </apex:repeat>
                </apex:repeat>
                <apex:commandButton value="Hide Pop up" action="{!closePopup}" rerender="calloutViewer_Controller"/>
            </apex:outputPanel>
        </apex:outputPanel>
        <apex:variable var="total_index" value="{!todo_index + 1}"     />
    </apex:form>
    
    
    <style type="text/css">
        .custPopup{
            background-color: white;
            border-width: 2px;
            border-style: solid;
            z-index: 9999;
            left: 50%;
            padding:10px;
            position: absolute;
            /* These are the 3 css properties you will need to change so the popup 
            displays in the center of the screen. First set the width. Then set 
            margin-left to negative half of what the width is. You can add 
            the height property for a fixed size pop up if you want.*/
            width: 500px;
            margin-left: -250px;
            top:100px;
        }
        .popupBackground{
            background-color:black;
            opacity: 0.20;
            filter: alpha(opacity = 20);
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: 9998;
        }

    </style>
    
</apex:page>

I have a button created and I wish to have a function where user could just hover to the button and then it will pop up a small window showing the information(String) that I have initialized in the controller.


VF page:

                        <a href="/{!showing}" id="aa" onblur="LookupHoverDetail.getHover('aa').hide();" onfocus="LookupHoverDetail.getHover('aa', '/{!showing}/m?retURL=%2F{!showing}&isAjaxRequest=1').show();" onmouseout="LookupHoverDetail.getHover('aa').hide();" onmouseover="LookupHoverDetail.getHover('aa', '/{!showing}/m?retURL=%2F{!showing}&isAjaxRequest=1').show();">

                            <apex:commandButton value="submit" action="{!submit}" style=""/>

</a>

 

Controller:

public with sharing class toshow{

public String showing {get;set;}

public toshow{
     showing = 'I just want to show information';
}
}

I tried this but it just load and then nothing shown, the small window dissappeared after loading. Can anyone assist me?

 

Hi,

I wish to load the list inside the Task while at the same time I wish to understand some of the basics. 

Example,

public List<Task> allSubject {get;set;} // why do we use List<Task> and not List<String>?

allSubject = [select Subject from Task];
for (Task a : allSubject){
      //what to use here so that it will take the element inside Object/Dictionary 'Task'?
      // After taking the Task, then I wish to only take the values for 'Subject'
}

System.debug(//here I wish to check the value for 'Subject')

thank you. 
How can I print the repeat ID of an apex:repeat?

example my loop is  ["I have " ,"something", "todo"]

I wish to print each repeat ID of this list. 
I have this vf page code:

 <div class="slds-checkbox">
                                                    <input type="checkbox" name="default" id="checkbox-27" onchange="{!subj}" value="thanksgiving" />
                                                    <label class="slds-checkbox__label" for="checkbox-27">
                                                      <span class="slds-checkbox_faux"></span>
                                                      <span class="slds-form-element__label"><apex:commandLink action="{!showPopup}" value="Thanksgiving"></apex:commandLink></span>
                                                    </label>
                                                  </div>


When I check the box for "thanksgiving" then it should save this "thanksgiving" value back to my controller. Please do note that, I might not have only 1 checkbox but many checkboxes so is there a way to loop the list<String> subject. then each element in the string will be represented next to checkbox, then when user check any of the checkbox, Example, when user checked "thanksgiving", "No way" and "One way" then these checked information will be passed back to controller. 

Is there a way to do so?
I had posted a lot of questions asking the same question and problem arise due to not able to pass my parameter or values in the apex:repeat back to controller many times but to no avail, no response, no reply, no solution. 

I kind of giving up in learning this language. Before I quit, I really wish to understand how can this works, how can I pass a parameter back to controller WITHOUT THE USE of commandlink or any functions but only by

My list is like this  List<String> something{get;set;} // ["I have something", "I got something"]

I wanted to save each of the value inside the list "something" to <String> some // I have to pass the List"something" to VF page before passing it back from VF page to controller, this is my requirement. 

I then try to pass it to VF page:

<apex:repeat value="!something" var="s">
<apex:param value="!s" assignTo="{!some}"> // this has been create in controller <String>something {get;set;}
</apex:repeat>

My question, why I cant pass the value back to my controller? I try this method but nothing is stored in "some". I still do not know why. Many said use rerender but this "rerender" is only in function or commandlink, BUT I DO NOT WANT TO use these links. I just want to pass the parameter without any buttons or anything.

Please help. Its my final trial and its urgent! Thank you so much
I wish to make the selectionOption to be next to my "man eater" link. How can I do so. My code is as below:

<apex:selectCheckboxes value="{!subj}">
                                                <apex:selectOption itemValue="{!td}"><apex:commandLink action="{!showPopup}" value="man eater"></apex:commandLink></apex:selectOption>
                                                <apex:actionSupport event="onchange" action="{!Insert}" reRender="test" />
                                            </apex:selectCheckboxes>

Picture is belowUser-added image
I have a List of IDs "a" = ["12dfd1", "123hte32", "dslkf3134"]
and when I use in VF page.
I do not know how to pass this var = "t" within the repeat apex command back to controller. I want it to pass the value from 12dfd1, 123hte32 to dslkf3134 one by one.
I created public String get_id {get;set;} in apex controller but how can I store the value from the apex:repeat after it loop each value. I need the value to be loop one by one and printed on VF page and then these value each will send back to controller based on the "var" if possible

I have a dictionary like this:

{information=({id=73dndfie, valid=false, words=I wish to claim, task=()}, {id=8dfhdfw223, valid=true, words=get all the values for my computer, task=({id=1op8273, data={value=something, idea=Not sure will continue、}, task=emailing})}

I am wondering how can I create a VF page that will print the "words" when "valid" is true. Example, we have one valid data with id = 8dfhdfw223. Each ID is specifically for each dictionary set, meaning that id = 8dfhdfw223 has all the value for 

 

words=get all the values for my computer, task=({id=1op8273, data={value=something, idea=Not sure will continue、}, task=emailing}

 

My point is, I wanted to create a VF page that will print the words based on this ID on the page and then this ID value will be stored in a controller. The controller can then use this ID for an external API. Example, https://external.api.com/8dfhdfw223 will give us 

 

words=get all the values for my computer, task=({id=1op8273, data={value=something, idea=Not sure will continue、}, task=emailing} too. 

 

I have been researching for a while but could not find the right way to store the ID into the controller while using repeat to print the value - I am using repeat because sometimes we have more than one words dictionary in this ID. Example, we have words x 3 within this ID. 

I tried in VF page using repeat 

<apex:repeat value="{!id}" var="i" />
but then if I use "{!i}" it will only print the ID and not the words. I am wondering how can I achieve this while at the same time also passing the value of the ID back to controller. The reason I want it to be passed back because I need to create a link on this word based on this ID and then when pressed it will show information related to this ID .

how to pass value from vf page to controller ??
  • December 07, 2014
  • Like
  • 0

Hi All,

 

I am using radio button in data table in my Visualforce page.I am using wrapper class for this in controller.

When user selects the radi button i want to assign record id value to one of the variable in controller .

 

Below is the code which is not working.Please suggest what modification required here.If i use 'onclick' event that will refresh the page  which should not happen.

 

<apex:pageBlockTable value="{!accountlist}" var="apw" >
<apex:column >
<input type="radio"  value="true" name="r">
<apex:actionSupport event="onsubmit">
 <apex:param value="{!apw.id}" name="radioid"/>
</apex:actionSupport>
</input>
</apex:column>   
<apex:column value="{!apw.name}" headerValue="Partcipant Name"/>
<apex:column value="{!apw.Subject}" headerValue="Subject"/>
<apex:column value="{!apw.status}" headerValue="Status"/>

</apex:pageBlockTable>

 

Thanks,

Srilakshmi B