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
PageParameters p = new PageParameters("targetId", textField.getMarkupId());
add(new BookmarkablePageLink("popupLink", MyPopup.class,

And then your popup has:

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


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

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

and have

public MyPopup(String targetId) {

Hope this helps,


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's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
Wicket-user mailing list

Reply via email to