• Mary Jane 12
  • 0 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 3
Hi All,

My requirement is I have 2 radio buttons byname Movies,Events and When i click on movies related Movielist dropdown should appear similarly for events.I have a submit button byname ClickMe,if i click that button i want to display selected movie or an event.

I have done it partially,i need any of ur help as i am new to salesforce i am not exposed to these kind of scenarios.So please help me out.
I am sharing my code.Thanks in advance.

The dropdown in red box should come only if select any of above radio button.The text in yellow box should come only after Clicking Click Me button.

<apex:page id="pp" title="Movie's Now" controller="Movies" showHeader="false">
  <Apex:form >
   <apex:pageBlock title="Welcome to MOvie Selection Process">
   <!--   For Selecting Movie and Play        -->
      <apex:selectRadio value="{!s}" rendered="true">
        <apex:selectOptions value="{!items}"/>
         <apex:actionSupport event="onclick" action="{!Click}" ReRender="in" >
            <apex:param assignTo="{!s}" name="ss" value="{!Movies}" />
           <!--<apex:actionFunction action="{!MovieSelection}"  name="MovieLocked" /> 
           <apex:actionFunction action="{!EventSelection}"  name="EventLocked" />-->
           <!-- for dropdown list -->
            <apex:selectList size="1" value="{!newmovies}" multiselect="false" rendered="{!newMovies!=null}" onclick="MovieSelection">
                <apex:selectOptions value="{!Movies1}"/>
                <apex:actionSupport event="onchange" reRender="in" action="{!MovieSelection}"/>
         <apex:selectList size="1" value="{!newEvents}" multiselect="false" rendered="{!newEvents!=null}">
            <apex:selectOptions value="{!Events1}"/>
        <!-- command button -->
        <apex:commandButton value="$$Click Me$$" action="{!Click}" rerender="out" status="status"/>
   <apex:outputpanel id="in" rendered="{!lmve.size != 0 && newEvents!=null || newmovies!=null}">
                              <apex:actionSupport event="onchange" rerender="out" status="status"/>
   <apex:outputPanel id="out" rendered="{!lmve.size != 0}">
           <apex:outputText value="{!lmve}">The selected option is "{!s}"</apex:outputText>
           <apex:outputText value="{!lmve}">The selected Movie is "{!Events}"</apex:outputText>
************Controller class**********************

public class Movies

  public String s{get;set;}
  public String name{get;set;}

  public boolean Movieflag{get;set;}
  public boolean Eventflag{get;set;}
  public  List<Movie__c> lmve{Get;Set;}
  public String Events{get;set;}
  public String Movies { get; set; }
  public boolean displayflag{get;set;}
  public List<SelectOption> options1{get;set;}
  public List<SelectOption> options2{get;set;}
  String[] newmovies= new String[]{};
  public String[] getnewmovies() {
            return newmovies;
        public void setnewmovies(String[] newmovies) {
            this.newmovies= newmovies;

  String[] newEvents=new String[]{};
  public String[] getnewEvents() {
            return newEvents;
        public void setnewEvents(String[] newEvents) {
            this.newEvents= newEvents;
  public Movies(){
  public PageReference Click()
   if(s!=null && s.equalsIgnoreCase(Movies)){
   else if(s!=null &&s.equalsIgnoreCase(Events)){
   List<Movie__c> lmve=new List<Movie__c>();
   lmve=[SELECT Id,Cinemas__c,name__c,Price__c,Tickets__c from Movie__c];
   return null;
   public pagereference MovieSelection() 
        ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.confirm,'You Selected a movie'));
        return null;  
    public pagereference EventSelection() 
        ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.confirm,'You Selected an Event'));
        return null;  

   public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>(); 
        options.add(new SelectOption('Movies','Movies'));
        options.add(new SelectOption('Events','Events')); 
        return options; 
    public List<SelectOption> getMovies1() {
            List<SelectOption> options1 = new List<SelectOption>();
            options1.add(new SelectOption('Bahubali','Bahubali'));
            options1.add(new SelectOption('Rangitaranga','Rangitaranga'));
            options1.add(new SelectOption('BhaiJan','BhaiJan'));
            return options1;
    public List<SelectOption> getEvents1() {
            List<SelectOption> options2 = new List<SelectOption>();
            options2.add(new SelectOption('abc','abc'));
            options2.add(new SelectOption('def','def'));
            options2.add(new SelectOption('sss','sss'));
            return options2;


I am trying to build a test app with Mobile SDK in eclipse, I've managed all the steps and I don't see errors in the project. But when I try to run my application on a virtual device, I get this error:

04-07 12:11:53.251: I/dalvikvm(933): Failed resolving Lcom/fnr/test/KeyImpl; interface 11 'Lcom/salesforce/androidsdk/app/SalesforceSDKManager$KeyInterface;'

In Eclipse I have my test project, a project with SaesforceSDK and a project with SmartStore. The dependencies are marked via Properties -> Android -> Library. For what I see in my test project there is a KeyImpl.java file indeed in the package.

Have you faced this problem? Thanks in advance

Here is my brief profile:


    * 3 years experience in Force.com development, 7+ years in software development.
    * Apex coding (triggers, testmethods, webservices, Soql, Sosl)

    * Visual Force pages
    * S-Controls
    * Web API, .Net, C#, ASP.NET, Javascript, Sql Server, Oracle
    * Workflow rules

    * Deployment

    * Data management

    * and customization


For further information please email me at eperla@live.ca with your contact details. 





Message Edited by yoyo on 03-15-2010 08:01 AM
  • March 08, 2010
  • Like
  • 0