cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Мария Григорьева <mags...@gmail.com>
Subject RE: using fd:on-value-changed ???
Date Mon, 25 Aug 2008 11:19:03 GMT
Sorry, I wrote a wrong procedure:

Here: 

function edit_phisical_parameters() {
	var id = cocoon.parameters.id;
	var form = new Form("forms/components.xml");
	var formMap = form.asMap();
	var experiment = dao.experiments.get(id);
	var composit = dao.composition.get(experiment.get("id_compositions"));
	var composition_id = experiment.get("id_compositions");
	cocoon.parameters.comp_id = composition_id;
	var comp_in_composition = dao.component_in_composition.get(experiment.get("id_compositions"));
	formMap.put("density", composit.get("density"));
	form.showForm("viewform-component-template.html");
	if (form.isValid) {
		var sql = "update compositions set density = " + formMap.get("density") + " where id = "
+ experiment.get("id_compositions");
		dao.dbi.execute(sql);
	}
	var url = "" + id + "/do_list_compositions";
	cocoon.redirectTo("phisical_parameters", true);
}

-----Original Message-----
From: Jeroen Reijn [mailto:j.reijn@onehippo.com] 
Sent: Monday, August 25, 2008 1:40 PM
To: users@cocoon.apache.org
Subject: Re: using fd:on-value-changed ???

Hi,

See http://ora-00904.ora-code.com/. It means that the settings are 
probably incorrect for the columns in the db.

Regards,

Jeroen Reijn

Мария Григорьева wrote:
> Hello!!! I’m trying to update form data, using on-value-changed:
> 
>  
> 
> <fd:field id="density" required="true">
> 
>                 <fd:label>Плотность</fd:label>
> 
>                 <fd:datatype base="decimal"/>
> 
>                 <fd:on-value-changed>
> 
>                                <javascript>
> 
>                                                var value = this.value;
> 
>                                                var test = 
> cocoon.parameters["comp_id"];
> 
>                                                var sql = "update 
> compositions set density = " + value + " where id = " + test;
> 
>                                                dao.dbi.execute(sql);
> 
>                                </javascript>
> 
>                 </fd:on-value-changed>
> 
>   </fd:field>
> 
>  
> 
> But as output I’ve got the exception:
> 
>  
> 
> java.sql.SQLException: ORA-00904: "UNDEFINED": invalid identifier
> 
>  
> 
> What’s the problem ?
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message