• Jumbo
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies

 

Hi All, 

 

How can I pass a value to an apex:param of an apex:commandLink from an apex:SelectList ?

I think I have to set an Id attribute to my SelectList but the problem is that my SelectList is in a DataList and I don't know how I can set a different SelectList Id for each row of my DataList.

 

My code

<apex:dataList value="{!events}" var="event"> <apex:form> <apex:outputText value="{!event.Commercial__c}"/> <apex:outputText value="{!event.Produits__c}"/> <apex:outputText value="{!event.Subject}"/> <apex:outputText value="{!event.What.Name}"/> <apex:selectList value="{!choice}" multiselect="false" size="1"> <apex:selectOptions value="{!choiceaction}"/> </apex:selectList> <apex:commandLink value="Do Action for this event" action="{!goToAction}"> <apex:param value="{!event.Id}" name="eventid" /> <apex:param value="" name="selectedChoice" /> </apex:commandLink> </apex:form> </apex:dataList>

 

 

I want my param selectedChoice have to take the value of the SelectList when I click on my commandLink.

 

My Controller

 

... public PageReference goToAction() { evt = PageReference Traitementcas1 ApexPages.currentPage().getParameters().get('eventid'); choice = PageReference Traitementcas1 ApexPages.currentPage().getParameters().get('selectedChoice'); ... }

 

 

Any Help please ?

 

Thanks

 

  • August 28, 2009
  • Like
  • 0

Hi,

 

i have a problem with the "PageReference Save", i try to save an apex page which contains 3 forms but it doesn't work.

 it save just the form that contains the Save button!!!

 

Does anyone know how to save the page with all forms?

  • July 13, 2009
  • Like
  • 0

Hi,

 

I wanna create a form who allows the creation of multiple records in one time, for example 10 opportunities or 10 contacts.

  • June 16, 2009
  • Like
  • 0

Hai  i am new to visual force page

 

How to disaply below query data in visual force page

 

AggregateResult[] oppResult= [select SUM(amount),LeadingConverteamUnit__c from Opportunity where RECORDTYPEID = '012200000001ReyAAE'
 GROUP BY LeadingConverteamUnit__c ];

so now i need to display this groupedResults in table or grid manner how to do this

 --------------------------------------------

| leading unit                   |    amount      |

---------------------------------------------

|sample1                        | 10000           |

|-------------------------------------------

|sample opp2                  | 200000        | 
|-------------------------------------------

|sample Opp3                 | 300000000   |

---------------------------------------------

 

 

Hi,

 

I wanna create a form who allows the creation of multiple records in one time, for example 10 opportunities or 10 contacts.

  • June 16, 2009
  • Like
  • 0
Hi guys,

I'm experiencing some unexpected behavior when trying to use the apex:repeat function to render tabs....

Basically it seems that tabs cannot be created on demand?  My controller is definitely returning data... as the second page block in my sample will show... repeat works - just the tabs are not rendered..

I'm sure any of you guys can see where I was going with this - and I guess I can achieve a similar result by dropping down to boring old html - just trying to use the standard components (as per best practice)

Any assistance greatly appreciated - as the purist coder me is seriously disturbed at the moment...

here is my 'simplified' and easily testable page & controller

Code: VF PAGE
<apex:page controller="clsRecordType">
    <apex:pageBlock >
        <apex:tabPanel id="theTabPanel">
            <apex:tab label="Account Types"/>
            <apex:repeat value="{!RecordTypes}" var="types">
                <apex:tab label="{!types.Name}"/>     
            </apex:repeat>
        </apex:tabPanel>
    </apex:pageBlock>

    <apex:pageBlock >
        <apex:repeat value="{!RecordTypes}" var="types">
            {!types.Name}<br/>       
        </apex:repeat>
    </apex:pageBlock>
</apex:page>

and the controller

Code:
public class clsRecordType {

    list<RecordType> lrecordtypes;

    public list<RecordType> getRecordTypes() {
        if(lrecordtypes==null) lrecordtypes = [Select Name, Id, Description From RecordType  where SobjectType = 'Account' and IsActive=True];
        return lrecordtypes;
        }
   }