I don't believe your getInstanceState() method is being called, therefore you are not setting your color. You have:
<div id="Liste" t:source="instanceState" t:value="color" style="background-color: ${color}"> Tapestry is ignoring the t:source because there is no t:type specified. If you look at the HTML generated, you'll probably see: <div id="Liste" style="background-color: "> mrg On Wed, Jul 28, 2010 at 12:00 PM, mcfly37 <vincentgou...@gmail.com> wrote: > > Hi all!! > > As I said in the title I'm trying to change dynamically the background-color > parameter of a <div>. I tried with this code : > > <div t:type="loop" t:source="instanceList" t:value="instances"> > <div id="Liste" t:source="instanceState" > t:value="color" > style="background-color: ${color}"> > > ${instances.nomInstance} > </div> > </div> > > And the java class is like this : > > �...@property > private Instances instances; > > �...@property > private String color; > > public List<Instances> getInstanceList() > { > try { > return (List<Instances>) instanceManager.sortAll(); > } catch (BusinessException e) { > > e.printStackTrace(); > return null; > } catch (TechnicalException e) { > > e.printStackTrace(); > return null; > } > } > > public String getInstanceState() > { > InstanceService service = new InstanceService(); > color = service.instanceState(instances.getIdAo()); > return color; > } > > Apparently it's good but the background-color doesn't change... Even if I > try to simply return color = "red" there are no changes... and neither error > message... So I'm quite disappointed, I don't see where the program bugs... > > If anyone can help me it would be very great ^^ > > ps : Excuse me for the grammar, English is not my native language ^^ > -- > View this message in context: > http://old.nabble.com/Background-color-dynamic-change-tp29288115p29288115.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org