Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: SelectComponent event

  1. #1

    Default SelectComponent event

    I'm having problem to add an event to a SelectComponent:

    components[components.length] = {    
            name: "listaExercicios", type: "selectComponent",
            solution: solution, path: path,
            action: "getExercicios.xaction",
            htmlObject: "listaExercicios",
                       $("select").prepend("<option value='All' selected='selected'>Todos</option>");
            preChange: function(){
                alert("Running the preChange!");
            executeAtStart: true
    Is this the correct way to fire the changes in SelectComponent??

  2. #2
    Join Date
    Jul 2007


    You shouldn't need to have a .ready function in there

    try just (although you could try fireChange(,"All"):

    $("select").prepend("<option value='All' selected='selected'>Todos</option>");
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3


    I think I have to explain more!

    I'm creating a dashboard with one SelectComponent and two bar charts. My intention is when a user select a year in SelectComponent my charts change the information. So, my problem is linking the select event of SelectComponent with the chart.
    I've read some documentation about CDF and understood that the way to do this is calling "Dashboards.processChange" method and implementing "preChange: function()", but it isn't working!

    Is this the correct way to do this??

    P.S.: Thanks pmalves, .ready function really isn't necessary.

  4. #4

    Smile Solved

    I used simple jquery methods:

                var valor=$("#listaExercicios option:selected").val();
    This worked fine!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.