Yes, it's make sense.
I change to ptopertyModel and now thinks works.
Thanks Cemal.
2010/2/9 Cemal Bayramoglu :
> Rangel,
>
> The is a common problem people encounter while they get their head
> aroung Wicket models.
> In your Header class, the label's "data" is only ever calculated once,
> on co
Rangel,
The is a common problem people encounter while they get their head
aroung Wicket models.
In your Header class, the label's "data" is only ever calculated once,
on construction of the Header and is therefore is fixed.
Try something like:
final Label itens = new Label("itens", new
> The problem are in HomePage.java in the onClick... this don't reRender
> my componente in the header.
Are you sure? The real problem seems that your itens label uses an implicit
model based on the constructor-time value of getAmount(), and which is never
changed.
Look into using a model inste
I try this again using only setOutputMarkupId without modelChanged and
onModelChange, and don't work.
I just setOutputMarkupId on my component and in the ajaxEvent i put:
target.addComponent(getPage().get("header:counter"));
header is a panel and counter is a Label in this panel.
Thanks All.
Thanks, Don but this don't work the value don't change. And I call
setOutputMarkupId when i build it. and call it again later...
Thanks All.
2010/2/8 Don Ferguson :
> I think setOutputMarkupId() should have been called earlier, in the
> MyTemplate constructor when the Header was constructed. Aja
I think setOutputMarkupId() should have been called earlier, in the
MyTemplate constructor when the Header was constructed. Ajax
processing needs the markup id to find the component you're changing,
so setting it in onModelChanged() is too late. Also, I don't think
you need the call to mo
My template HTML
http://www.w3.org/1999/xhtml";
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";>
What do the tasty HTML bits look like? (wicket:ids and what not)
On Fri, Feb 5, 2010 at 12:50 PM, Rangel Preis wrote:
> How can I use Ajax to change value from a parent page in my layout. I
> try to change values in header using a action from content page.
>
> I have this:
>
> |---
How can I use Ajax to change value from a parent page in my layout. I
try to change values in header using a action from content page.
I have this:
|---|
| HEADER |
|---|
| MENU | CONTENT |
|