Re: Resource Path

2013-05-01 Thread Martin Grigorov
HI,


On Thu, May 2, 2013 at 1:55 AM, Hemen  wrote:

> I have an image that I access by using the following code:
>
> String fullUrl = (String) "/" + RequestCycle.get().mapUrlFor(new
> PackageResourceReference(Anchor.class, LOGO_NAME), pp).toString();
>

The code above creates context-absolute url.

I'd suggest to rework it to:
String relativeUrl = urlFor(new PackageResourceReference(Anchor.class,
LOGO_NAME), pp);
String fullUrl =
requestCycle.getUrlRenderer().renderFullUrl(Url.parse(relativeUrl));

But usage of full url is not recommended when your application runs behind
proxy server.


>
> Logo path on my dev ==>
> http://host-name/wicket/resource/package.Name.ClassName/logo.png
> Resource Path on Test ==>
> http://host-name/app-ame/wicket/resource/package.Name.ClassName/logo.png
>
> The logo get displayed on my dev but when deployed on test, it appends the
> /app-name/ and wicket fails to find it.
>
> Here is the build config inside pom.xml for the project
>
> 
> app-name
> 
> 
> src/main/resources
> 
> 
> src/main/java
> 
> **
> 
> 
> **/*.java
> 
> 
> 
>
> How can I correct this?
>
> Thank you
>
> Hemen
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Resource-Path-tp4658459.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


RE: Page's Mounted URL

2013-05-01 Thread Colin Rogers
Ignore my last email - I was being dumb!

"[wicket 6] Any shortcut to get full url ?" does have my answer...! Doh! Sorry! 
:)

-Original Message-
From: Bertrand Guay-Paquet [mailto:ber...@step.polymtl.ca]
Sent: 02 May 2013 15:17
To: users@wicket.apache.org
Subject: Re: Page's Mounted URL

Have a look at RequestUtils#toAbsolutePath().

Also, look at the email on this mailing list preceding yours titled "[wicket 6] 
Any shortcut to get full url ?" :)

On 02/05/2013 1:06 AM, Colin Rogers wrote:
> Wicketeers,
>
> Where I have;
>
> mountPage( "path/to/myPage", MyPersonalPage.class ); mountPage(
> "different/path/customPage", AnotherCustomPage.class );
>
> I now have a Page class (i.e. MyPersonalPage) - how can I determine the 
> mountPage String (i.e "path/to/myPage") ?
>
> I'm sure this should be simple, but I can't find anything. Methods like 
> urlFor() only work in relation to the current context/request, as far as I 
> can see. You can't override mountPage - as its final - either in order to 
> keep a simple store.
>
> Cheers,
> Col.
>
>
>
> EMAIL DISCLAIMER This email message and its attachments are confidential and 
> may also contain copyright or privileged material. If you are not the 
> intended recipient, you may not forward the email or disclose or use the 
> information contained in it. If you have received this email message in 
> error, please advise the sender immediately by replying to this email and 
> delete the message and any associated attachments. Any views, opinions, 
> conclusions, advice or statements expressed in this email message are those 
> of the individual sender and should not be relied upon as the considered 
> view, opinion, conclusions, advice or statement of this company except where 
> the sender expressly, and with authority, states them to be the considered 
> view, opinion, conclusions, advice or statement of this company. Every care 
> is taken but we recommend that you scan any attachments for viruses.
>


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

EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

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



RE: Page's Mounted URL

2013-05-01 Thread Colin Rogers
I did! But as I said - urlFor() only deals in relative paths.

So if I'm on page X and ask for the path of X I always get "./" which isn't 
useful for determining anything! :)

(and using getUrl() of the request gives me the ajax URL for the link I just 
requested - " ?2-3.ILinkListener-settings-myLink")

-Original Message-
From: Bertrand Guay-Paquet [mailto:ber...@step.polymtl.ca]
Sent: 02 May 2013 15:17
To: users@wicket.apache.org
Subject: Re: Page's Mounted URL

Have a look at RequestUtils#toAbsolutePath().

Also, look at the email on this mailing list preceding yours titled "[wicket 6] 
Any shortcut to get full url ?" :)

On 02/05/2013 1:06 AM, Colin Rogers wrote:
> Wicketeers,
>
> Where I have;
>
> mountPage( "path/to/myPage", MyPersonalPage.class ); mountPage(
> "different/path/customPage", AnotherCustomPage.class );
>
> I now have a Page class (i.e. MyPersonalPage) - how can I determine the 
> mountPage String (i.e "path/to/myPage") ?
>
> I'm sure this should be simple, but I can't find anything. Methods like 
> urlFor() only work in relation to the current context/request, as far as I 
> can see. You can't override mountPage - as its final - either in order to 
> keep a simple store.
>
> Cheers,
> Col.
>
>
>
> EMAIL DISCLAIMER This email message and its attachments are confidential and 
> may also contain copyright or privileged material. If you are not the 
> intended recipient, you may not forward the email or disclose or use the 
> information contained in it. If you have received this email message in 
> error, please advise the sender immediately by replying to this email and 
> delete the message and any associated attachments. Any views, opinions, 
> conclusions, advice or statements expressed in this email message are those 
> of the individual sender and should not be relied upon as the considered 
> view, opinion, conclusions, advice or statement of this company except where 
> the sender expressly, and with authority, states them to be the considered 
> view, opinion, conclusions, advice or statement of this company. Every care 
> is taken but we recommend that you scan any attachments for viruses.
>


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

EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

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



Re: Page's Mounted URL

2013-05-01 Thread Bertrand Guay-Paquet

Have a look at RequestUtils#toAbsolutePath().

Also, look at the email on this mailing list preceding yours titled 
"[wicket 6] Any shortcut to get full url ?" :)


On 02/05/2013 1:06 AM, Colin Rogers wrote:

Wicketeers,

Where I have;

mountPage( "path/to/myPage", MyPersonalPage.class );
mountPage( "different/path/customPage", AnotherCustomPage.class );

I now have a Page class (i.e. MyPersonalPage) - how can I determine the mountPage String 
(i.e "path/to/myPage") ?

I'm sure this should be simple, but I can't find anything. Methods like 
urlFor() only work in relation to the current context/request, as far as I can 
see. You can't override mountPage - as its final - either in order to keep a 
simple store.

Cheers,
Col.



EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.




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



Page's Mounted URL

2013-05-01 Thread Colin Rogers
Wicketeers,

Where I have;

mountPage( "path/to/myPage", MyPersonalPage.class );
mountPage( "different/path/customPage", AnotherCustomPage.class );

I now have a Page class (i.e. MyPersonalPage) - how can I determine the 
mountPage String (i.e "path/to/myPage") ?

I'm sure this should be simple, but I can't find anything. Methods like 
urlFor() only work in relation to the current context/request, as far as I can 
see. You can't override mountPage - as its final - either in order to keep a 
simple store.

Cheers,
Col.



EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.


Re: [wicket 6] Any shortcut to get full url ?

2013-05-01 Thread Don Ferguson
I'm using something like the following (in 6.7.0):

String url2 = RequestCycle.get().getUrlRenderer()
.renderFullUrl( Url.parse(urlFor(Page.class, newPps).toString()));




On Wednesday, May 1, 2013 at 9:26 PM, Bertrand Guay-Paquet wrote:

> Hi,
> 
> On 01/05/2013 10:57 PM, smallufo wrote:
> > String url2 = RequestUtils.toAbsolutePath(urlFor(Page.class ,
> > newPps).toString() , "");
> > System.out.println("url2 = " + url2); // full in 1.4 , but relative in 6.0
> > 
> 
> The Javadoc says "Calculates absolute path to url relative to another 
> absolute url." so that's expected.
> > It means , if I need to get full url (including host / context-path) , I
> > have to write :
> > *String fullUrl =
> > getRequestCycle().getUrlRenderer().renderFullUrl(Url.parse(getRequestCycle().urlFor(new
> > RenderPageRequestHandler(new PageProvider(Page.class , newPps);*
> > 
> > It is so lengthy and cumbersome . Is there any shortcut for this ?
> That's what I use, but I wrapped it in a public static util method 
> somewhere...
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
> (mailto:users-unsubscr...@wicket.apache.org)
> For additional commands, e-mail: users-h...@wicket.apache.org 
> (mailto:users-h...@wicket.apache.org)
> 
> 




Re: [wicket 6] Any shortcut to get full url ?

2013-05-01 Thread Bertrand Guay-Paquet

Hi,

On 01/05/2013 10:57 PM, smallufo wrote:

String url2 = RequestUtils.toAbsolutePath(urlFor(Page.class ,
newPps).toString() , "");
System.out.println("url2 = " + url2); // full in 1.4 , but relative in 6.0
The Javadoc says "Calculates absolute path to url relative to another 
absolute url." so that's expected.

It means , if I need to get full url (including host / context-path) , I
have to write :
*String fullUrl =
getRequestCycle().getUrlRenderer().renderFullUrl(Url.parse(getRequestCycle().urlFor(new
RenderPageRequestHandler(new PageProvider(Page.class , newPps);*

It is so lengthy and cumbersome . Is there any shortcut for this ?
That's what I use, but I wrapped it in a public static util method 
somewhere...


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



Re: even issue switching from development to deployment mode

2013-05-01 Thread Bertrand Guay-Paquet

Hi,

I believe Wicket uses a minified version of jQuery in deployment. Maybe 
this causes problems with that library?


Otherwise, check all callers to Application#usesDevelopmentConfig() and 
replace them one by one to the deployment value until you get the same 
error.


On 01/05/2013 1:59 PM, saty wrote:

I am using JQuery multi select by Eric Hynds in my current wicket application
in few places.
http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/

This works great in a Wicket application (using ListMultipleChoice) in
wicket development mode,  but when i change wicket mode to deployment
surprisingly the onclose even (close multiselect) does not get fired, the
onchange event (when you select/deselect) continue to work, no issues with
that.

Any thoughts on what might be going on here and how to fix this problem,
within Wicket.

Appreciate your help.

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/even-issue-switching-from-development-to-deployment-mode-tp4658450.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: event firing issue switching from development to deployment mode

2013-05-01 Thread saty
Any thoughts on this please, what is different in wicket between deployment
and development mode that could have caused this problem.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/event-firing-issue-switching-from-development-to-deployment-mode-tp4658450p4658461.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Resource Path

2013-05-01 Thread Hemen
I have an image that I access by using the following code:

String fullUrl = (String) "/" + RequestCycle.get().mapUrlFor(new
PackageResourceReference(Anchor.class, LOGO_NAME), pp).toString();

Logo path on my dev ==>
http://host-name/wicket/resource/package.Name.ClassName/logo.png
Resource Path on Test ==>
http://host-name/app-ame/wicket/resource/package.Name.ClassName/logo.png

The logo get displayed on my dev but when deployed on test, it appends the
/app-name/ and wicket fails to find it. 

Here is the build config inside pom.xml for the project 


app-name


src/main/resources


src/main/java

**


**/*.java




