• DatThepSoft
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 2
    Replies

Hello,

 

I can not get value from Apex:SelectRadio in the Apex:DynamicComponent.

 

This is example my code:

 

public with sharing class Sample{

 

public List<showsample> listcountry {get;set;}


public Sample()
{

               //Create new List when loading page

               listcountry = new List<showsample>();
               listcountry.add(new showsample());

               listcountry.add(new showsample());
}

public Component.Apex.OutputPanel getSelectRadio()
{
          Component.Apex.OutputPanel opSelectRadio = new Component.Apex.OutputPanel();
          opSelectRadio.id='opSelect';
         If(listcountry.size() > 0)
         {

               //Create SelectRadio component
              For(showsample item: listcountry)
              {
                       Component.Apex.selectRadio radio = new Component.Apex.selectRadio();
                       radio.expressions.value = '{!item.Text}';
                       radio.childComponents.add(getSelectOption('US','US'));
                       radio.childComponents.add(getSelectOption('CANADA','Canada'));
                       radio.childComponents.add(getSelectOption('MEXICO','Mexico'));
                      opSelectRadio.childComponents.add(radio);
                 }
         }
     return opSelectRadio;
}


Private component.apex.selectOption getSelectOption(String label,String value)
{
            component.apex.selectOption opt=new component.apex.selectOption();
            opt.itemLabel = label;
            opt.itemValue = value;
           return opt;
}


public PageReference Save()
{

         If(listcountry.size() > 0)
        {
             For(showsample item: listcountry)
             {
                   system.debug('Show Contry content: ' + country);
            }
         }
    return null;
}

 

//defined Class entry
private class showsample
{
      public showsample(){}
       Public String Text {get;set;}
}

}

==========================End Controller==================================

 

=====================VisualForce Page===============================================

<apex:page controller="Sample">
<apex:form >
<apex:outputPanel id="out2" >
            <apex:dynamicComponent componentValue="{!SelectRadio}"/> //call DynamicComponent
</apex:outputPanel>


<apex:actionFunction action="{!Save}" name="save" id="save" reRender="opSelect"/>

<script>


function savemethod()
{
      save();
}

</script>
<input type="button" value="Save" onclick="savemethod();" /> // run save funtion
</apex:form>
</apex:page>

=====================End VisualForce Page===============================================

 

* I loaded page ok and after that select on each radio button 'US' or 'Canada' => click Save button

 

The result is here: Null

The result is here: Null

 

Expect Result is: 'Us' or 'Canada'

 

Please help me and check what is my wrong!.

 

Thanks,

Dat thep soft

Example: I have a Object A with many fields: ID, Name, Version__c,DescriptionName__c

 

and Data here:

 

Record : Name                   Version__c                          DescriptionName__c

                Protocol1              1                                                //

               

                Protocol1              2                                                //

               

                Protcol 2               1                                              //

               

                Protocol3              1                                              //

               

                Protocol2               2                                              //

I want to get All Protocols have max value.

The result have to return : Protocol1 - version :2

                                               Protocol2- version: 2

                                               Protocol3 - version:1

Please help me,

datthepsoft

Example: I have a Object A with many fields: ID, Name, Version__c,DescriptionName__c

 

and Data here:

 

Record : Name                   Version__c                          DescriptionName__c

                Protocol1              1                                                //

               

                Protocol1              2                                                //

               

                Protcol 2               1                                              //

               

                Protocol3              1                                              //

               

                Protocol2               2                                              //

I want to get All Protocols have max value.

The result have to return : Protocol1 - version :2

                                               Protocol2- version: 2

                                               Protocol3 - version:1

Please help me,

datthepsoft

Hi,

 

I've read though what I've seen already on the boards here, but as I am very new to sales force, and this is my first attempt at installing an app, I'm afraid I need help.

 

I'm trying to install linkforce, and I'm having a difficult time.

 

When I go to set the base and default URLs, and I  enter my salesforce domain (http://aysymphony.force.com) under "default value" for base url, it comes back with the following error:

 

Error: Syntax error. Found '/'

 

I have the same problem when attempting to enter a default URL. Am I entering the url in the wrong place? the wrong format? 

 

I also saw several other posts here regarding the setup of other aspects of LinkForce which I don't know how I would begin to tackle.

 

Is there an installation guide for this somewhere?

 

Thanks in advance!

 

Alice