You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ismael Hasan <is...@gmail.com> on 2011/06/17 11:46:05 UTC

Clicks on "BookmarkablePageLink" opening in a new tab despite the fact that PopupSettings of the links are set to null

Hello,

I am experiencing a strange issue with BookmarkablePageLinks in both
Wicket 1.4.6 and Wicket 1.5 snapshot from April 20th.

When I first open my application, I go into page A; this page contains
a list of BookmarkablePageLink inside a PropertyListView. If I click
one of them, it opens in a new tab. Every click I do on the original
tab is reflected in the new tab. Then, if I go to page A from the new
tab, and I click some link, it does not open in a new tab (it opens in
the current tab).

The popup settings of my BookmarkablePageLink are set to null, and I
think there is anything strange in the way I create them. I will
append at the end of the message how I create this links, and info
about my application.

This issue happens with Iceweasel and Konqueror (I did not try any
more navigators). Also, this issue happens with the application being
deployed in deployment mode and in development mode. Finally, the
containers I am using to do the tests are Jetty and Tomcat 7.

Please, request any information needed to solve this issue, and thank
you in advance,

Ismael Hasan






PropertyListView containing the links:

		ListView<ResultOfListVO> listOfResults = new PropertyListView<ResultOfListVO>(
				"resultsList", results.getContents()) {
			/**
					 *
					 */
			private static final long serialVersionUID = 1L;

			@Override
			protected void populateItem(ListItem<ResultOfListVO> listItem) {
				DateLabel downloadDate = new DateLabel("date", new Model<Date>(
						listItem.getModelObject().getDownloadDate().getTime()),
						new StyleDateConverter("S-", true));
				listItem.add(downloadDate);
				listItem.add(new Label("sourceName"));
				BookmarkablePageLink link = new BookmarkablePageLink(
						"firstTitle", ShowPage.class, new PageParameters(
								"param1=show"));

				link
						.add(new Label("firstTitleText", new Model<String>("test")));
				listItem.add(link);
			}
		};

My application is defined as an extension of
AuthenticatedWebApplication. The constructor is empty and in the init
phase I do the following:

@Override
	protected void init() {
		super.init();
		getDebugSettings().setAjaxDebugModeEnabled(false);
		mountBookmarkablePage("ShowPage", ShowPage.class);		
		getApplicationSettings().setPageExpiredErrorPage(InitPage.class);
		getApplicationSettings().setInternalErrorPage(InternalErrorPage.class);
		getApplicationSettings().setAccessDeniedPage(AccessDeniedPage.class);	
	}

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


Re: Clicks on "BookmarkablePageLink" opening in a new tab despite the fact that PopupSettings of the links are set to null

Posted by Ismael Hasan <is...@gmail.com>.
Your solution indeed solved the problem.

Shame on me, I was focused on guessing why Wicket was behaving like
that and I didn't see the problem was in my html coding (I had some
legacy <a ... target="_new" ...> ).

Thank you very much for the help, Martin, and for your quick reply.

2011/6/17 Martin Grigorov <mg...@apache.org>:
> In .html: <a wicket:id="firstTitle" target="_blank">...</a>
>
> google: html anchor target
>
> On Fri, Jun 17, 2011 at 12:46 PM, Ismael Hasan
> <is...@gmail.com> wrote:
>> Hello,
>>
>> I am experiencing a strange issue with BookmarkablePageLinks in both
>> Wicket 1.4.6 and Wicket 1.5 snapshot from April 20th.
>>
>> When I first open my application, I go into page A; this page contains
>> a list of BookmarkablePageLink inside a PropertyListView. If I click
>> one of them, it opens in a new tab. Every click I do on the original
>> tab is reflected in the new tab. Then, if I go to page A from the new
>> tab, and I click some link, it does not open in a new tab (it opens in
>> the current tab).
>>
>> The popup settings of my BookmarkablePageLink are set to null, and I
>> think there is anything strange in the way I create them. I will
>> append at the end of the message how I create this links, and info
>> about my application.
>>
>> This issue happens with Iceweasel and Konqueror (I did not try any
>> more navigators). Also, this issue happens with the application being
>> deployed in deployment mode and in development mode. Finally, the
>> containers I am using to do the tests are Jetty and Tomcat 7.
>>
>> Please, request any information needed to solve this issue, and thank
>> you in advance,
>>
>> Ismael Hasan
>>
>>
>>
>>
>>
>>
>> PropertyListView containing the links:
>>
>>                ListView<ResultOfListVO> listOfResults = new PropertyListView<ResultOfListVO>(
>>                                "resultsList", results.getContents()) {
>>                        /**
>>                                         *
>>                                         */
>>                        private static final long serialVersionUID = 1L;
>>
>>                        @Override
>>                        protected void populateItem(ListItem<ResultOfListVO> listItem) {
>>                                DateLabel downloadDate = new DateLabel("date", new Model<Date>(
>>                                                listItem.getModelObject().getDownloadDate().getTime()),
>>                                                new StyleDateConverter("S-", true));
>>                                listItem.add(downloadDate);
>>                                listItem.add(new Label("sourceName"));
>>                                BookmarkablePageLink link = new BookmarkablePageLink(
>>                                                "firstTitle", ShowPage.class, new PageParameters(
>>                                                                "param1=show"));
>>
>>                                link
>>                                                .add(new Label("firstTitleText", new Model<String>("test")));
>>                                listItem.add(link);
>>                        }
>>                };
>>
>> My application is defined as an extension of
>> AuthenticatedWebApplication. The constructor is empty and in the init
>> phase I do the following:
>>
>> @Override
>>        protected void init() {
>>                super.init();
>>                getDebugSettings().setAjaxDebugModeEnabled(false);
>>                mountBookmarkablePage("ShowPage", ShowPage.class);
>>                getApplicationSettings().setPageExpiredErrorPage(InitPage.class);
>>                getApplicationSettings().setInternalErrorPage(InternalErrorPage.class);
>>                getApplicationSettings().setAccessDeniedPage(AccessDeniedPage.class);
>>        }
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>

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


