Re: using formMap.put()

2008-07-31 Thread Barbara Slupik
I don't know what are you trying to do. I was using parameters in  
repeater action like this:


fd:repeater-action id=addSomething command=add-row  
repeater=myRepeater

  fd:on-action
fd:javascript
  var form=event.source.form;
  var repeater=form.getChild(myRepeater);
  var row=repeater.getRow(repeater.getSize() - 1);
  row.getChild(myWidget).setValue(form.getAttribute 
(myAttribute));

/fd:javascript
  /fd:on-action
/fd:repeater-action

or inside ft:repeater-rows like this:

jx:if test=${form.getAttribute('myAttribute') 
==something}tdft:widget id=myWidget//td/jx:if


Barbara


On 31 Jul, 2008, at 5:23 pm, Мария Григорьева wrote:


How to pass the repeater to the formMap.put ?

I’m trying smth like this:

formMap.put(test, comp_in_composition);

But, only the null values returned.

formMap = {test=[{type=null, amount=null, select=false},  
{type=null, amount=null, select=false}, {type=null, amount=null,  
select=false}, {type=null, amount=null, select=false}]


What should I do to pass the repeater parameter?




Re: using formMap.put()

2008-07-31 Thread Magsend

I'm trying to pass the parameters from the database to the form.
So, I want to use formMap for this purpose. 

It's my database request:
var comp_in_composition =
dao.component_in_composition.get(experiment.get(id_compositions));

Then I can pass it, using 

formMap.putAll(comp_in_composition);

But, I have more than one variable... So, I think I should use
formMap.put(...)

When trying smth like that:

formMap.put(test, comp_in_composition);   -- test is the name of the
repeater widget

the output is --- A repeater cannot be filled with {AMOUNT=1, TYPE=SiO2}



Barbara Slupik-3 wrote:
 
 I don't know what are you trying to do. I was using parameters in  
 repeater action like this:
 
 fd:repeater-action id=addSomething command=add-row  
 repeater=myRepeater
fd:on-action
  fd:javascript
var form=event.source.form;
var repeater=form.getChild(myRepeater);
var row=repeater.getRow(repeater.getSize() - 1);
row.getChild(myWidget).setValue(form.getAttribute 
 (myAttribute));
  /fd:javascript
/fd:on-action
 /fd:repeater-action
 
 or inside ft:repeater-rows like this:
 
 jx:if test=${form.getAttribute('myAttribute') 
 ==something}tdft:widget id=myWidget//td/jx:if
 
 Barbara
 
 
 On 31 Jul, 2008, at 5:23 pm, Мария Григорьева wrote:
 
 How to pass the repeater to the formMap.put ?

 I’m trying smth like this:

 formMap.put(test, comp_in_composition);

 But, only the null values returned.

 formMap = {test=[{type=null, amount=null, select=false},  
 {type=null, amount=null, select=false}, {type=null, amount=null,  
 select=false}, {type=null, amount=null, select=false}]

 What should I do to pass the repeater parameter?
 
 
 

-- 
View this message in context: 
http://www.nabble.com/using-formMap.put%28%29-tp18758348p18759398.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]