Simpler than that. I just added this example to wicket-examples/link-o-matic:
Java:
PopupSettings popupSettings = new
PopupSettings(PageMap.forName("popuppagemap")).setHeight(500).setWidth(500);
add(new BookmarkablePageLink("popupButtonLink",
Popup.class).setPopupSettings(popupSettings));
HTML:
<input type="submit" wicket:id = "popupButtonLink" value="Click this
button for a popup" />
The link actually attaches to the input tag. Like I said, it could
attach to anything really, including buttons, table rows, etc.
Hope this helps,
Eelco
On 5/17/06, Nino Wael <[EMAIL PROTECTED]> wrote:
Ok, I think I need an example. I'll describe how I belive it works below please
correct me if im wrong:
html
<input type="submit" value="This is my popup" wicket:id="btnpop" />
<a href="#" wicket:id="poplink">pop?</link>
/html
java
PopupSettings popupSettings = new PopupSettings(PageMap
.forName("popuppagemap"), PopupSettings.MENU_BAR
| PopupSettings.TOOL_BAR).setHeight(500).setWidth(500);
BookmarkablePageLink mylink;
mylink = new BookmarkablePageLink("popuplink", PopupInfo.class);
mylink.setPopupSettings(popupSettings);
mylink.setParameter("title", popTitle_omraade);
mylink.setParameter("infotext", popText_omraade);
Button openword = new Button("openword") {
protected void onSubmit() { overide code}
}
openword.add(mylink);
add(openword);
/java
-----Oprindelig meddelelse-----
Fra: [EMAIL PROTECTED] på vegne af Eelco Hillenius
Sendt: on 17-05-2006 12:05
Til: [email protected]
Cc:
Emne: Re: [Wicket-user] popup button
Hi,
You can use a Link with a PopupSpecification. And you can (or should
be able to) actually attach a link to any tag, including a button tag.
Eelco
On 5/17/06, Nino Wael <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi
>
>
>
> Was wondering if any body has an example on howto create a popup
button?
> I've looked at the triggerbutton from the datepicker extension but
that
> seems to be too complex for such a "simple" thing?
>
>
>
> I want it to run the onsubmit method on the popupbutton and after
that it
> should make a popup, I tried using a normal button and a
> BookmarkablePageLink and calling the onClick event on the latter but
as it
> is now the onClick event does notting(its also written in the
documentation
> that it only implements onclick to satisfy interfaces).
>
>
>
> Regards Nino
>
>
>
>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user