Re: How to set content of an ajax enabled link?

2012-10-23 Thread cosmindumy
Hi,
How can I set the text inside a ajaxlink. I use a table and on populateItem
on AbstractColumn I add a link. 
I don't want to use another component with onclick ajax behavior.I also
cannot add a child to ajaxlink. I do not have control on it on html. Here is
the code. 

public void populateItem(final ItemICellPopulatorlt;UserDetailsVO item,
final String componentId, final IModelUserDetailsVO rowModel)
{
item.add(new AjaxLink { ... });
}

Thanks. 




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-set-content-of-an-ajax-enabled-link-tp1882634p4653254.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to set content of an ajax enabled link?

2012-10-23 Thread Martin Grigorov
See AbstractLink#setBody(IModelString)

On Tue, Oct 23, 2012 at 12:16 PM, cosmindumy cosmind...@yahoo.com wrote:
 Hi,
 How can I set the text inside a ajaxlink. I use a table and on populateItem
 on AbstractColumn I add a link.
 I don't want to use another component with onclick ajax behavior.I also
 cannot add a child to ajaxlink. I do not have control on it on html. Here is
 the code.

 public void populateItem(final ItemICellPopulatorUserDetailsVO item,
 final String componentId, final IModelUserDetailsVO rowModel)
 {
 item.add(new AjaxLink { ... });
 }

 Thanks.




 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-set-content-of-an-ajax-enabled-link-tp1882634p4653254.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to set content of an ajax enabled link?

2012-10-23 Thread Martin Grigorov
Use your own Link/AjaxLink and add the logic.
See the code in Wicket 1.5 for inspiration.

On Tue, Oct 23, 2012 at 12:48 PM, cosmindumy cosmind...@yahoo.com wrote:
 We are using Wicket 1.4.18.
 There is no setBody method on abstract link.
 Is there any possiblity?
 Thanks.



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-set-content-of-an-ajax-enabled-link-tp1882634p4653258.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



How to set content of an ajax enabled link?

2009-04-23 Thread HHB
Hey,
Is there a way to set the content of a link 
dynamically (the value is coming from model object)?
The link has to be Ajax enabled for sure.
Thanks.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to set content of an ajax enabled link?

2009-04-23 Thread Liam Clarke-Hutchinson
By content you mean the text yeah? Create your link (We use
AjaxFallbackLinks for Ajax links, but there's others), and then create
a label with an appropriate model, and add the label to the link.
You're markup would look like so:

a href=# wicket:id=ajaxLinkspan wicket:id=linkContent/span/a

How dynamic a content you're after really depends on what you're
doing. If you're not using a dynamic model (I'm a big fan of property
models over domain objects) you could easily change the Model of the
linkContent label in the ajaxLink's onUpdate method. Just make sure
you add the link to the ajaxRequestTarget to see it update.

If you want a more specific model behaviour, not too hard to knock up
a class implementing IModel that does what you need.

Regards,

Liam Clarke

On 4/23/09, HHB hubaghd...@yahoo.ca wrote:
 Hey,
 Is there a way to set the content of a link
 dynamically (the value is coming from model object)?
 The link has to be Ajax enabled for sure.
 Thanks.


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org