To help reduce some code, why not extend the BookmarkablePageLink class to
form your JavascriptConfirmLink and then no need to write the onclick().
also try
new JavascriptConfirmLink(id, cls, new PageParameters(method=method1),
msg)
and the id will be used here:
span wicket:id=listViewId
a
That looks pretty reasonable to me (though my code is not in front of
me right now). I like how you can pass a String to 'new
PageParameters()'. A little unexpected but nice (I should have read
the javadoc more thoroughly).
So I have another question: How to you set the link's title? That is,
how
Why not just add a label to the link.
span wicket:id=listViewId
a wicket:id=theLinkId href=anotherPage?method=method1
label wicket:id=theLabelIdmethod1/label
/a
/span
add(new ListView(theLinks, theLinks) {
@Override protected void populateItem(ListItem item)
D'oh! Of course. And I assume you mean span instead of label.
On 5/9/07, Shams Mahmood [EMAIL PROTECTED] wrote:
Why not just add a label to the link.
span wicket:id=listViewId
a wicket:id=theLinkId
href=anotherPage?method=method1
label wicket:id=theLabelIdmethod1/label
/a
You may choose to use almost any html tag for labels.
It's just that the wicket examples all use spans :)
D'oh! Of course. And I assume you mean span instead of label.
On 5/9/07, Shams Mahmood [EMAIL PROTECTED] wrote:
Why not just add a label to the link.
span wicket:id=listViewId
a
you can also factor out the javascript confirmation into a behavior and
reuse it across any links classes like
Link link=new Link(foo) { onclick(){..}}.add(new
LinkConfirmation(sure?));
BookmarkablePageLink link=new BPL(...).add(new LinkConfirmation(sure?));
-igor
public class
Is IComponentAssignedModel only in 1.3?
On 5/9/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
you can also factor out the javascript confirmation into a behavior and
reuse it across any links classes like
Link link=new Link(foo) { onclick(){..}}.add(new
LinkConfirmation(sure?));
yes, and you can ignore that part if you are on 1.2.x
-igor
On 5/9/07, Lowell Kirsh [EMAIL PROTECTED] wrote:
Is IComponentAssignedModel only in 1.3?
On 5/9/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
you can also factor out the javascript confirmation into a behavior and
reuse it across
Igor,
I notice that you call detach() on your models in this example. I have
searched, but can not find where it is written when (or if) we should be
calling detach ourselves. I'm using implementations of
LoadableDetachableModel for my models that hold DB-backed domain objects. I
don't want
only models that are assigned to component's default model slot are detached
automatically.
you can think of it as component doing this
component { ondetach() { imodel model=getmodel(); if (model!=null) {
model.detach(); }}}
if you keep a reference to a model yourself (say in a field) then you
10 matches
Mail list logo