Where is getValue()?!

Hello ,I cannot get the method getComponent(“”).getValue(),all what i get is getValueBound()!!

Subject: Just do it!

Ignore the popup help. getComponent( ‘componentname’ ).getValue() works for me.

Subject: error

I tried it but i got an ‘unexpected error’

Subject: Can you post some code here?

Subject: code

in my first combo i have in the value: @DbColumn(@DbName,“1”,1)and in the onChange event i put:

var nom =getComponent(“nomClient”).getValue();

requestScope.put(“nomClient”,nom);

and in the second combo i have :

var nom=requestScope.get(“nomClient”);

@DbLookup(@DbName(),“2”,nom,“numClient”)

Subject: Works for me…

… albeit with the dblookups.

<xp:comboBox id=“comboBox1”>

<xp:selectItem itemLabel=“label1” itemValue=“val1”></xp:selectItem>

<xp:selectItem itemLabel=“label2” itemValue=“val2”></xp:selectItem>

<xp:eventHandler event=“onchange” submit=“true” refreshMode=“complete”> xp:this.action<![CDATA[#{javascript:var nom = getComponent(“comboBox1”).getValue();

requestScope.put(“nomClient”,nom);}]]></xp:this.action>

</xp:eventHandler>

</xp:comboBox>

						<xp:comboBox id="comboBox2">

xp:selectItems

xp:this.value<![CDATA[${javascript:var nom=requestScope.get(“nomClient”);

nom}]]></xp:this.value>

</xp:selectItems>

</xp:comboBox>

Make sure your field names match the coding, “comboBox1” in this example.

Subject: It works but …

Thank u so much it works,but when i submit the page i get an error ,even if i change the refresh to partial.

javax.faces.FacesException com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:105)

com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:96)

com.ibm.xsp.controller.FacesControllerImpl.execute(FacesControllerImpl.java:226) com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:183)

com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:151)