How can I correct this? 

Thank you

Hemen



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Resource-Path-tp4658459.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket-Bootstrap error when deploying to JBoss AS 7

2013-05-01 Thread Martin Grigorov
https://code.google.com/p/reflections/wiki/JBossIntegration


On Wed, May 1, 2013 at 9:24 PM, David Beer  wrote:

> Hi All
>
> I have a web project which uses Wicket-Bootstrap for styling and various
> other functions. Everything appears to run fine in Tomcat, but I am
> starting to add more Java EE stuff and looking at using JBoss As 7. I can
> deploy a normal wicket Quickstart with out errors but when I try and deploy
> a project with Bootstrap added I get the following error:
>
> 20:16:04,296 INFO  [org.jboss.as.server.**deployment] (MSC service thread
> 1-4) JBAS015876: Starting deployment of "Wicket-Bootstrap-DataTable-1.**
> 0-SNAPSHOT.war"
> 20:16:06,002 INFO  [org.apache.wicket.util.file.**WebXmlFile] (MSC
> service thread 1-3) web.xml: url mapping found for filter with name
> wicket.Wicket-Bootstrap-**DataTable: [/*]
> 20:16:06,185 INFO  [org.apache.wicket.**Application] (MSC service thread
> 1-3) [wicket.Wicket-Bootstrap-**DataTable] init: Wicket core library
> initializer
> 20:16:06,193 INFO  [org.apache.wicket.**RequestListenerInterface] (MSC
> service thread 1-3) registered listener interface [RequestListenerInterface
> name=IBehaviorListener, method=public abstract void
> org.apache.wicket.behavior.**IBehaviorListener.onRequest()]
> 20:16:06,195 INFO  [org.apache.wicket.**RequestListenerInterface] (MSC
> service thread 1-3) registered listener interface [RequestListenerInterface
> name=IFormSubmitListener, method=public abstract void
> org.apache.wicket.markup.html.**form.IFormSubmitListener.**
> onFormSubmitted()]
> 20:16:06,198 INFO  [org.apache.wicket.**RequestListenerInterface] (MSC
> service thread 1-3) registered listener interface [RequestListenerInterface
> name=ILinkListener, method=public abstract void
> org.apache.wicket.markup.html.**link.ILinkListener.**onLinkClicked()]
> 20:16:06,201 INFO  [org.apache.wicket.**RequestListenerInterface] (MSC
> service thread 1-3) registered listener interface [RequestListenerInterface
> name=IOnChangeListener, method=public abstract void
> org.apache.wicket.markup.html.**form.IOnChangeListener.**
> onSelectionChanged()]
> 20:16:06,213 INFO  [org.apache.wicket.**RequestListenerInterface] (MSC
> service thread 1-3) registered listener interface [RequestListenerInterface
> name=IRedirectListener, method=public abstract void org.apache.wicket.**
> IRedirectListener.onRedirect()**]
> 20:16:06,215 INFO  [org.apache.wicket.**RequestListenerInterface] (MSC
> service thread 1-3) registered listener interface [RequestListenerInterface
> name=IResourceListener, method=public abstract void org.apache.wicket.**
> IResourceListener.**onResourceRequested()]
> 20:16:06,216 INFO  [org.apache.wicket.**Application] (MSC service thread
> 1-3) [wicket.Wicket-Bootstrap-**DataTable] init: Wicket extensions
> initializer
> 20:16:06,379 ERROR [org.reflections.Reflections] (MSC service thread 1-3)
> could not create Vfs.Dir from url. ignoring the exception and continuing:
> org.reflections.**ReflectionsException: could not create Vfs.Dir from
> url, no matching UrlType was found [vfs:/content/Wicket-**
> Bootstrap-DataTable-1.0-**SNAPSHOT.war/WEB-INF/lib/**jquery-1.9.0.jar/]
> either use fromURL(final URL url, final List urlTypes) or use the
> static setDefaultURLTypes(final List urlTypes) or
> addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
> at org.reflections.vfs.Vfs.**fromURL(Vfs.java:108)
> [reflections-0.9.8.jar:]
> at org.reflections.vfs.Vfs.**fromURL(Vfs.java:90)
> [reflections-0.9.8.jar:]
> at org.reflections.Reflections.**scan(Reflections.java:165)
> [reflections-0.9.8.jar:]
> at org.reflections.Reflections.<**init>(Reflections.java:94)
> [reflections-0.9.8.jar:]
> at de.agilecoders.wicket.webjars.**util.RecentVersionCallable.**
> collectRecentVersionFor(**RecentVersionCallable.java:72)
> [wicket-webjars-0.2.0.jar:]
> at de.agilecoders.wicket.webjars.**util.RecentVersionCallable.**
> call(RecentVersionCallable.**java:62) [wicket-webjars-0.2.0.jar:]
> at de.agilecoders.wicket.webjars.**util.RecentVersionCallable.**
> call(RecentVersionCallable.**java:25) [wicket-webjars-0.2.0.jar:]
> at java.util.concurrent.**FutureTask$Sync.innerRun(**FutureTask.java:334)
> [rt.jar:1.7.0_21]
> at java.util.concurrent.**FutureTask.run(FutureTask.**java:166)
> [rt.jar:1.7.0_21]
> at de.agilecoders.wicket.webjars.**util.WebjarsVersion.**
> recentVersion(WebjarsVersion.**java:50) [wicket-webjars-0.2.0.jar:]
> at 
> de.agilecoders.wicket.webjars.**util.WebjarsVersion.useRecent(**WebjarsVersion.java:32)
> [wicket-webjars-0.2.0.jar:]
> at de.agilecoders.wicket.webjars.**request.resource.**
> WebjarsJavaScriptResourceRefer**ence.(**
> WebjarsJavaScriptResourceRefer**ence.java:28) [wicket-webjars-0.2.0.jar:]
> at de.agilecoders.wicket.markup.**html.references.**
> BootstrapJavaScriptReference.<**init>(**BootstrapJavaScriptReference.**java:38)
> [wicket-bootstrap-core-0.8.1.**jar:]
> at de.agilecoders.wicket.markup

RE: What's a simple substitute for CancelEventIfNoAjaxDecorator in Wicket 6.x

2013-05-01 Thread Paul Bors
I think I can drop my own class too since I found:
org.apache.wicket.extensions.ajax.markup.html.repeater.data.sort.AjaxFallbackOrderByBorder

I'll extend from that one and change the behavior I need :)

~ Thank you!
  Paul Bors

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Wednesday, May 01, 2013 5:30 PM
To: users@wicket.apache.org
Subject: Re: What's a simple substitute for CancelEventIfNoAjaxDecorator in 
Wicket 6.x

Hi,

Just drop it. No need of it anymore.


On Wed, May 1, 2013 at 11:23 PM, Paul Bors  wrote:

>
>
> I'm migrating from 5.x to 6.x and I have a few classes that make use 
> of the older IAjaxCallDecorator and I was wondering what's a simple 
> substitution for code like this:
>
>
>
> add(new AjaxEventBehavior("onclick") {
>
>   protected void onEvent(AjaxRequestTarget target) {
>
> ISortState state = stateLocator.getSortState();
>
>   if (!defaultSortAsc && state.getPropertySortOrder(property) == 
> SortOrder.NONE ) {
>
> state.setPropertySortOrder(property, SortOrder.ASCENDING);
>
>   }
>
>   onClick();
>
>   onAjaxClick(target);
>
>   }
>
>   protected IAjaxCallDecorator getAjaxCallDecorator() {
>
> return new CancelEventIfNoAjaxDecorator(decorator);
>
>   }
>
> });
>
>
>
> I have this for my own AjaxFallbackOrderByBorder I use for the 
> sortable headers in most of the table.
>
>
>
> ~ Thank you in advance,
>
> Paul Bors
>
>


--
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


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



Re: What's a simple substitute for CancelEventIfNoAjaxDecorator in Wicket 6.x

2013-05-01 Thread Martin Grigorov
Hi,

Just drop it. No need of it anymore.


On Wed, May 1, 2013 at 11:23 PM, Paul Bors  wrote:

>
>
> I'm migrating from 5.x to 6.x and I have a few classes that make use of the
> older IAjaxCallDecorator and I was wondering what's a simple substitution
> for code like this:
>
>
>
> add(new AjaxEventBehavior("onclick") {
>
>   protected void onEvent(AjaxRequestTarget target) {
>
> ISortState state = stateLocator.getSortState();
>
>   if (!defaultSortAsc && state.getPropertySortOrder(property) ==
> SortOrder.NONE ) {
>
> state.setPropertySortOrder(property, SortOrder.ASCENDING);
>
>   }
>
>   onClick();
>
>   onAjaxClick(target);
>
>   }
>
>   protected IAjaxCallDecorator getAjaxCallDecorator() {
>
> return new CancelEventIfNoAjaxDecorator(decorator);
>
>   }
>
> });
>
>
>
> I have this for my own AjaxFallbackOrderByBorder I use for the sortable
> headers in most of the table.
>
>
>
> ~ Thank you in advance,
>
> Paul Bors
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


What's a simple substitute for CancelEventIfNoAjaxDecorator in Wicket 6.x

2013-05-01 Thread Paul Bors
 

I'm migrating from 5.x to 6.x and I have a few classes that make use of the
older IAjaxCallDecorator and I was wondering what's a simple substitution
for code like this:

 

add(new AjaxEventBehavior("onclick") {

  protected void onEvent(AjaxRequestTarget target) {

ISortState state = stateLocator.getSortState();

  if (!defaultSortAsc && state.getPropertySortOrder(property) ==
SortOrder.NONE ) {

state.setPropertySortOrder(property, SortOrder.ASCENDING);

  }

  onClick();

  onAjaxClick(target);

  }

  protected IAjaxCallDecorator getAjaxCallDecorator() {

return new CancelEventIfNoAjaxDecorator(decorator);

  }

});

 

I have this for my own AjaxFallbackOrderByBorder I use for the sortable
headers in most of the table.

 

~ Thank you in advance,

Paul Bors



Re: Saving checked choices from CheckGroup

2013-05-01 Thread Paul Bors
Create a QuickStart and share it with us.

~ Thank you,
   Paul Bors

On Tue, Apr 30, 2013 at 7:17 AM, Merlijn  wrote:

> Nope, added in the code. This is my code
>
>  public QuickSearchFilterPanel(String id) {
> super(id);
> Form form = new Form("filterform");
>
> List> classes = resultItemHandlerPool.getTypes();
> types = new ArrayList>>();
>
> if (classes != null) {
> for (final Class clazz : classes) {
> IModel> model = new IModel>() {
> @Override
> public Class getObject() {
> return clazz;
> }
>
> @Override
> public void setObject(Class object) {
>
> }
>
> @Override
> public void detach() {
>
> }
> };
>
> types.add(model);
> }
> }
>
> group = new CheckGroup>>("checkboxgroup", new
> PropertyModel>>>(this, "types"));
> group.add(new CheckGroupSelector("checkall"));
>
> ListView typesListview = new
> ListView>>("typesList", new
> PropertyModel>>>(this, "types")) {
> @Override
> protected void populateItem(final
> ListItem>> item) {
> final IModel> classModel =
> item.getModelObject();
> Check checkbox = new Check>("check",
> classModel);
> Label className = new Label("className",
> classModel.getObject().getSimpleName());
> item.add(checkbox, className);
> }
> };
> typesListview.setReuseItems(true);
> group.add(typesListview);
> form.add(group);
>
> Button saveButton = new Button("saveButton") {
> @Override
> public void onSubmit() {
> super.onSubmit();
> }
> };
> form.add(saveButton);
> add(form);
> }
>
> public List> getSearchableTypes() {
> List> searchableTypes = new ArrayList>();
>
> for (IModel> type : types) {
> searchableTypes.add(type.getObject());
> }
> return searchableTypes;
>
> }
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Saving-checked-choices-from-CheckGroup-tp4658408p4658411.html
>  Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Disabling Individual Checkboxes in CheckGroup

2013-05-01 Thread Paul Bors
See the examples for form input and the use of CheckGroup:
http://www.wicket-library.com/wicket-examples/forminput

If you want to "uncheck" or "check" one of your component, either insert or
remove from your collection the element you want checked or not.

~ Thank you,
   Paul Bors
PS: If by now you haven't put together a quick start for yourself to
understand how CheckGroup works in Wicket, then I suggest you do so.
On Mon, Apr 29, 2013 at 3:17 PM, Sven Meier  wrote:

> 1.4.7 ... that's really old :/.
>
> Sven
>
>
> On 04/29/2013 09:13 PM, eugenebalt wrote:
>
>> Thanks Sven. We don't have the below methods. We are using Wicket 1.4.7,
>> probably time to upgrade.
>>
>> ListView#newItem(int, IModel)
>> see Component#onConfigure()
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://apache-wicket.1842946.**
>> n4.nabble.com/Disabling-**Individual-Checkboxes-in-**
>> CheckGroup-tp4658165p4658395.**html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> --**--**-
>> To unsubscribe, e-mail: 
>> users-unsubscribe@wicket.**apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: file listing in the browser

2013-05-01 Thread Paul Bors
No one replie to you because this has nothing to do with Wicket.

You might want to get familiar with Java's File IO:
http://docs.oracle.com/javase/tutorial/essential/io/walk.html

Once you get to iterate over your folder you may choose to show that in
Wicket via a repeater or a data table etc.
For that you can look up the Wicket examples at:
http://www.wicket-library.com/wicket-examples/ajax/tree/simple;jsessionid=E02464D70A1FD689C3E20641746C002E?0

Good luck!

~ Thank you,
Paul Bors

On Mon, Apr 29, 2013 at 2:22 PM, pen  wrote:

> Hi,
> I am using wicket 1.5.
> I would like to know how to implement, given a directory (/tmp/backup/)
> list
> all the files from that directory in the browser. I have a bunch of csv
> files .
> I want to navigate to the page backup.html in the browse and list all the
> files from that directory. All these running in tomcat.
>
> Thanks
> Pen
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/file-listing-in-the-browser-tp4658393.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Wicket-Bootstrap error when deploying to JBoss AS 7

2013-05-01 Thread David Beer

Hi All

I have a web project which uses Wicket-Bootstrap for styling and various 
other functions. Everything appears to run fine in Tomcat, but I am 
starting to add more Java EE stuff and looking at using JBoss As 7. I 
can deploy a normal wicket Quickstart with out errors but when I try and 
deploy a project with Bootstrap added I get the following error:


20:16:04,296 INFO  [org.jboss.as.server.deployment] (MSC service thread 
1-4) JBAS015876: Starting deployment of 
"Wicket-Bootstrap-DataTable-1.0-SNAPSHOT.war"
20:16:06,002 INFO  [org.apache.wicket.util.file.WebXmlFile] (MSC service 
thread 1-3) web.xml: url mapping found for filter with name 
wicket.Wicket-Bootstrap-DataTable: [/*]
20:16:06,185 INFO  [org.apache.wicket.Application] (MSC service thread 
1-3) [wicket.Wicket-Bootstrap-DataTable] init: Wicket core library 
initializer
20:16:06,193 INFO  [org.apache.wicket.RequestListenerInterface] (MSC 
service thread 1-3) registered listener interface 
[RequestListenerInterface name=IBehaviorListener, method=public abstract 
void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
20:16:06,195 INFO  [org.apache.wicket.RequestListenerInterface] (MSC 
service thread 1-3) registered listener interface 
[RequestListenerInterface name=IFormSubmitListener, method=public 
abstract void 
org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
20:16:06,198 INFO  [org.apache.wicket.RequestListenerInterface] (MSC 
service thread 1-3) registered listener interface 
[RequestListenerInterface name=ILinkListener, method=public abstract 
void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
20:16:06,201 INFO  [org.apache.wicket.RequestListenerInterface] (MSC 
service thread 1-3) registered listener interface 
[RequestListenerInterface name=IOnChangeListener, method=public abstract 
void 
org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()]
20:16:06,213 INFO  [org.apache.wicket.RequestListenerInterface] (MSC 
service thread 1-3) registered listener interface 
[RequestListenerInterface name=IRedirectListener, method=public abstract 
void org.apache.wicket.IRedirectListener.onRedirect()]
20:16:06,215 INFO  [org.apache.wicket.RequestListenerInterface] (MSC 
service thread 1-3) registered listener interface 
[RequestListenerInterface name=IResourceListener, method=public abstract 
void org.apache.wicket.IResourceListener.onResourceRequested()]
20:16:06,216 INFO  [org.apache.wicket.Application] (MSC service thread 
1-3) [wicket.Wicket-Bootstrap-DataTable] init: Wicket extensions initializer
20:16:06,379 ERROR [org.reflections.Reflections] (MSC service thread 
1-3) could not create Vfs.Dir from url. ignoring the exception and 
continuing: org.reflections.ReflectionsException: could not create 
Vfs.Dir from url, no matching UrlType was found 
[vfs:/content/Wicket-Bootstrap-DataTable-1.0-SNAPSHOT.war/WEB-INF/lib/jquery-1.9.0.jar/]
either use fromURL(final URL url, final List urlTypes) or use 
the static setDefaultURLTypes(final List urlTypes) or 
addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
at org.reflections.vfs.Vfs.fromURL(Vfs.java:108) 
[reflections-0.9.8.jar:]
at org.reflections.vfs.Vfs.fromURL(Vfs.java:90) 
[reflections-0.9.8.jar:]
at org.reflections.Reflections.scan(Reflections.java:165) 
[reflections-0.9.8.jar:]
at org.reflections.Reflections.(Reflections.java:94) 
[reflections-0.9.8.jar:]
at 
de.agilecoders.wicket.webjars.util.RecentVersionCallable.collectRecentVersionFor(RecentVersionCallable.java:72) 
[wicket-webjars-0.2.0.jar:]
at 
de.agilecoders.wicket.webjars.util.RecentVersionCallable.call(RecentVersionCallable.java:62) 
[wicket-webjars-0.2.0.jar:]
at 
de.agilecoders.wicket.webjars.util.RecentVersionCallable.call(RecentVersionCallable.java:25) 
[wicket-webjars-0.2.0.jar:]
at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 
[rt.jar:1.7.0_21]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) 
[rt.jar:1.7.0_21]
at 
de.agilecoders.wicket.webjars.util.WebjarsVersion.recentVersion(WebjarsVersion.java:50) 
[wicket-webjars-0.2.0.jar:]
at 
de.agilecoders.wicket.webjars.util.WebjarsVersion.useRecent(WebjarsVersion.java:32) 
[wicket-webjars-0.2.0.jar:]
at 
de.agilecoders.wicket.webjars.request.resource.WebjarsJavaScriptResourceReference.(WebjarsJavaScriptResourceReference.java:28) 
[wicket-webjars-0.2.0.jar:]
at 
de.agilecoders.wicket.markup.html.references.BootstrapJavaScriptReference.(BootstrapJavaScriptReference.java:38) 
[wicket-bootstrap-core-0.8.1.jar:]
at 
de.agilecoders.wicket.markup.html.references.BootstrapJavaScriptReference.(BootstrapJavaScriptReference.java:21) 
[wicket-bootstrap-core-0.8.1.jar:]
at 
de.agilecoders.wicket.settings.BootstrapSettings.(BootstrapSettings.java:15) 
[wicket-bootstrap-core-0.8.1.jar:]
at 
com.copperarrow.example.wicket.bootstrap.datatable.WicketApplication.init(WicketApplication.java:32) 
[classes:]
at 

even issue switching from development to deployment mode

2013-05-01 Thread saty
I am using JQuery multi select by Eric Hynds in my current wicket application
in few places.
http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/

This works great in a Wicket application (using ListMultipleChoice) in
wicket development mode,  but when i change wicket mode to deployment
surprisingly the onclose even (close multiselect) does not get fired, the
onchange event (when you select/deselect) continue to work, no issues with
that.

Any thoughts on what might be going on here and how to fix this problem,
within Wicket.

Appreciate your help.

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/even-issue-switching-from-development-to-deployment-mode-tp4658450.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to get rid of -ver-blah-blah-blah.gif versioning ?

2013-05-01 Thread Bertrand Guay-Paquet

The link at the bottom of the given wiki page has:

To disable caching altogether (e.g. for performance comparisons) use

getResourceSettings().setCachingStrategy(NoOpResourceCachingStrategy.INSTANCE)



On 01/05/2013 1:05 PM, smallufo wrote:

Hi
thanks.
But it doesn't mention how to turn off the -ver-blah-blah-blah string.
I just want a general "xxx.png" , not
"xxx-ver-7E49549BCE322EACE0C8F26B4CD553C5.png"




2013/5/2 Martin Grigorov 


Hi,

Check https://cwiki.apache.org/WICKET/caching-in-wicket-15.html


On Wed, May 1, 2013 at 6:36 PM, smallufo  wrote:


I am upgrading from 1.4 to 6.7
Is the random string appended used for anti-caching or object versioning

?

I try to redeploy and the appended string is identical !?

Now I am stuck by how to get rid of image/resource versioning , and

enable

caching ...
I use general Image ,
or override shouldAddAntiCacheParameter (return false)
But I still cannot get rid of the versioning string...

Anyway to disable that ?

One more question

How to enable caching and disable versioning string for this img ?
(there is no wicket:id assigned)




--
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 




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



Re: How to get rid of -ver-blah-blah-blah.gif versioning ?

2013-05-01 Thread smallufo
Hi
thanks.
But it doesn't mention how to turn off the -ver-blah-blah-blah string.
I just want a general "xxx.png" , not
"xxx-ver-7E49549BCE322EACE0C8F26B4CD553C5.png"




2013/5/2 Martin Grigorov 

> Hi,
>
> Check https://cwiki.apache.org/WICKET/caching-in-wicket-15.html
>
>
> On Wed, May 1, 2013 at 6:36 PM, smallufo  wrote:
>
> > I am upgrading from 1.4 to 6.7
> > Is the random string appended used for anti-caching or object versioning
> ?
> > I try to redeploy and the appended string is identical !?
> >
> > Now I am stuck by how to get rid of image/resource versioning , and
> enable
> > caching ...
> > I use general Image ,
> > or override shouldAddAntiCacheParameter (return false)
> > But I still cannot get rid of the versioning string...
> >
> > Anyway to disable that ?
> >
> > One more question
> > 
> > How to enable caching and disable versioning string for this img ?
> > (there is no wicket:id assigned)
> >
>
>
>
> --
> Martin Grigorov
> Wicket Training & Consulting
> http://jWeekend.com 
>


Re: How to get rid of -ver-blah-blah-blah.gif versioning ?

2013-05-01 Thread Martin Grigorov
Hi,

Check https://cwiki.apache.org/WICKET/caching-in-wicket-15.html


On Wed, May 1, 2013 at 6:36 PM, smallufo  wrote:

> I am upgrading from 1.4 to 6.7
> Is the random string appended used for anti-caching or object versioning ?
> I try to redeploy and the appended string is identical !?
>
> Now I am stuck by how to get rid of image/resource versioning , and enable
> caching ...
> I use general Image ,
> or override shouldAddAntiCacheParameter (return false)
> But I still cannot get rid of the versioning string...
>
> Anyway to disable that ?
>
> One more question
> 
> How to enable caching and disable versioning string for this img ?
> (there is no wicket:id assigned)
>



-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com 


Re: Question regarding exceptions in Apache Wicket

2013-05-01 Thread Igor Vaynberg
how is this different than handling an exception that comes from say javax.mail?

-igor

On Wed, May 1, 2013 at 2:48 AM, Behrooz Nobakht  wrote:
> Thanks for the reply.
>
> The purpose is that when it's determined that exception comes from Wicket,
> the error page (1) can reduce the cause chain (which can be independent of
> Apache Wicket of course), and (2) based on this information provide the
> user to report a bug or email the stack trace to a set of stack holders.
> That's why I was thinking using "instanceof" as less as possible is more
> preferred and indeed cleaner instead of checking "package names".
>
> I generally agree that this could be done independent of how Apache Wicket
> exceptions are designed and it's more categorized in the "convenience"
> zone.
>
>
> On Wed, May 1, 2013 at 11:06 AM, Igor Vaynberg wrote:
>
>> On Wed, May 1, 2013 at 1:23 AM, Behrooz Nobakht  wrote:
>> > More clearly, the intention is to be able to distinguish exceptions from
>> > Apache Wicket and other frameworks and not really handle them.
>>
>> for what purpose? an unhandled exception is an unhandled exception...
>>
>> > For
>> > instance, there can be two exceptions: MarkupException and
>> > CouldNotLockPageException. Both are in the context of Apache Wicket,
>> > however, we actually need to "two" checks to determine either. If they
>> > inherited a common parent class, it needed "one" check.
>> >
>> > I do not want to say that Apache Wicket should have done this. I first
>> want
>> > to understand why this design decision has been made.
>>
>> because we could not come up with a good usecase for having a common
>> parent. in any case there would have to be two parents - one for
>> checked and one for unchecked exceptins. which means that both would
>> have to implement some kind of a tagging interface to allow a single
>> instanceof check. but without a valid usecase why do this?
>>
>> if you really want to know you can see if the exception class lives in
>> the org.apache.wicket.* package, and if it does its a wicket
>> exception.
>>
>> -igor
>>
>>
>> >
>> >
>> >
>> >
>> > On Wed, May 1, 2013 at 10:04 AM, Igor Vaynberg > >wrote:
>> >
>> >> what is the purpose of knowing whether an exception is a wicket
>> >> exception or something from further down the stack?
>> >>
>> >> eg how would you handle a runtime exception that came from within
>> >> java.lang.String differently then the one that came from Wicket or the
>> >> one that came from the servlet api?
>> >>
>> >> -igor
>> >>
>> >> On Wed, May 1, 2013 at 12:23 AM, Behrooz Nobakht 
>> wrote:
>> >> > Hello,
>> >> >
>> >> > I've been working on an error page in Apache Wicket and came across a
>> >> > general pattern in Apache Wicket and I'd like to understand the reason
>> >> for
>> >> > it.
>> >> >
>> >> > Exceptions in Apache Wicket do not have a single class hierarchy; i.e.
>> >> > there are exceptions that eventually extend "WicketRuntimeException"
>> but
>> >> > they are also many others that start either from "RuntimeException" or
>> >> > "Exception". I could guess for the reasons for "checked" exceptions
>> but
>> >> why
>> >> >  did *not* Apache Wicket introduce exception classes that all inherit
>> >> from
>> >> > a single exception class?
>> >> >
>> >> > A direct side effect of this design decision is that the check (e
>> >> > instanceof WicketRuntimeException) cannot give an indication if the
>> >> > exception is actually an exception raised by Wicket and need separate
>> >> > checks for different concerns.
>> >> >
>> >> > Thanks in advance for your explanations.
>> >> >
>> >> > Regards,
>> >> > Behrooz
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > -- Behrooz Nobakht
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> -- Behrooz Nobakht

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



How to get rid of -ver-blah-blah-blah.gif versioning ?

2013-05-01 Thread smallufo
I am upgrading from 1.4 to 6.7
Is the random string appended used for anti-caching or object versioning ?
I try to redeploy and the appended string is identical !?

Now I am stuck by how to get rid of image/resource versioning , and enable
caching ...
I use general Image ,
or override shouldAddAntiCacheParameter (return false)
But I still cannot get rid of the versioning string...

Anyway to disable that ?

One more question

How to enable caching and disable versioning string for this img ?
(there is no wicket:id assigned)


Re: Get data from External application.

2013-05-01 Thread chrome1235
Bertrand thanks for your quick reply.

I will call it from a page (incluedes form and fields). then returned value
fill a form text element. lastly user submit all values.

If I can not succeed by this method, I will do with your suggestion.
 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Get-data-from-External-application-tp4658441p4658444.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Get data from External application.

2013-05-01 Thread Bertrand Guay-Paquet

On 01/05/2013 12:13 PM, Bertrand Guay-Paquet wrote:

In your app init code, mount your page like this:
mountPage("/activate/#{code}", BarcodePage.class);


Assuming you want to mount this under the "activate" path.

I just noticed your example uses the root app mount. I think you might 
run into some problems with mappers if you use a path like "/#{code}" 
instead. Incoming requests for other pages could be confused with the 
ones for barcodes.


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



Re: Get data from External application.

2013-05-01 Thread Bertrand Guay-Paquet

Hi,

Sure you can!

In BarcodePage, use the PageParameters to extract the code. If the code 
is there, show its associated content.

StringValue codeValue = getPageParameters().get("code");
if (!codeValue.isEmpty())
...

In your app init code, mount your page like this:
mountPage("/activate/#{code}", BarcodePage.class);

On 01/05/2013 12:07 PM, chrome1235 wrote:

Hi,

I want to integrate zxing application (barcode reader) to my web application
for android phones.

When user click an ajax button in a page,
the code will call zxing with a custom url (like:
"zxing://scan/?ret=http://mydomain.com/MyApp/{CODE}";),
then zxing can post or (get) to a generated url according to my parameters.

Can I handle this url (zxing's post url) at the same page?



Thanks.
Kemal.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Get-data-from-External-application-tp4658441.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Get data from External application.

2013-05-01 Thread chrome1235
Hi,

I want to integrate zxing application (barcode reader) to my web application
for android phones.

When user click an ajax button in a page,
the code will call zxing with a custom url (like:
"zxing://scan/?ret=http://mydomain.com/MyApp/{CODE}";), 
then zxing can post or (get) to a generated url according to my parameters.

Can I handle this url (zxing's post url) at the same page?



Thanks.
Kemal.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Get-data-from-External-application-tp4658441.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Localized urls

2013-05-01 Thread Bertrand Guay-Paquet

Hello,

I'd like to localize the urls generated by my app like so:
/en/account/settings   -> AccountSettingsPage, locale EN
/fr/compte/parametres   -> AccountSettingsPage, locale FR

I already have urls prefixed with the locale base on the 
LocaleFirstMapper from Wicket examples, but they are all mapped the same 
way after the locale segment, like this:

/en/account/settings
/fr/account/settings

I could think of 2 potential approached to this, but neither seem easy 
to implement...


1- In my LocaleFirstMapper, have one "set" of localized mappers for each 
locale. I would need to duplicate the built-in mappers (link listeners, 
forms, etc.) manually for the extra sets of mappers.


2-Create a new RequestMapper class based on MountedMapper which allows 
custom dynamic parts in urls, somewhat like the page parameter 
placeholders make a url dynamic.


Any ideas or comments? Has anybody done this before?

Thanks!
Bertrand

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



Re: Question regarding exceptions in Apache Wicket

2013-05-01 Thread Behrooz Nobakht
Thanks for the reply.

The purpose is that when it's determined that exception comes from Wicket,
the error page (1) can reduce the cause chain (which can be independent of
Apache Wicket of course), and (2) based on this information provide the
user to report a bug or email the stack trace to a set of stack holders.
That's why I was thinking using "instanceof" as less as possible is more
preferred and indeed cleaner instead of checking "package names".

I generally agree that this could be done independent of how Apache Wicket
exceptions are designed and it's more categorized in the "convenience"
zone.


On Wed, May 1, 2013 at 11:06 AM, Igor Vaynberg wrote:

> On Wed, May 1, 2013 at 1:23 AM, Behrooz Nobakht  wrote:
> > More clearly, the intention is to be able to distinguish exceptions from
> > Apache Wicket and other frameworks and not really handle them.
>
> for what purpose? an unhandled exception is an unhandled exception...
>
> > For
> > instance, there can be two exceptions: MarkupException and
> > CouldNotLockPageException. Both are in the context of Apache Wicket,
> > however, we actually need to "two" checks to determine either. If they
> > inherited a common parent class, it needed "one" check.
> >
> > I do not want to say that Apache Wicket should have done this. I first
> want
> > to understand why this design decision has been made.
>
> because we could not come up with a good usecase for having a common
> parent. in any case there would have to be two parents - one for
> checked and one for unchecked exceptins. which means that both would
> have to implement some kind of a tagging interface to allow a single
> instanceof check. but without a valid usecase why do this?
>
> if you really want to know you can see if the exception class lives in
> the org.apache.wicket.* package, and if it does its a wicket
> exception.
>
> -igor
>
>
> >
> >
> >
> >
> > On Wed, May 1, 2013 at 10:04 AM, Igor Vaynberg  >wrote:
> >
> >> what is the purpose of knowing whether an exception is a wicket
> >> exception or something from further down the stack?
> >>
> >> eg how would you handle a runtime exception that came from within
> >> java.lang.String differently then the one that came from Wicket or the
> >> one that came from the servlet api?
> >>
> >> -igor
> >>
> >> On Wed, May 1, 2013 at 12:23 AM, Behrooz Nobakht 
> wrote:
> >> > Hello,
> >> >
> >> > I've been working on an error page in Apache Wicket and came across a
> >> > general pattern in Apache Wicket and I'd like to understand the reason
> >> for
> >> > it.
> >> >
> >> > Exceptions in Apache Wicket do not have a single class hierarchy; i.e.
> >> > there are exceptions that eventually extend "WicketRuntimeException"
> but
> >> > they are also many others that start either from "RuntimeException" or
> >> > "Exception". I could guess for the reasons for "checked" exceptions
> but
> >> why
> >> >  did *not* Apache Wicket introduce exception classes that all inherit
> >> from
> >> > a single exception class?
> >> >
> >> > A direct side effect of this design decision is that the check (e
> >> > instanceof WicketRuntimeException) cannot give an indication if the
> >> > exception is actually an exception raised by Wicket and need separate
> >> > checks for different concerns.
> >> >
> >> > Thanks in advance for your explanations.
> >> >
> >> > Regards,
> >> > Behrooz
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > -- Behrooz Nobakht
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
-- Behrooz Nobakht


Re: Question regarding exceptions in Apache Wicket

2013-05-01 Thread Igor Vaynberg
On Wed, May 1, 2013 at 1:23 AM, Behrooz Nobakht  wrote:
> More clearly, the intention is to be able to distinguish exceptions from
> Apache Wicket and other frameworks and not really handle them.

for what purpose? an unhandled exception is an unhandled exception...

> For
> instance, there can be two exceptions: MarkupException and
> CouldNotLockPageException. Both are in the context of Apache Wicket,
> however, we actually need to "two" checks to determine either. If they
> inherited a common parent class, it needed "one" check.
>
> I do not want to say that Apache Wicket should have done this. I first want
> to understand why this design decision has been made.

because we could not come up with a good usecase for having a common
parent. in any case there would have to be two parents - one for
checked and one for unchecked exceptins. which means that both would
have to implement some kind of a tagging interface to allow a single
instanceof check. but without a valid usecase why do this?

if you really want to know you can see if the exception class lives in
the org.apache.wicket.* package, and if it does its a wicket
exception.

-igor


>
>
>
>
> On Wed, May 1, 2013 at 10:04 AM, Igor Vaynberg wrote:
>
>> what is the purpose of knowing whether an exception is a wicket
>> exception or something from further down the stack?
>>
>> eg how would you handle a runtime exception that came from within
>> java.lang.String differently then the one that came from Wicket or the
>> one that came from the servlet api?
>>
>> -igor
>>
>> On Wed, May 1, 2013 at 12:23 AM, Behrooz Nobakht  wrote:
>> > Hello,
>> >
>> > I've been working on an error page in Apache Wicket and came across a
>> > general pattern in Apache Wicket and I'd like to understand the reason
>> for
>> > it.
>> >
>> > Exceptions in Apache Wicket do not have a single class hierarchy; i.e.
>> > there are exceptions that eventually extend "WicketRuntimeException" but
>> > they are also many others that start either from "RuntimeException" or
>> > "Exception". I could guess for the reasons for "checked" exceptions but
>> why
>> >  did *not* Apache Wicket introduce exception classes that all inherit
>> from
>> > a single exception class?
>> >
>> > A direct side effect of this design decision is that the check (e
>> > instanceof WicketRuntimeException) cannot give an indication if the
>> > exception is actually an exception raised by Wicket and need separate
>> > checks for different concerns.
>> >
>> > Thanks in advance for your explanations.
>> >
>> > Regards,
>> > Behrooz
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> -- Behrooz Nobakht

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



Re: Question regarding exceptions in Apache Wicket

2013-05-01 Thread Behrooz Nobakht
More clearly, the intention is to be able to distinguish exceptions from
Apache Wicket and other frameworks and not really handle them. For
instance, there can be two exceptions: MarkupException and
CouldNotLockPageException. Both are in the context of Apache Wicket,
however, we actually need to "two" checks to determine either. If they
inherited a common parent class, it needed "one" check.

I do not want to say that Apache Wicket should have done this. I first want
to understand why this design decision has been made.




On Wed, May 1, 2013 at 10:04 AM, Igor Vaynberg wrote:

> what is the purpose of knowing whether an exception is a wicket
> exception or something from further down the stack?
>
> eg how would you handle a runtime exception that came from within
> java.lang.String differently then the one that came from Wicket or the
> one that came from the servlet api?
>
> -igor
>
> On Wed, May 1, 2013 at 12:23 AM, Behrooz Nobakht  wrote:
> > Hello,
> >
> > I've been working on an error page in Apache Wicket and came across a
> > general pattern in Apache Wicket and I'd like to understand the reason
> for
> > it.
> >
> > Exceptions in Apache Wicket do not have a single class hierarchy; i.e.
> > there are exceptions that eventually extend "WicketRuntimeException" but
> > they are also many others that start either from "RuntimeException" or
> > "Exception". I could guess for the reasons for "checked" exceptions but
> why
> >  did *not* Apache Wicket introduce exception classes that all inherit
> from
> > a single exception class?
> >
> > A direct side effect of this design decision is that the check (e
> > instanceof WicketRuntimeException) cannot give an indication if the
> > exception is actually an exception raised by Wicket and need separate
> > checks for different concerns.
> >
> > Thanks in advance for your explanations.
> >
> > Regards,
> > Behrooz
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
-- Behrooz Nobakht


Re: Question regarding exceptions in Apache Wicket

2013-05-01 Thread Igor Vaynberg
what is the purpose of knowing whether an exception is a wicket
exception or something from further down the stack?

eg how would you handle a runtime exception that came from within
java.lang.String differently then the one that came from Wicket or the
one that came from the servlet api?

-igor

On Wed, May 1, 2013 at 12:23 AM, Behrooz Nobakht  wrote:
> Hello,
>
> I've been working on an error page in Apache Wicket and came across a
> general pattern in Apache Wicket and I'd like to understand the reason for
> it.
>
> Exceptions in Apache Wicket do not have a single class hierarchy; i.e.
> there are exceptions that eventually extend "WicketRuntimeException" but
> they are also many others that start either from "RuntimeException" or
> "Exception". I could guess for the reasons for "checked" exceptions but why
>  did *not* Apache Wicket introduce exception classes that all inherit from
> a single exception class?
>
> A direct side effect of this design decision is that the check (e
> instanceof WicketRuntimeException) cannot give an indication if the
> exception is actually an exception raised by Wicket and need separate
> checks for different concerns.
>
> Thanks in advance for your explanations.
>
> Regards,
> Behrooz

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



Question regarding exceptions in Apache Wicket

2013-05-01 Thread Behrooz Nobakht
Hello,

I've been working on an error page in Apache Wicket and came across a
general pattern in Apache Wicket and I'd like to understand the reason for
it.

Exceptions in Apache Wicket do not have a single class hierarchy; i.e.
there are exceptions that eventually extend "WicketRuntimeException" but
they are also many others that start either from "RuntimeException" or
"Exception". I could guess for the reasons for "checked" exceptions but why
 did *not* Apache Wicket introduce exception classes that all inherit from
a single exception class?

A direct side effect of this design decision is that the check (e
instanceof WicketRuntimeException) cannot give an indication if the
exception is actually an exception raised by Wicket and need separate
checks for different concerns.

Thanks in advance for your explanations.

Regards,
Behrooz