You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michael Heinen <mh...@recommind.com> on 2006/02/16 22:08:56 UTC

Access selected value without validation

Hi all,

 

I have a selectOneMenu and a link beside it.

When the user clicks the link I need the selected value in my Bean
without form validation!

 

I tried to call an ActionListener (DynaControllerBean.doSomething) and
to get the new selected value but the following code fails.

I don't know how to replace value="????" with something meaningful.

Or can I access the submitted value in an other way ?

 

I tried also a ValueChangeListener for selectOneMenu, but this is no
alternative because it is also called after every page submit (and value
change).

 

 

<t:selectOneMenu id="documentTypeId" forceId="true"
value="#{DynaControllerBean.document.datafield['documentTypeId']}"> 

   <f:selectItems value="#{CacheBean.doctypes"/>

</t:selectOneMenu>

 

<h:commandLink actionListener="#{DynaControllerBean.doSomething}"
immediate="true">

            <t:updateActionListener
property="#{DynaControllerBean.selectedType}" value="documentTypeId"/>

            <t:updateActionListener
property="#{DynaControllerBean.selectedValue}" value="????"/>

            <f:verbatim>

                <img src="images/mag_glass.gif">

            </f:verbatim>

</h:commandLink>

 

 

Snipplet from Class DynaControllerBean 

public void doSomething(ActionEvent ve) {

            

      String taxonomy = this.getSelectedTaxonomy(); 

      //this.getDocument().getDatafield().get(taxonomy);

 

      ???

}

 

Snipplet from  Cass Document

private Map<String, Object> datafieldMap;

 

 

TIA

Michael