Re: Clicks on "BookmarkablePageLink" opening in a new tab despite the fact that PopupSettings of the links are set to null

Posted by Martin Grigorov <mg...@apache.org>.
In .html: <a wicket:id="firstTitle" target="_blank">...</a>

google: html anchor target

On Fri, Jun 17, 2011 at 12:46 PM, Ismael Hasan
<is...@gmail.com> wrote:
> Hello,
>
> I am experiencing a strange issue with BookmarkablePageLinks in both
> Wicket 1.4.6 and Wicket 1.5 snapshot from April 20th.
>
> When I first open my application, I go into page A; this page contains
> a list of BookmarkablePageLink inside a PropertyListView. If I click
> one of them, it opens in a new tab. Every click I do on the original
> tab is reflected in the new tab. Then, if I go to page A from the new
> tab, and I click some link, it does not open in a new tab (it opens in
> the current tab).
>
> The popup settings of my BookmarkablePageLink are set to null, and I
> think there is anything strange in the way I create them. I will
> append at the end of the message how I create this links, and info
> about my application.
>
> This issue happens with Iceweasel and Konqueror (I did not try any
> more navigators). Also, this issue happens with the application being
> deployed in deployment mode and in development mode. Finally, the
> containers I am using to do the tests are Jetty and Tomcat 7.
>
> Please, request any information needed to solve this issue, and thank
> you in advance,
>
> Ismael Hasan
>
>
>
>
>
>
> PropertyListView containing the links:
>
>                ListView<ResultOfListVO> listOfResults = new PropertyListView<ResultOfListVO>(
>                                "resultsList", results.getContents()) {
>                        /**
>                                         *
>                                         */
>                        private static final long serialVersionUID = 1L;
>
>                        @Override
>                        protected void populateItem(ListItem<ResultOfListVO> listItem) {
>                                DateLabel downloadDate = new DateLabel("date", new Model<Date>(
>                                                listItem.getModelObject().getDownloadDate().getTime()),
>                                                new StyleDateConverter("S-", true));
>                                listItem.add(downloadDate);
>                                listItem.add(new Label("sourceName"));
>                                BookmarkablePageLink link = new BookmarkablePageLink(
>                                                "firstTitle", ShowPage.class, new PageParameters(
>                                                                "param1=show"));
>
>                                link
>                                                .add(new Label("firstTitleText", new Model<String>("test")));
>                                listItem.add(link);
>                        }
>                };
>
> My application is defined as an extension of
> AuthenticatedWebApplication. The constructor is empty and in the init
> phase I do the following:
>
> @Override
>        protected void init() {
>                super.init();
>                getDebugSettings().setAjaxDebugModeEnabled(false);
>                mountBookmarkablePage("ShowPage", ShowPage.class);
>                getApplicationSettings().setPageExpiredErrorPage(InitPage.class);
>                getApplicationSettings().setInternalErrorPage(InternalErrorPage.class);
>                getApplicationSettings().setAccessDeniedPage(AccessDeniedPage.class);
>        }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



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