For clarity, you could ask your component for it's markup id when it
is rendering like this: textField.getMarkupId();

So, it could look like this:

PopupSettings popupSettings = new
PopupSettings(PageMap.forName("popuppagemap")).setHeight(
                500).setWidth(500);
PageParameters p = new PageParameters("targetId", textField.getMarkupId());
add(new BookmarkablePageLink("popupLink", MyPopup.class,
p).setPopupSettings(popupSettings));


And then your popup has:

public MyPopup(PageParameters p) {
  String targetId = p.getString("targetId");
  ...

etc.

Or... instead of a bookmarkable page you could use:

final String targetId = textField.getMarkupId();
add(new Link("popupLink"){
  onClick() {
    setResponsePage(new MyPopup(targetId));
  }
}.setPopupSettings(popupSettings));

and have

public MyPopup(String targetId) {
  ...


Hope this helps,

Eelco


On 7/24/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> you have to do this using javascript.
>
> call setoutputmarkupid(true) on the textfield and pass this id into the
> popup page, then have the popup page output this javascript when you want to
> set the value:
>
> window.opener.document.getElementById (id).value='foo';

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to