On 8/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi,
>
> i am using a subclass of AjaxEditableLabel.
> This one works fine so far but I have one Problem.
>
> If the value of the label is < 0 the markup should change.
> I tried it this way with no effect.
>
> public class MyAjaxEditableLabel extends AjaxEditableLabel{
>
> protected void onSubmit(AjaxRequestTarget target)
> {
> [...]
> if(position.getValue()[index] < 0)
> {
> this.getLabel().add(new AttributeModifier("class", true,
> new Model("negativ")));
> }
> else{
> this.getLabel().add(new AttributeModifier("class", true,
> new Model("positiv")));
> }
>
> this.getLabel().setVisible(true);
> this.getEditor().setVisible(false);
> target.addComponent(MyAjaxEditableLabel.this);
> }
>
> }
>
> In my css - stylesheet the class "negativ" and "positv" are defined.
> So if the value of the label changes to < 0 nothing happens.
>
> Any suggestions?
If I recall correctly, attribute changes not rendered correctly with
ajax requests was an issue that was recently solved. Matej, was that
you who fixed it?
Eelco
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]