Re: Apache Wicket is a Flawed Framework

2011-11-18 Thread Alex Objelean
First of all, sorry for my previous comment. It was wrong judging you instead
discussing the points addressed in your post. Nevertheless, nobody hates you
for your opinion :). This kind of posts appears from time to time and there
is nothing wrong with them as long as these address valid issues (which is
not the case this time). You cannot please everybody. 

The only problem is the way you titled your post - that is the real bashing.
When writing this kind of post, don't forget that you are bashing not only
the framework, but also the time and effort of the people who contributed to
this open source project. A constructive critique is always appreciated. 





 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4084976.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: Apache Wicket is a Flawed Framework

2011-11-17 Thread Alex Objelean
This is not an april fool's day, it is just an opinion of an 
http://www.linkedin.com/pub/eric-kizaki/30/2b1/1a4 inexperienced developer . 
Eric, if you have troubles in understanding wicket, you are definitely doing
it wrong. Wicket is not a silver bullet, but it is a great tool when
comparing to existing technologies.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Apache-Wicket-is-a-Flawed-Framework-tp4080411p4081174.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: Using IResourceCachingStrategy with context relative resources(non PackageResource)

2011-08-02 Thread Alex Objelean
Serban, if you are using wro4j-maven-plugin, you can achieve the
FilenameWithVersionResourceCachingStrategy feature by providing the 
http://code.google.com/p/wro4j/wiki/OutputNamingStrategy Resource Naming
Strategy .

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-IResourceCachingStrategy-with-context-relative-resources-non-PackageResource-tp3712574p3713308.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: Using IResourceCachingStrategy with context relative resources(non PackageResource)

2011-08-02 Thread Alex Objelean
It should be possible to include dynamically all resources in the page
contained inside a servlet context folder (no need to know the exact name of
the resource).

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-IResourceCachingStrategy-with-context-relative-resources-non-PackageResource-tp3712574p3713807.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 resources (css, js and images)?

2010-12-15 Thread Alex Objelean

Though this topic is quite old, I think it is still actual. Since the 1.5
release is not far away, did anybody thought if the (at least) js resource
merging should occur? 

This is very useful when you have a page with a large number of components,
each loading a large number of small resources. Having a single resource (js
and/or css) as a result of page rendering could have a dramatic page loading
time improvement.

Thanks!
Alex Objelean
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-resources-css-js-and-images-tp1868800p3089781.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 + GAE

2010-11-12 Thread Alex Objelean

Martin, are you sure you deployed the application using DEPLOYMENT mode and
resourcePollFrequency is null?
At least these are the only configurations needs to be updated (in wicket
1.4) in order to work with GAE. 

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-GAE-tp3039886p3040226.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 1.5 and GAE

2010-10-28 Thread Alex Objelean

Issue created: https://issues.apache.org/jira/browse/WICKET-3138
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-GAE-tp3016185p3016762.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 1.5 and GAE

2010-10-27 Thread Alex Objelean

Is there a way to make wicket-1.5 to work with Google App Engine?

Thanks,
Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-GAE-tp3016185p3016185.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 1.5 and GAE

2010-10-27 Thread Alex Objelean

I was expecting to have a PageStore already available, instead of
implementing one from scratch.
Is it possible to add one to the trunk?

Thanks!
Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-and-GAE-tp3016185p3016212.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: Mount a page to root path in wicket 1.5

2010-10-20 Thread Alex Objelean

No, it seems that if nothing is mount, it redirects to the following
location:

/ - /wicket/bookmarkable/com.mycompany.page.HomePage

What would I expect is to access the HomePage with /.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003337.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: Mount a page to root path in wicket 1.5

2010-10-20 Thread Alex Objelean

So you suggest to create something like CustomHomeMapper in order to be able
to mount a page to root?
If it is true, shouldn't it be possible to have this feature out of the box?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003344.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: Long running task with download

2010-10-20 Thread Alex Objelean

One small note about running a background thread is that inside that thread
you cannot access the Application instance (Application.get()), because it
is not an inheritable thread local. It may be a problem in some cases.

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Long-running-task-with-download-tp3003232p3003347.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: Mount a page to root path in wicket 1.5

2010-10-20 Thread Alex Objelean

Good to know, thanks!
When a new milestone will be available?

Thanks!
Alex

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003369.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



Mount a page to root path in wicket 1.5

2010-10-19 Thread Alex Objelean


Hi! 
Is it possible to mount a page to root path (/) in latest wicket 1.5
branch? 

Thanks! 
Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mount-a-page-to-root-path-in-wicket-1-5-tp3003270p3003270.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: Localizer in a new Thread

2010-07-30 Thread Alex Objelean

There was a long discussion about this. One of the proposal was to use
InheritableThreadLocal which would solve this problem, but there was a lot
of concerns about this approach. 

The solution I have found was this:
If you create the thread with ExecutorService, you could do the following:

final ExecutorService service = new ScheduledThreadPoolExecutor(1) {
  @Override
  protected void beforeExecute(final Thread t, final Runnable r) {
Application.set(app);
  };
  @Override
  protected void afterExecute(final Runnable r, final Throwable t) {
Application.unset();
  }
};

and execute you thread like this:
service.submit(new Runnable() {
@Override
public void run() {
  //do stuff
}
  });

This will ensure that Application is accessible from within newly created
thread.

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2307732.html
Sent from the Wicket - User 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: Localizer in a new Thread

2010-07-30 Thread Alex Objelean

Yes, the solution I've mentioned in previous post should solve your problem.

Alex

On 30 July 2010 22:44, Fernando Wermus-3 [via Apache Wicket] 
ml-node+2308410-419528218-229...@n4.nabble.comml-node%2b2308410-419528218-229...@n4.nabble.com
 wrote:

 Ale,
Related to what you have mentioned. I render mails with some
 mockHTTPrequest and mockeHTTPResponse, etc. But, I need to render mails in
 a
 different thread than wicket's one. I have another servlet that runs
 Blazeds
 (Flex) where I also need to render some mails, but  I got  There is no
 application
 attached to current thread According to what you mentioned, could I
 solve this issue?

 thanks in advance.

 On Fri, Jul 30, 2010 at 5:46 AM, Alex Objelean [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2308410i=0wrote:


 
  There was a long discussion about this. One of the proposal was to use
  InheritableThreadLocal which would solve this problem, but there was a
 lot
  of concerns about this approach.
 
  The solution I have found was this:
  If you create the thread with ExecutorService, you could do the
 following:
 
 final ExecutorService service = new ScheduledThreadPoolExecutor(1) {
   @Override
   protected void beforeExecute(final Thread t, final Runnable r) {
 Application.set(app);
   };
   @Override
   protected void afterExecute(final Runnable r, final Throwable t) {
 Application.unset();
   }
 };
 
  and execute you thread like this:
  service.submit(new Runnable() {
 @Override
 public void run() {
   //do stuff
 }
   });
 
  This will ensure that Application is accessible from within newly created

  thread.
 
  Alex
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2307732.htmlhttp://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2307732.html?by-user=t
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2308410i=1
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2308410i=2
 
 


 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2308410.html
 To unsubscribe from RE: Localizer in a new Thread, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YWxleC5vYmplbGVhbkBnbWFpbC5jb218MjMwNzczMnwtNDA5MTE1Njc3.




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Localizer-in-a-new-Thread-tp2307306p2308459.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: Standard way to internationalize a website with /en, /de ?

2010-07-22 Thread Alex Objelean

There is a page on wiki describing how this can be done:

https://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Standard-way-to-internationalize-a-website-with-en-de-tp2298300p2298625.html
Sent from the Wicket - User 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: javascript message after ajax request

2010-07-01 Thread Alex Objelean

The best approach is to use AjaxCallDecorator:

new AjaxLinkVoid(id) {
  @Override
  protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
  @Override
  public CharSequence decorateOnSuccessScript(CharSequence script) {
return alert('done');;
  }
};
  }

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-show-hide-individual-column-of-a-DefaultDataTable-using-Ajax-tp2275208p2275440.html
Sent from the Wicket - User 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: Can I develop without recompiling/restarting after every change?

2010-05-30 Thread Alex Objelean

If you are using eclipse IDE for your development, I find the best tools the
following:
1) Run-jetty-run plugin: http://code.google.com/p/run-jetty-run/ 
2) jRebel 

With these two, you require absolutely no restart, no matter what you have
changed in your wicket application (and not only wicket).

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-I-develop-without-recompiling-restarting-after-every-change-tp2226360p2236201.html
Sent from the Wicket - User 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: Can I develop without recompiling/restarting after every change?

2010-05-30 Thread Alex Objelean

jRebel allows you to change the java code without restarting the server.

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-I-develop-without-recompiling-restarting-after-every-change-tp2226360p2236403.html
Sent from the Wicket - User 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: [PROPOSAL] Application.runAs() Method...

2010-05-28 Thread Alex Objelean

Here is the link of the component implementing this use case:
http://pastebin.com/0GwGXkmr 
The usage is pretty simple: 

new ProcessExecutorPanel(associatedFilesMigration) { 
  @Override 
  protected void execute() { 
   //a business logic method which takes a lot time to complete 
   startMigration(); 
  } 
}; 


Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PROPOSAL-Application-runAs-Method-tp2230030p2234567.html
Sent from the Wicket - User 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: [PROPOSAL] Application.runAs() Method...

2010-05-28 Thread Alex Objelean

ITL = InheritableThreadLocal

Here is the link of the component implementing this use case:
http://pastebin.com/0GwGXkmr 
The usage is pretty simple: 

new ProcessExecutorPanel(associatedFilesMigration) { 
  @Override 
  protected void execute() { 
   //a business logic method which takes a lot time to complete 
   startMigration(); 
  } 
}; 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PROPOSAL-Application-runAs-Method-tp2230030p2234578.html
Sent from the Wicket - User 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: [PROPOSAL] Application.runAs() Method...

2010-05-28 Thread Alex Objelean

The problem is that injectedSpringBean won't work because it needs
Application :)... 

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PROPOSAL-Application-runAs-Method-tp2230030p2234639.html
Sent from the Wicket - User 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: [PROPOSAL] Application.runAs() Method...

2010-05-28 Thread Alex Objelean

The problem is not with the ProcessExecutorPanel component.. but with the way
you execute it:

because the client needs a reference to injectedSpringBean which cannot be
resolved unless it is invoked from within a thread which can access
Application, because @SpringBean needs it.



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PROPOSAL-Application-runAs-Method-tp2230030p2234731.html
Sent from the Wicket - User 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: [PROPOSAL] Application.runAs() Method...

2010-05-28 Thread Alex Objelean

Yes, I see now. Thanks!
The only drawback of this approach is that the client code is responsible
for creating the Future. The initial purpose was to hide the implementation
details related to thread creation.

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PROPOSAL-Application-runAs-Method-tp2230030p2234916.html
Sent from the Wicket - User 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: [announce] Release Wicket 1.4.9

2010-05-28 Thread Alex Objelean

I had the same results with tomcat 6... We could try to see what happens with
other web servers with combination of different jdk versions. Until now,
there was no prove of the memory leak.  
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/announce-Release-Wicket-1-4-9-tp2228179p2235109.html
Sent from the Wicket - User 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: using injected services in a child thread

2010-05-28 Thread Alex Objelean

The link you have found was a workaround to avoid the problem. You can see
the actual problem in this example:

http://pastebin.com/0GwGXkmr  

The usage example:
 
@SpringBean
private Service service;
new ProcessExecutorPanel(associatedFilesMigration) { 
  @Override 
  protected void execute() { 
   //a business logic method which takes a lot time to complete 
   //in this context Application is not available and it complains
that Application is not attached to current thread 
   service.startMigration(); 
  } 
}; 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235118.html
Sent from the Wicket - User 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: [announce] Release Wicket 1.4.9

2010-05-28 Thread Alex Objelean

I'm not insisting on bringing it back, but I don't understand on what is
based your conclusion that it doesn't work for the desired use-case (thread
pools) ?

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/announce-Release-Wicket-1-4-9-tp2228179p2235138.html
Sent from the Wicket - User 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: using injected services in a child thread

2010-05-28 Thread Alex Objelean

There are two proposed solutions:

1) use the beforeExecute()/afterExecute() methods to set/clear the
Application's ThreadLocal variable so that it's available during the
execution of the task. 

2) Let the client code to create the Future. Though it is a good approach, I
don't like the fact that the client is responsible for implementing such
details each time it overrides the execute() method. It would be cleaner to
move this logic inside the component..

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235157.html
Sent from the Wicket - User 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: using injected services in a child thread

2010-05-28 Thread Alex Objelean

Yes, I agree. I do prefer this solution too.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235166.html
Sent from the Wicket - User 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: using injected services in a child thread

2010-05-28 Thread Alex Objelean

No, it is about Sven Maier's solution: http://pastebin.com/NN58fiZx
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235168.html
Sent from the Wicket - User 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: using injected services in a child thread

2010-05-28 Thread Alex Objelean

The idea is that with the first solution  you don't have to clutter up each
task's code: 
1) use the beforeExecute()/afterExecute() methods to set/clear the
Application's ThreadLocal variable so that it's available during the
execution of the task. 


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235201.html
Sent from the Wicket - User 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: [PROPOSAL] Application.runAs() Method...

2010-05-28 Thread Alex Objelean

I don't understand why do you think that a component responsible for creating
a thread and check its status does too much, is it really that
complicated?? And also, pardon me, but what mess are you talking about?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PROPOSAL-Application-runAs-Method-tp2230030p2235206.html
Sent from the Wicket - User 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: using injected services in a child thread

2010-05-28 Thread Alex Objelean

Yes, the link is here: http://pastebin.com/TyDrCCCr

Basically, you have to replace:
final ExecutorService service =
Executors.newSingleThreadScheduledExecutor();

with:
 final Application app = Application.get();
  final ExecutorService service = new ScheduledThreadPoolExecutor(1)
{
@Override
protected void beforeExecute(final Thread t, final Runnable r) {
  Application.set(app);
};
@Override
protected void afterExecute(final Runnable r, final Throwable t)
{
  Application.unset();
}
  };

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235261.html
Sent from the Wicket - User 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: [PROPOSAL] Application.runAs() Method...

2010-05-27 Thread Alex Objelean

Hi James!
It would be a good idea to add this feature to next release, since the
Application won't be stored in InheritableThreadLocal anymore. 

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PROPOSAL-Application-runAs-Method-tp2230030p2233184.html
Sent from the Wicket - User 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: [announce] Release Wicket 1.4.9

2010-05-25 Thread Alex Objelean

Hi Sven!
See the task description details:
https://issues.apache.org/jira/browse/WICKET-2846

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/announce-Release-Wicket-1-4-9-tp2228179p2229836.html
Sent from the Wicket - User 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: componentId and markupId

2010-05-25 Thread Alex Objelean

The componentId is a server-side identifier of the component used to build
the component hierarchy, while markupId is a client-side (in the html
markup). 

Ex: you can have a component with id 'panel' and markupId
'left-container'... with the following markup: 

div id=left-container'/div

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/componentId-and-markupId-tp2229995p2230024.html
Sent from the Wicket - User 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: [announce] Release Wicket 1.4.9

2010-05-24 Thread Alex Objelean

Hi Jeremy!
Thanks for the effort put in this release. Though there is a lot of
discussion around WICKET-2846, instead of deciding to revert it in the next
release, I would rather suggest to take the chance for those who voted for
reverting it to prove that it is indeed the issue.  

I am still skeptical about the problem and I think that reverting a non
could create a precedent which would encourage users to do the same without
needing to prove nothing in the problem.  

Thanks!
Alex 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/announce-Release-Wicket-1-4-9-tp2228179p2229134.html
Sent from the Wicket - User 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: [announce] Release Wicket 1.4.9

2010-05-24 Thread Alex Objelean

When comparing a small feature (but still feature) proven by an use case
(limited but still an use case) and a NON problem proven only with
theoretical presumption (with also very limited use case), would you still
choose reverting it? Same question for all who voted against it...

Alex
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/announce-Release-Wicket-1-4-9-tp2228179p2229159.html
Sent from the Wicket - User 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: [announce] Release Wicket 1.4.9

2010-05-24 Thread Alex Objelean

I don't want to insist to much, I'm not absurd, but we are technical people.
Don't you think that any theorem should be proven? The least we can achieve
is to learn a new thing about how ITL are related to memory leaks. 

I know it isn't easy to prove, but aren't there enough tools to help us? Is
it really that hard to make a simple example with a worst case scenario to
check if the presumption is indeed valid? I know it is much simpler to do
nothing to avoid potential problems, but still do you find it a good way to
deal with problems? Don't you believe in presumption of innocence principle? 

I don't want to bother the community, if there won't anybody willing to
prove the problem, eventually I will spend some time to bust the myth...

Alex 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/announce-Release-Wicket-1-4-9-tp2228179p2229213.html
Sent from the Wicket - User 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: CSS Templating

2010-05-08 Thread Alex Objelean

If you are trying to achieve css variables, you may want to consider using
wro4j: (http://code.google.com/p/wro4j/wiki/GettingStarted). It does support
css variables, besides other dozen features (like less css meta framework
integration, merge, minification, cache, build time  runtime solution,
etc). It integrates very easy in any j2ee application and is compatible with
jdk-1.5  servlet-api-2.3.

Alex Objelean
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-Templating-tp2135587p2136149.html
Sent from the Wicket - User 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 give feedback in long-running operation within AjaxButton.onSubmit()?

2010-04-09 Thread Alex Objelean

The IAjaxIndicatorAware interface fits perfectly with your need. All you have
do, is: 
- create a DOM element which looks like jGrowl with 'loading' message and
assign it an id (ex: id=ajaxIndicator)
- your webPage should implement  IAjaxIndicatorAware interface:
public class MyWebPage extends WebPage implements IAjaxIndicatorAware {
  //...
  @Override
   public String getAjaxIndicatorMarkupId() {
 return ajaxIndicator;
   }
   //...
}

That's all. Now  ajaxIndicator DOM element to appear when ajax call will
start and will disappear when it will complete.

Hope this was helpful.

Alex Objelean


Thomas Götz wrote:
 
 Thanks for all the hints so far, they are really helpful  but ;)
 
 Well, I don't want to have busy indicators on different components, I'm 
 looking for a way to display status messages (like eg with jGrowl) 
 during the long-running process (triggered by AjaxButton). I guess the 
 only way to achieve this is with a solution as stated by Nishant 
 (involving some kind of JS polling) ...
 
 -Tom
 
 
 Am 09.04.2010 08:48, schrieb Tomasz Dziurko:
 You should check visural-wicket project
 (http://code.google.com/p/visural-wicket/) and live demo on
 http://visural-wicket-examples.appspot.com/app/ . In submitters
 there are some fancy looking waiting popup messages which could
 help.

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

-- 
View this message in context: 
http://old.nabble.com/How-to-give-feedback-in-long-running-operation-within-AjaxButton.onSubmit%28%29--tp28182827p28188414.html
Sent from the Wicket - User 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 give feedback in long-running operation within AjaxButton.onSubmit()?

2010-04-09 Thread Alex Objelean

Oh, I see... I got you wrong initially. Indeed, in this case.. the best
solution is polling and upon subtask completion - output a jgrowl
notification script.

Alex


Thomas Götz wrote:
 
 Ok, but this is *not* what I want to achieve, beggin' your pardon ;-)
 The first messages should not display when starting the operation, but 
 when a certain sub-task is finished. Say, I iterate over a list in the 
 operation, and after each cycle I'd like to display a jGrowl message ...
 
 -Tom
 
 
 Am 09.04.2010 09:05, schrieb Alex Objelean:
 That's all. Now  ajaxIndicator DOM element to appear when ajax call will
 start and will disappear when it will complete.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/How-to-give-feedback-in-long-running-operation-within-AjaxButton.onSubmit%28%29--tp28182827p28188512.html
Sent from the Wicket - User 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: URL Encoding strategy

2010-04-09 Thread Alex Objelean

I see. But at least could you make the encode method non-final? This would
ensure that there is no need for a patch. I just would reuse your code for
root mounting. 

Until wicket-1.5 will be released and adopted, we still have to have a
solution for root mounting in wicket-1.4.

Thanks!
Alex


Erik van Oosten wrote:
 
 Hi Alex,
 
 I am not sure it is a good idea to include this code in Wicket core (or 
 extension). It will make Wicket's URL handling even more nontransparent 
 then it already is. For well tested applications you can use the 
 workaround, but I'd hate to maintain this code for each and every corner 
 case, especially knowing that Wicket 1.5 will thoroughly improve URL 
 handling.
 
 Regards,
 Erik.
 
 
 Alex Objelean wrote:
 Hi Eric!
 I've noticed that you have already posted the solution on your blog
 (http://blog.jteam.nl/2010/02/24/wicket-root-mounts/). Thank you for
 sharing
 it with us. 

 One question, why BookmarkablePageRequestTargetUrlCodingStrategy#encode
 method is still final even in wicket-1.4.7 if there is a good use-case
 for
 extending it?

 Also, maybe you could add this contribution to wicket core or at least
 wicket-extension?

 Thank you!
 Alex Objelean
  

 Erik van Oosten wrote:
   
 Hi Nishant,

 This is tricky stuff.

 Here is some information: 
 http://old.nabble.com/How-to-catch-unknown-%28not-mounted%29-URLs--td14949092.html
 Another approach is to do redirects from a servlet filter.

 If you have a couple of days of patience I'll have finished a blog 
 article on it, with example code to make it a lot easier from within
 Wicket.

 Regards,
  Erik.

 Op 20-02-10 11:07, Nishant Neeraj wrote:
 
 Hi,

 I wanted to apply URL encoding strategy to application context root but
 I
 cant mount empty string because it throws exception at start-up.
 Is there a work around to this?

 Regards
 Nishant

   
 
 -- 
 Sent from my SMTP compliant software
 Erik van Oosten
 http://day-to-day-stuff.blogspot.com/
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/URL-Encoding-strategy-tp27664942p28189285.html
Sent from the Wicket - User 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: URL Encoding strategy

2010-04-09 Thread Alex Objelean

Issue created: https://issues.apache.org/jira/browse/WICKET-2830

Alex 


Erik van Oosten wrote:
 
 Only Wicket comitters can do that. Please make a jira issue that refers 
 to this discussion, for example with a nabble URL.
 
 Regards,
 Erik.
 
 
 Alex Objelean wrote:
 I see. But at least could you make the encode method non-final? This
 would
 ensure that there is no need for a patch. I just would reuse your code
 for
 root mounting. 

 Until wicket-1.5 will be released and adopted, we still have to have a
 solution for root mounting in wicket-1.4.

 Thanks!
 Alex


 Erik van Oosten wrote:
   
 Hi Alex,

 I am not sure it is a good idea to include this code in Wicket core (or 
 extension). It will make Wicket's URL handling even more nontransparent 
 then it already is. For well tested applications you can use the 
 workaround, but I'd hate to maintain this code for each and every corner 
 case, especially knowing that Wicket 1.5 will thoroughly improve URL 
 handling.

 Regards,
 Erik.


 Alex Objelean wrote:
 
 Hi Eric!
 I've noticed that you have already posted the solution on your blog
 (http://blog.jteam.nl/2010/02/24/wicket-root-mounts/). Thank you for
 sharing
 it with us. 

 One question, why BookmarkablePageRequestTargetUrlCodingStrategy#encode
 method is still final even in wicket-1.4.7 if there is a good use-case
 for
 extending it?

 Also, maybe you could add this contribution to wicket core or at least
 wicket-extension?

 Thank you!
 Alex Objelean
  

 Erik van Oosten wrote:
   
   
 Hi Nishant,

 This is tricky stuff.

 Here is some information: 
 http://old.nabble.com/How-to-catch-unknown-%28not-mounted%29-URLs--td14949092.html
 Another approach is to do redirects from a servlet filter.

 If you have a couple of days of patience I'll have finished a blog 
 article on it, with example code to make it a lot easier from within
 Wicket.

 Regards,
  Erik.

 Op 20-02-10 11:07, Nishant Neeraj wrote:
 
 
 Hi,

 I wanted to apply URL encoding strategy to application context root
 but
 I
 cant mount empty string because it throws exception at start-up.
 Is there a work around to this?

 Regards
 Nishant
   
 
 -- 
 Sent from my SMTP compliant software
 Erik van Oosten
 http://day-to-day-stuff.blogspot.com/
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/URL-Encoding-strategy-tp27664942p28190842.html
Sent from the Wicket - User 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: Javascript Compression not working.

2010-04-08 Thread Alex Objelean

Wro is responsible for resource cashing. That means that all requests for
merged resource will be served with the same response. If you need something
dynamic, like theming .. you should serve those outside of wro request. You
can split your resources in two: 
1) Static unchanged resources (to be served by wro filter)
2) Dynamic, theme dependent resources - served by stream locator

Hope this helps!
Alex


AppleGrew wrote:
 
 Hi Alex n All,
 
 I managed to get this working. It was failing because of missing Apache
 Commons IO. Now I am stuck at another place. JS are fine, but the CSS
 files
 are chosen as per user's theme. When I was serving the CSS files via my
 stream locator, it picked up the correct file based on the theme name. Now
 since the WRO filter is before Wicket filter there seems to be no way to
 send this information to it.
 
 Note to achieve themability in my app, I have put the files in WEB-INF.
 Htmls, CSS and images are segregated into folders with theme's name. My
 stream locator fetches the correct Html and CSS based on theme name.
 
 Any suggestions how can I achieve this using WRO or can I integrate
 WRO-like
 minification of JS and CSS right into Wicket?
 
 Regards,
 Apple Grew
 my blog @ http://blog.applegrew.com/
 
 
 On Wed, Apr 7, 2010 at 10:21 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 Actually you don't have to access the resources. The wro filter  just
 handles
 the request for static resources, there no wicket specific integration.
 All
 you have to do, is to define the location of your resources in wro.xml
 (group descriptor). The location of resources can be virtually anything:
 external url, relative to servlet context, classpath or file resources
 (http://code.google.com/p/wro4j/wiki/ResourceTypes).

 I pretty sure there is no way to 'ask' wicket to gzip and minimize
 external
 resources, because wicket doesn't control them.

 Alex


 AppleGrew wrote:
 
  Checked it out. This is good, but I am not sure how to integrate this
 with
  Wicket. Currently it seems that WRO's url is being override by
  WicketFilter,
  so I am not being able to access WRO resources.
 
  BTW going back to original problem. I tired to debug the Wicket code
 and
  it
  seems for shared resources the SharedResourceRequestTraget simply
 invokes
  PackageResource, while for non globally shared resources
  JavascriptPackageResource is invoked. JavascriptPackageResource  seems
 to
  be
  responsible for gzipping and minizing JS code. Not sure how do I 'ask'
  Wicket to do the same for globally resources.
 
  Regards,
  Apple Grew
  my blog @ http://blog.applegrew.com/
 
 
  On Wed, Apr 7, 2010 at 8:20 PM, Alex Objelean
  alex_objel...@yahoo.comwrote:
 
 
  You could take a look at wro4j: http://code.google.com/p/wro4j/ . It
  helps
  you keep you javascripts (and css) organized in a single location,
 merge
  and
  minimize them. It is also very easy configurable
  (http://code.google.com/p/wro4j/wiki/GettingStarted) and extensible
  (allow
  provide your own implementation of js or css minification algorithm).
  Also
  it provides a maven plugin (
  http://code.google.com/p/wro4j/wiki/MavenPlugin)
  for build time merging and minification. You can see a complete list
 of
  features here: http://code.google.com/p/wro4j/wiki/Features
 
  Alex
 
 
  AppleGrew wrote:
  
   Hi All,
  
   I have put all my JS files in WEB-INF. To let Wicket find them I
 have
   created my own ResourceStreamLocator. The locator on getting class
  scope
   as
   Application simply locates the JS files from 'WEB-INF/js'. The
 problem
  is
   how do I enable Wicket's built-in Javascript compression?
  
   I tried the following code with a form:-
  
 
 add(JavascriptPackageResource.getHeaderContribution(ApplicationCore.class,
   js/form.js));
  
   I can still see the white spaces in the JS code when I try to access
  them
   from my browser. Pls guide.
  
   Regards,
   Apple Grew
   my blog @ http://blog.applegrew.com/
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/Javascript-Compression-not-working.-tp28164115p28166133.html
  Sent from the Wicket - User 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
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Javascript-Compression-not-working.-tp28164115p28167755.html
 Sent from the Wicket - User 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


 
 

-- 
View this message in context: 
http://old.nabble.com/Javascript-Compression-not-working.-tp28164115p28174756.html
Sent from the Wicket - User mailing list archive at Nabble.com

Re: Javascript Compression not working.

2010-04-08 Thread Alex Objelean

I wouldn't recommend creating a wicket tag for this. That is exactly what
wicket doesn't encourage to do. An alternative could be a simple servlet
which forwards to wanted resource based on theme parameter...

Alex 


AppleGrew wrote:
 
 Hi alex
 Thanks for the respose.
 I have thought of a scheme. I have clubed the css into groups with
 names as - themeName-all.css, eg. Classic-all.css, jazzy-all.css, etc.
 I will make sure wicket put correct css name in htmls.
 Can anyone point me as how to extend wiket:link tag or creat my own tag.
 
 On 4/8/10, Alex Objelean alex_objel...@yahoo.com wrote:

 Wro is responsible for resource cashing. That means that all requests for
 merged resource will be served with the same response. If you need
 something
 dynamic, like theming .. you should serve those outside of wro request.
 You
 can split your resources in two:
 1) Static unchanged resources (to be served by wro filter)
 2) Dynamic, theme dependent resources - served by stream locator

 Hope this helps!
 Alex


 AppleGrew wrote:

 Hi Alex n All,

 I managed to get this working. It was failing because of missing Apache
 Commons IO. Now I am stuck at another place. JS are fine, but the CSS
 files
 are chosen as per user's theme. When I was serving the CSS files via my
 stream locator, it picked up the correct file based on the theme name.
 Now
 since the WRO filter is before Wicket filter there seems to be no way to
 send this information to it.

 Note to achieve themability in my app, I have put the files in WEB-INF.
 Htmls, CSS and images are segregated into folders with theme's name. My
 stream locator fetches the correct Html and CSS based on theme name.

 Any suggestions how can I achieve this using WRO or can I integrate
 WRO-like
 minification of JS and CSS right into Wicket?

 Regards,
 Apple Grew
 my blog @ http://blog.applegrew.com/


 On Wed, Apr 7, 2010 at 10:21 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:


 Actually you don't have to access the resources. The wro filter  just
 handles
 the request for static resources, there no wicket specific integration.
 All
 you have to do, is to define the location of your resources in wro.xml
 (group descriptor). The location of resources can be virtually
 anything:
 external url, relative to servlet context, classpath or file resources
 (http://code.google.com/p/wro4j/wiki/ResourceTypes).

 I pretty sure there is no way to 'ask' wicket to gzip and minimize
 external
 resources, because wicket doesn't control them.

 Alex


 AppleGrew wrote:
 
  Checked it out. This is good, but I am not sure how to integrate this
 with
  Wicket. Currently it seems that WRO's url is being override by
  WicketFilter,
  so I am not being able to access WRO resources.
 
  BTW going back to original problem. I tired to debug the Wicket code
 and
  it
  seems for shared resources the SharedResourceRequestTraget simply
 invokes
  PackageResource, while for non globally shared resources
  JavascriptPackageResource is invoked. JavascriptPackageResource 
 seems
 to
  be
  responsible for gzipping and minizing JS code. Not sure how do I
 'ask'
  Wicket to do the same for globally resources.
 
  Regards,
  Apple Grew
  my blog @ http://blog.applegrew.com/
 
 
  On Wed, Apr 7, 2010 at 8:20 PM, Alex Objelean
  alex_objel...@yahoo.comwrote:
 
 
  You could take a look at wro4j: http://code.google.com/p/wro4j/ . It
  helps
  you keep you javascripts (and css) organized in a single location,
 merge
  and
  minimize them. It is also very easy configurable
  (http://code.google.com/p/wro4j/wiki/GettingStarted) and extensible
  (allow
  provide your own implementation of js or css minification
 algorithm).
  Also
  it provides a maven plugin (
  http://code.google.com/p/wro4j/wiki/MavenPlugin)
  for build time merging and minification. You can see a complete list
 of
  features here: http://code.google.com/p/wro4j/wiki/Features
 
  Alex
 
 
  AppleGrew wrote:
  
   Hi All,
  
   I have put all my JS files in WEB-INF. To let Wicket find them I
 have
   created my own ResourceStreamLocator. The locator on getting class
  scope
   as
   Application simply locates the JS files from 'WEB-INF/js'. The
 problem
  is
   how do I enable Wicket's built-in Javascript compression?
  
   I tried the following code with a form:-
  
 
 add(JavascriptPackageResource.getHeaderContribution(ApplicationCore.class,
   js/form.js));
  
   I can still see the white spaces in the JS code when I try to
 access
  them
   from my browser. Pls guide.
  
   Regards,
   Apple Grew
   my blog @ http://blog.applegrew.com/
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/Javascript-Compression-not-working.-tp28164115p28166133.html
  Sent from the Wicket - User 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 give feedback in long-running operation within AjaxButton.onSubmit()?

2010-04-08 Thread Alex Objelean

The most simple way is to implement  IAjaxIndicatorAware interface on the
component wish to display the indicator. For instance, if your page
implements this interface, you will have a generic indicator for all ajax
requests inside your page. Also, you can be more specific by implementing
this interface only on a panel or a form... depends on your use-case.

Alex
 

Thomas Götz wrote:
 
 Problem:
 I have an AjaxButton that triggers a long-running operation when clicked.
 I want to give feedback (in form of a javascript message) upon partial
 completion of the operation, therefore I am using a jQuery notifications
 plugin (http://www.programmingmind.com/contributions).
 
 So, what I do is the following:
 
 final Form form = new Form(form);
 add(form);
 
 form.add(new AjaxButton(button) {
 @Override
 protected void onSubmit(AjaxRequestTarget target, Form? form) {
 for(Object o : someList) {
 // do somthing
 target.appendJavascript(getJavascript());
 }
 target.addComponent(form);
 }
 });
 
 
 ... but obviously, the Javascript messages are only display at the end of
 the complete operation (after foreach loop has finished). So my question:
 what should I do to get the messages displayed after each iteration?
 
-Tom
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/How-to-give-feedback-in-long-running-operation-within-AjaxButton.onSubmit%28%29--tp28182827p28184788.html
Sent from the Wicket - User 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: Javascript Compression not working.

2010-04-07 Thread Alex Objelean

You could take a look at wro4j: http://code.google.com/p/wro4j/ . It helps
you keep you javascripts (and css) organized in a single location, merge and
minimize them. It is also very easy configurable
(http://code.google.com/p/wro4j/wiki/GettingStarted) and extensible (allow
provide your own implementation of js or css minification algorithm). Also
it provides a maven plugin (http://code.google.com/p/wro4j/wiki/MavenPlugin)
for build time merging and minification. You can see a complete list of
features here: http://code.google.com/p/wro4j/wiki/Features

Alex


AppleGrew wrote:
 
 Hi All,
 
 I have put all my JS files in WEB-INF. To let Wicket find them I have
 created my own ResourceStreamLocator. The locator on getting class scope
 as
 Application simply locates the JS files from 'WEB-INF/js'. The problem is
 how do I enable Wicket's built-in Javascript compression?
 
 I tried the following code with a form:-
 add(JavascriptPackageResource.getHeaderContribution(ApplicationCore.class,
 js/form.js));
 
 I can still see the white spaces in the JS code when I try to access them
 from my browser. Pls guide.
 
 Regards,
 Apple Grew
 my blog @ http://blog.applegrew.com/
 
 

-- 
View this message in context: 
http://old.nabble.com/Javascript-Compression-not-working.-tp28164115p28166133.html
Sent from the Wicket - User 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: Javascript Compression not working.

2010-04-07 Thread Alex Objelean

Actually you don't have to access the resources. The wro filter  just handles
the request for static resources, there no wicket specific integration. All
you have to do, is to define the location of your resources in wro.xml
(group descriptor). The location of resources can be virtually anything:
external url, relative to servlet context, classpath or file resources
(http://code.google.com/p/wro4j/wiki/ResourceTypes). 

I pretty sure there is no way to 'ask' wicket to gzip and minimize external
resources, because wicket doesn't control them.

Alex 


AppleGrew wrote:
 
 Checked it out. This is good, but I am not sure how to integrate this with
 Wicket. Currently it seems that WRO's url is being override by
 WicketFilter,
 so I am not being able to access WRO resources.
 
 BTW going back to original problem. I tired to debug the Wicket code and
 it
 seems for shared resources the SharedResourceRequestTraget simply invokes
 PackageResource, while for non globally shared resources
 JavascriptPackageResource is invoked. JavascriptPackageResource  seems to
 be
 responsible for gzipping and minizing JS code. Not sure how do I 'ask'
 Wicket to do the same for globally resources.
 
 Regards,
 Apple Grew
 my blog @ http://blog.applegrew.com/
 
 
 On Wed, Apr 7, 2010 at 8:20 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 You could take a look at wro4j: http://code.google.com/p/wro4j/ . It
 helps
 you keep you javascripts (and css) organized in a single location, merge
 and
 minimize them. It is also very easy configurable
 (http://code.google.com/p/wro4j/wiki/GettingStarted) and extensible
 (allow
 provide your own implementation of js or css minification algorithm).
 Also
 it provides a maven plugin (
 http://code.google.com/p/wro4j/wiki/MavenPlugin)
 for build time merging and minification. You can see a complete list of
 features here: http://code.google.com/p/wro4j/wiki/Features

 Alex


 AppleGrew wrote:
 
  Hi All,
 
  I have put all my JS files in WEB-INF. To let Wicket find them I have
  created my own ResourceStreamLocator. The locator on getting class
 scope
  as
  Application simply locates the JS files from 'WEB-INF/js'. The problem
 is
  how do I enable Wicket's built-in Javascript compression?
 
  I tried the following code with a form:-
 
 add(JavascriptPackageResource.getHeaderContribution(ApplicationCore.class,
  js/form.js));
 
  I can still see the white spaces in the JS code when I try to access
 them
  from my browser. Pls guide.
 
  Regards,
  Apple Grew
  my blog @ http://blog.applegrew.com/
 
 

 --
 View this message in context:
 http://old.nabble.com/Javascript-Compression-not-working.-tp28164115p28166133.html
 Sent from the Wicket - User 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


 
 

-- 
View this message in context: 
http://old.nabble.com/Javascript-Compression-not-working.-tp28164115p28167755.html
Sent from the Wicket - User 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: URL Encoding strategy

2010-04-07 Thread Alex Objelean

Hi Eric!
I've noticed that you have already posted the solution on your blog
(http://blog.jteam.nl/2010/02/24/wicket-root-mounts/). Thank you for sharing
it with us. 

One question, why BookmarkablePageRequestTargetUrlCodingStrategy#encode
method is still final even in wicket-1.4.7 if there is a good use-case for
extending it?

Also, maybe you could add this contribution to wicket core or at least
wicket-extension?

Thank you!
Alex Objelean
 

Erik van Oosten wrote:
 
 Hi Nishant,
 
 This is tricky stuff.
 
 Here is some information: 
 http://old.nabble.com/How-to-catch-unknown-%28not-mounted%29-URLs--td14949092.html
 Another approach is to do redirects from a servlet filter.
 
 If you have a couple of days of patience I'll have finished a blog 
 article on it, with example code to make it a lot easier from within
 Wicket.
 
 Regards,
  Erik.
 
 Op 20-02-10 11:07, Nishant Neeraj wrote:
 Hi,

 I wanted to apply URL encoding strategy to application context root but I
 cant mount empty string because it throws exception at start-up.
 Is there a work around to this?

 Regards
 Nishant

 
 -- 
 Posted from my SMTP compliant software.
 Erik van Oosten
 http://www.day-to-day-stuff.blogspot.com/
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/URL-Encoding-strategy-tp27664942p28169418.html
Sent from the Wicket - User 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: css resources location

2010-03-25 Thread Alex Objelean

You may want to consider a different approach: wro4j
(http://code.google.com/p/wro4j/wiki/GettingStarted). It can help you to
keep all you resources organized, minimized  merged.

Alex Objelean


pochoclo wrote:
 
 
 
 
 Hi , i'm new to wicket . I been searching in the list archive for css
 resource problems but i can't found a solution .
 My app is developed under netbeans and there's no way to make de css (
 file or html embedded ) to work with wicket .
 I try almost every way that i found on the archive of this list , but
 nothing work.
 When i preview the html in the browser everything is ok , css ,images etc
 , but when i deploy to tomcat only css is rendered ok , images are not
 showed.
 
 here is what i've used :
 
 1 - css embedded in the html file , css is ok but images are no showed , i
 try almost every path ( background-image : url( ) ... ) posible to the
 images , same as the html and java  files , web folder , web-inf , image
 folder , resources ,etc. I check that resource images are in the war file.
 
 2- wicket:head tag with headercontributor.forcss(...) , css and images
 not working at all in every folder of the app.
 
 
 I try almost every solution found on the mail list , nothing works to show
 the images , so now i'm lost , the most basic solution was put all the css
 code in the html file and nothing.
 
 here is the tree of the app in netbeans :
 
 Shirosecurity -
 
   -web pages
 
-meta-inf
-web-inf
 
   -configuration files
 
   -server resources
  
   -sourcepackages
 
-com.myapp.wicket
 
--- java and html files
 
   -test packages
 
   -libraries
 
 
 i would apreciate any help on this.
 
 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 _
 Mirá tus emails ¡cuando te llegan! Hotmail actualiza tu bandeja de entrada
 automáticamente. Ver más
 http://www.descubrewindowslive.com/hotmail/actualizacion-guardado.asp
 

-- 
View this message in context: 
http://old.nabble.com/css-resources-location-tp28032076p28034191.html
Sent from the Wicket - User 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: Bug related to WICKET-2657 in 1.4.x branch

2010-02-17 Thread Alex Objelean

Issue created  quickstart attached:

https://issues.apache.org/jira/browse/WICKET-2751



martin-g wrote:
 
 On Wed, 2010-02-17 at 11:18 +0200, Objelean Alex wrote:
 I've tested my code with latest 1.4.x branch version in chrome, and
 apparently there is another problem with this:
 - if AjaxSubmitLink adds to the target some component to be refreshed,
 then
 it will disappear. This can be reproduced only in Chrome (v 5.. probably
 the
 same problem is with v. 4). In Firefox everything is ok.
 As always a quickstart will be in help!
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Bug-related-to-WICKET-2657-in-1.4.x-branch-tp27620933p27624306.html
Sent from the Wicket - User 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: Bookmarkable link url is broken in 1.4.6 after ajax update

2010-02-07 Thread Alex Objelean

I've noticed that WICKET-2491 is marked as resolved. But I checked against
latest version from branch-1.4.x and it doesn't seem to be fixed. Is the
tested version wrong? Or should the issue be reopened?

Alex Objelean


Alexandru Objelean wrote:
 
 The wicket-1.4.6 release contains a fix for WICKET-2312, which is a great
 thing. But apparently it breaks Bookmarkable link url in situation when it
 is updated by ajax. I'm not sure if this description is enough for fast
 reproduction, but I will try to add a quickstart asap and will open a JIRA
 issue.
 
 This issue is pretty critical. I cannot migrate the application to
 wicket-1.4.6 because of it.
 
 Thank you!
 
 

-- 
View this message in context: 
http://old.nabble.com/Bookmarkable-link-url-is-broken-in-1.4.6-after-ajax-update-tp27439970p27489240.html
Sent from the Wicket - User 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: Bookmarkable link url is broken in 1.4.6 after ajax update

2010-02-07 Thread Alex Objelean

Have you tried to use latest version from branch-1.4.x?



vineet semwal wrote:
 
 afaik,it's working correctly after the fix(2717),atleast i can't reproduce
 the problem .
 
 On Sun, Feb 7, 2010 at 8:16 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 I've noticed that WICKET-2717 is marked as resolved. But I checked
 against
 latest version from branch-1.4.x and it doesn't seem to be fixed. Is the
 tested version wrong? Or should the issue be reopened?

 Alex Objelean


 Alexandru Objelean wrote:
 
  The wicket-1.4.6 release contains a fix for WICKET-2312, which is a
 great
  thing. But apparently it breaks Bookmarkable link url in situation when
 it
  is updated by ajax. I'm not sure if this description is enough for fast
  reproduction, but I will try to add a quickstart asap and will open a
 JIRA
  issue.
 
  This issue is pretty critical. I cannot migrate the application to
  wicket-1.4.6 because of it.
 
  Thank you!
 
 

 --
 View this message in context:
 http://old.nabble.com/Bookmarkable-link-url-is-broken-in-1.4.6-after-ajax-update-tp27439970p27489240.html
 Sent from the Wicket - User 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


 
 
 -- 
 regards,
 Vineet Semwal
 
 

-- 
View this message in context: 
http://old.nabble.com/Bookmarkable-link-url-is-broken-in-1.4.6-after-ajax-update-tp27439970p27489843.html
Sent from the Wicket - User 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: Bookmarkable link url is broken in 1.4.6 after ajax update

2010-02-07 Thread Alex Objelean

Hmm... I didn't try your quickstart, I thought it was exactly the same as
mine. It is very probable that there is another use-case which is broken..
I'll investigate it  eventually post another quickstart.

Alex Objelean


vineet semwal wrote:
 
 yes i am using 1.4.x,do you still see the  broken link in the quickstart i
 have posted?
 the link will be broken in the quickstart if you click on the  button in
 1.4.6 but after the fix in 1.4.x
 it's working correctly.
 
 On Sun, Feb 7, 2010 at 9:25 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 Have you tried to use latest version from branch-1.4.x?



 vineet semwal wrote:
 
  afaik,it's working correctly after the fix(2717),atleast i can't
 reproduce
  the problem .
 
  On Sun, Feb 7, 2010 at 8:16 PM, Alex Objelean
  alex_objel...@yahoo.comwrote:
 
 
  I've noticed that WICKET-2717 is marked as resolved. But I checked
  against
  latest version from branch-1.4.x and it doesn't seem to be fixed. Is
 the
  tested version wrong? Or should the issue be reopened?
 
  Alex Objelean
 
 
  Alexandru Objelean wrote:
  
   The wicket-1.4.6 release contains a fix for WICKET-2312, which is a
  great
   thing. But apparently it breaks Bookmarkable link url in situation
 when
  it
   is updated by ajax. I'm not sure if this description is enough for
 fast
   reproduction, but I will try to add a quickstart asap and will open
 a
  JIRA
   issue.
  
   This issue is pretty critical. I cannot migrate the application to
   wicket-1.4.6 because of it.
  
   Thank you!
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/Bookmarkable-link-url-is-broken-in-1.4.6-after-ajax-update-tp27439970p27489240.html
  Sent from the Wicket - User 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
 
 
 
 
  --
  regards,
  Vineet Semwal
 
 

 --
 View this message in context:
 http://old.nabble.com/Bookmarkable-link-url-is-broken-in-1.4.6-after-ajax-update-tp27439970p27489843.html
 Sent from the Wicket - User 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


 
 
 -- 
 regards,
 Vineet Semwal
 
 

-- 
View this message in context: 
http://old.nabble.com/Bookmarkable-link-url-is-broken-in-1.4.6-after-ajax-update-tp27439970p27490228.html
Sent from the Wicket - User 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: Bug with setResponsePage and PageParameters for wicket 1.4.6?

2010-02-06 Thread Alex Objelean

I think it is a know bug (http://issues.apache.org/jira/browse/WICKET-2717)
and was is already fixed in trunk. Hopefully there will be a 1.4.7 release
very soon.

Alex Objelean


fatefree wrote:
 
 I noticed something strange, I have a search panel on all pages that
 contains a single form like so:
 
   final FormSearchParams searchForm = new
 StatelessFormSearchParams(searchForm, model) {
   @Override
   protected void onSubmit() {
   String query = getModelObject().getQuery();
   setResponsePage(SearchResultsPage.class, new 
 PageParameters(
   SearchResultsPage.PARAM_QUERY + 
 = + query));
   setRedirect(true);
   }
   };
 
 My SearchResultsPage is mapped to /search, so after a query i get
 redirected to /search/query/some+query. After the first submit
 everything works (the submit is happening from a different page), I
 get the redirect and see the results. But then if I try to use the
 form from that page, I get redirected with the previous search params
 in the url, like so: /search/query/search/query/second+query. Im not
 sure how this is happening since I am passing a class and new page
 parameters. The String query inside the onSubmit has the correct
 value, its not appending any of the previous parameters, and besides,
 this only happens with 1.4.6. I tried it on 1.4.4 and 1.4.5 and it
 worked fine with the same code. Any ideas?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Bug-with-setResponsePage-and-PageParameters-for-wicket-1.4.6--tp27475350p27481276.html
Sent from the Wicket - User 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: Loading resources (CSS,JS) from JARs ?

2010-02-04 Thread Alex Objelean


Or you can use wro4j (http://code.google.com/p/wro4j/wiki/GettingStarted)
for this. It is a small framework which helps you organize your resources
(js  css) by loading from virtually anywhere (classpath, servletContext,
absolute location, disc location, etc). Also, it merge all the resources
into a single resource, thus limiting the number of requests and optimizing
the response time.

Regards,
Alex Objelean


Umanga wrote:
 
 Greetings,
 
 While playing around with wicket-stuffminis , I noticed that the Moontip 
 load its CSS,JavaScript from the class path (wicketstuff-minis.jar)
 eg: 
 http://localhost:8080/minis-examples/resources/org.wicketstuff.minis.mootipbehavior.MootipBehaviour/mootools.v1.11.js
 -which I couldnt find in the 'webapp' folder ,but in 
 'minis-1.4.2-SNAPSHOT-javadoc.jar' file.
 
 I was wondering,can I bundle my CSS,Js into JARs like this,without 
 copying into  'webapp' folder?
 How does wicket process this ? Is it the path 'resources/' ?
 
 Thanks
 umanga
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Loading-resources-%28CSS%2CJS%29-from-JARs---tp27446557p27449175.html
Sent from the Wicket - User 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 1.4.5 : Spring integration problem?

2010-01-20 Thread Alex Objelean

You could try the wicket-spring library. It allows a very nice integration
using a SpringBean annotation, similar to Autowired from spring.

Alex


Umanga wrote:
 
 Thanks Pierre,
 
 yes,that was a problem with web.xml ,
 
 I forgot to change the filter setting :
 
 init-param
 param-nameapplicationFactoryClassName/param-name
 
 param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
 /init-param
 
 Now everything works fine.
 
 Pierre Goupil wrote:
 Maybe it comes from the web.xml : can we ses it, please?

 Regards,

 Pierre


 On Wed, Jan 20, 2010 at 7:41 AM, Ashika Umanga Umagiliya 
 auma...@biggjapan.com wrote:

   
 Greetings all,

 I followed the easy 'Application Object Approach' to integrate Spring
 with
 my Wicket app. (
 http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach)

 In my application class :

 public class NihonBareApplication extends WebApplication
 { private CommonService commonService;
   public CommonService getCommonService() {
   return commonService;
   }
   public void setCommonService(CommonService cs) {
 this.commonService = cs; }
 }


 And in my pages :

 public class FamiliesPage extends WebPage {
  public CommonService getCommonService(){
   System.out.println(+
 ((NihonBareApplication)getApplication()).getCommonService());
   return
 ((NihonBareApplication)getApplication()).getCommonService();
   }
 }


 But eventhough the bean injected into 'NihonbareApplication' object, the
 getCommonService() method of my page returns null for the bean.

 What could be the problem?

 Thanks in advance.

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


 


   
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Wicket-1.4.5-%3A-Spring-integration-problem--tp27237445p27238481.html
Sent from the Wicket - User 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: [BUG] RequestUtils.toAbsolutePath() for ajax requests

2010-01-17 Thread Alex Objelean

I've noticed that this issue is still present in 1.4.5. There is also a jira
issue which wasn't assigned yet:
http://issues.apache.org/jira/browse/WICKET-2312 and it has a patch attached
also.

Is there any chance for this bug being fixed in 1.4.6?

Thanks!
Alex Objelean


Alexandru Objelean wrote:
 
 I have a use-case, when I want to render absolute url for some images
 using
 a shared resource.
 The absolute url looks like this:
 http://localhost:8080/resources/org.apache.wicket.Application/com.mysite.web.util.resource.ProductImageResource?id=47331bd95fa69f7f001-main.jpg
 
 Everything works fine, except when the panel containing these images is
 updated via ajax. In this case, the absolute url looks like
 this:
 resources/org.apache.wicket.Application/com.mysite.web.util.resource.ProductImageResource?id=47449058d8e54c7f001-main.jpg
 
 The problem is dependent on UrlCodingStrategy used. For instance, there is
 no problem if QueryStringUrlCodingStrategy is used. On the other hand,
 when BookmarkablePageRequestTargetUrlCodingStrategy
 or MixedParamUrlCodingStrategy is used, then the problem can be
 reproduced.
 
 It is very probable, that when using this kind of url coding strategies,
 the
 algorithm of computing absolute url's should be slightly different.
 
 Alex Objelean
 
 

-- 
View this message in context: 
http://old.nabble.com/-BUG--RequestUtils.toAbsolutePath%28%29-for-ajax-requests-tp26872309p27202742.html
Sent from the Wicket - User 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: Location of css and js files

2009-12-21 Thread Alex Objelean


Hi!
You can use wro4j to load css  js resources from anywhere (even from
classpath, servlet context relative location or disc location). Another
advantage is that the resources are merged and minified, thus greatly
improving the response time:
http://code.google.com/p/wro4j/wiki/GettingStarted

Alex Objelean


dale77 wrote:
 
  
 Hi Alex,
 
 I'm after best practice for css/img and js locations. 
 
 I know there are many ways to do something, I'm after a recommendation
 as to what is the best way to do this in wicket. 
 
 The way that allows the html markup to be opened by the web designer
 showing the same page view that appears at runtime.
 
 Thanks
 
 Dale
 
 
 -Original Message-
 From: Alex Rass [mailto:a...@itbsllc.com] 
 Sent: Monday, 21 December 2009 5:03 p.m.
 To: users@wicket.apache.org
 Subject: RE: Location of css and js files
 
 Global resources you can reference globally. Use can use the
 non-wicket links. Container hosts folders you can use.
 
 Idea behind this is to use components which are fully contained. Hence
 (all in one place).  If this doesn't suit you - there are bunch of
 tutorials on how to load resources from elsewhere.
 
 - Alex
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/-announce--wicket-1.4.5-released-tp26868988p26871530.html
Sent from the Wicket - User 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: single-page, multi-panel, pretty URL webapp

2009-12-18 Thread Alex Objelean

There is no such thing like 'panel mounting'. All you can do, is to encode
the state into url using PageParams  restore the page based on those
parameters.

Alex


Stefan Jozsa-2 wrote:
 
 My application is a single-page multiple-panel (heavy AJAX) webapp
 (except the login page).
 
 Part of page is almost constant, is expensive to instantiate/refresh
 and cannot be (always) refreshed (having embedded Flash player).
 
 Rest of page is a panel and is populated succesively with
 'addOrReplace(somePanel)' according to UI/user actions.
 
 What I want to achieve (after login) is
 something like 'panel mounting', that is:
 
 http://myDomain.com/myApp/ = 
 instantiate MyPage and set as content-panel new HomePanel()
 
 Typing 'whoknows' in search field and clicking 'Search' button:
 URL: http://myDomain.com/myApp/search?k=whoknows
 action: just set as content-panel new SearchPanel(whoknows)
 
 Clicking artist Hendrix in search panel:
 URL: http://myDomain.com/myApp/artist?k=123456789 =
 action: just set as content-panel new ArtistPanel(123456789)
 
 so that can navigate using browser's back/forth.
 
 How this can be done?
 Thanks in advance,
 Stefan
 
 
 
   
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/single-page%2C-multi-panel%2C-pretty-URL-webapp-tp26843002p26843501.html
Sent from the Wicket - User 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: single-page, multi-panel, pretty URL webapp

2009-12-18 Thread Alex Objelean

Actually, what I mean is that based on page parameters you encode into url,
you can take the decision of what panel to show, or how it should behave. It
all depends on your application. 

Alex


Stefan Jozsa-2 wrote:
 
 I know that is no such thing like 'panel mounting',
 this is my problem !
 
 I can encode arguments as PageParameters, but after ?
 What you mean saying restore the page based on those params ?
 
 Thanks,
 Stefan
 
 --- On Fri, 12/18/09, Alex Objelean alex_objel...@yahoo.com wrote:
 
 From: Alex Objelean alex_objel...@yahoo.com
 Subject: Re: single-page, multi-panel, pretty URL webapp
 To: users@wicket.apache.org
 Date: Friday, December 18, 2009, 3:36 PM
 
 There is no such thing like 'panel mounting'. All you can
 do, is to encode
 the state into url using PageParams  restore the page
 based on those
 parameters.
 
 Alex
 
 
 Stefan Jozsa-2 wrote:
  
  My application is a single-page multiple-panel (heavy
 AJAX) webapp
  (except the login page).
  
  Part of page is almost constant, is expensive to
 instantiate/refresh
  and cannot be (always) refreshed (having embedded
 Flash player).
  
  Rest of page is a panel and is populated succesively
 with
  'addOrReplace(somePanel)' according to UI/user
 actions.
  
  What I want to achieve (after login) is
  something like 'panel mounting', that is:
  
  http://myDomain.com/myApp/ = 
      instantiate MyPage and set as
 content-panel new HomePanel()
  
  Typing 'whoknows' in search field and clicking
 'Search' button:    
      URL: http://myDomain.com/myApp/search?k=whoknows
      action: just set as
 content-panel new SearchPanel(whoknows)
      
  Clicking artist Hendrix in search panel:
      URL: http://myDomain.com/myApp/artist?k=123456789 =
      action: just set as
 content-panel new ArtistPanel(123456789)
      
  so that can navigate using browser's back/forth.
  
  How this can be done?
  Thanks in advance,
  Stefan
  
  
  
        
  
 
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
 -- 
 View this message in context:
 http://old.nabble.com/single-page%2C-multi-panel%2C-pretty-URL-webapp-tp26843002p26843501.html
 Sent from the Wicket - User 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
 
 
 

-- 
View this message in context: 
http://old.nabble.com/single-page%2C-multi-panel%2C-pretty-URL-webapp-tp26843002p26843700.html
Sent from the Wicket - User 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: Pretty URLs and sessions

2009-12-17 Thread Alex Objelean

There are two possibilities:
1) In your application class add the following:
mount(new HybridUrlCodingStrategy(/checkout, CheckoutPage.class));

2) If you have wicket-stuff annotation dependency
(http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-annotation)
you can annotate your page class with: 

@MountPath(path=/checkout)
@MountHybrid
public class CheckoutPage extends WebPage {}

Alex 



V. Jenks wrote:
 
 Thanks Alex.
 
 I just had another meeting w/ the SEO guy today and the idea is to track
 orders moving through our storefront in order go gauge sales based on the
 SEO strategy.  In other words, where did our customers come from (Google
 search?), what did they buy, and did they make it all the way through the
 checkout process.  We need to be able to track pages in Google Analytics.
 
 If we could append/prepend some sort of value to the pages, while keeping
 the dynamic Wicket page version parameter info in there, it would be
 sufficient.  In Analytics, the Wicket portion of the URL can be removed
 and
 the rest would be used to identify traffic moving through the site.
 
 Is HybridUrlCodingStrategy the way to go, with this in mind?  Where are
 some
 good examples as to how to implement it and do what I'm describing?
 
 Thanks again!
 
 -v
 
 On Tue, Dec 1, 2009 at 6:04 AM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 You can mount your page with HybridUrlCodingStrategy. This way, even
 session
 relative url's will be SEO friendly.

 But you must be aware of one thing, it makes sense to make SEO only
 bookmarkable pages (stateless pages). It is meaningless to make SEO aware
 session relative pages, because these will be shown as expired when
 somebody
 else will use these links.

 Regards,
 Alex Objelean


 V. Jenks wrote:
 
  I'm working on some changes for our storefront (Wicket 1.4, Java EE 5,
  Glassfish 2.1) based on some recommendations made to us by an SEO
  consultant.  One of them is re-writing some of the URLs so as to have
 them
  indexed by Google, etc.
 
  My concern is the Wicket WebSession that I use to pass around an
 instance
  of
  a stateful session bean.  If I redirect to a mounted bookmarkable page
  when
  going through pages in the checkout process, vs redirecting to a new
  instances of the page class, will there be any adverse effects on the
  session?  Will customers experience a problem with their shopping cart
  sessions?
 
  Thanks!
 
 

 --
 View this message in context:
 http://old.nabble.com/%22Pretty%22-URLs-and-sessions-tp26581608p26591380.html
 Sent from the Wicket - User 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


 
 

-- 
View this message in context: 
http://old.nabble.com/%22Pretty%22-URLs-and-sessions-tp26581608p26833349.html
Sent from the Wicket - User 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: Pretty URLs and sessions

2009-12-17 Thread Alex Objelean

Also, it could be useful to check this out:
http://day-to-day-stuff.blogspot.com/2008/10/wicket-extreme-consistent-urls.html

Alex 


V. Jenks wrote:
 
 Excellent, excellent!  This is exactly what I was after!  That is...unless
 this SEO can find another monkey wrench to throw in it.  But...it looks
 like
 it's exactly what I need.  Thanks!
 
 Alex R. - good point on tracking info internally.  I think it'd be very
 useful but I'm dealing w/ the marketing dept.  They're so wowed by GA, I
 doubt there's any turning back.
 
 Thanks guys.
 
 On Thu, Dec 17, 2009 at 12:08 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 There are two possibilities:
 1) In your application class add the following:
 mount(new HybridUrlCodingStrategy(/checkout, CheckoutPage.class));

 2) If you have wicket-stuff annotation dependency
 (
 http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-annotation
 )
 you can annotate your page class with:

 @MountPath(path=/checkout)
 @MountHybrid
 public class CheckoutPage extends WebPage {}

 Alex



 V. Jenks wrote:
 
  Thanks Alex.
 
  I just had another meeting w/ the SEO guy today and the idea is to
 track
  orders moving through our storefront in order go gauge sales based on
 the
  SEO strategy.  In other words, where did our customers come from
 (Google
  search?), what did they buy, and did they make it all the way through
 the
  checkout process.  We need to be able to track pages in Google
 Analytics.
 
  If we could append/prepend some sort of value to the pages, while
 keeping
  the dynamic Wicket page version parameter info in there, it would be
  sufficient.  In Analytics, the Wicket portion of the URL can be removed
  and
  the rest would be used to identify traffic moving through the site.
 
  Is HybridUrlCodingStrategy the way to go, with this in mind?  Where are
  some
  good examples as to how to implement it and do what I'm describing?
 
  Thanks again!
 
  -v
 
  On Tue, Dec 1, 2009 at 6:04 AM, Alex Objelean
  alex_objel...@yahoo.comwrote:
 
 
  You can mount your page with HybridUrlCodingStrategy. This way, even
  session
  relative url's will be SEO friendly.
 
  But you must be aware of one thing, it makes sense to make SEO only
  bookmarkable pages (stateless pages). It is meaningless to make SEO
 aware
  session relative pages, because these will be shown as expired when
  somebody
  else will use these links.
 
  Regards,
  Alex Objelean
 
 
  V. Jenks wrote:
  
   I'm working on some changes for our storefront (Wicket 1.4, Java EE
 5,
   Glassfish 2.1) based on some recommendations made to us by an SEO
   consultant.  One of them is re-writing some of the URLs so as to
 have
  them
   indexed by Google, etc.
  
   My concern is the Wicket WebSession that I use to pass around an
  instance
   of
   a stateful session bean.  If I redirect to a mounted bookmarkable
 page
   when
   going through pages in the checkout process, vs redirecting to a new
   instances of the page class, will there be any adverse effects on
 the
   session?  Will customers experience a problem with their shopping
 cart
   sessions?
  
   Thanks!
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/%22Pretty%22-URLs-and-sessions-tp26581608p26591380.html
  Sent from the Wicket - User 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
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/%22Pretty%22-URLs-and-sessions-tp26581608p26833349.html
 Sent from the Wicket - User 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


 
 

-- 
View this message in context: 
http://old.nabble.com/%22Pretty%22-URLs-and-sessions-tp26581608p26835013.html
Sent from the Wicket - User 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: Pretty URLs and sessions

2009-12-17 Thread Alex Objelean

You shouldn't have a code like this:
  getRequestCycle().setRedirect(false); 
  getRequestCycle().setRequestTarget(EmptyRequestTarget.getInstance()); 
  getResponse().redirect( 
https://mysite/app/?wicket:bookmarkablePage=:com.myapp.UserAccount;); 

A more 'wicket way' of doing thins is this:

setResponsePage(UserAccount.class);

That means that a bookmarkable page will be created (a new instance of the
page will be instantiated).
You can also do something like this: 

setResponsePage(new UserAccount(account));

Or you could try to make this page as stateless as possible by passing
account id or other parameters to the page that depends..

Alex 


V. Jenks wrote:
 
 Hit a snag!  At the cart page (going into the login page), I redirect to
 https like so:
 
   getRequestCycle().setRedirect(false);
  
 getRequestCycle().setRequestTarget(EmptyRequestTarget.getInstance());
   getResponse().redirect(https://mysite/app/account;);
 
 user-account being mapped like so in the app class:
 
 mount(new HybridUrlCodingStrategy(/account, UserAccount.class));
 
 ...gets me this exception:
 
 org.apache.wicket.WicketRuntimeException: Can't instantiate page using
 constructor public com.agribeef.abcommerce.ui.UserAccount()
 at
 org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
 at
 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:299)
 at
 org.apache.wicket.request.target.coding.HybridUrlCodingStrategy$HybridBookmarkablePageRequestTarget.newPage(HybridUrlCodingStrategy.java:887)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:321)
 at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
 at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
 at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
 ...
 Caused by: java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at
 org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
 ... 40 more
 Caused by: java.lang.NullPointerException
 at com.myapp.UserAccount.init(UserAccount.java:44)
 ... 45 more
 
 ...which is of course, where I try to reference the stateful bean
 (ShoppingCartBean) that I'm passing around.
 
 Prior to now, I just did this:
 
   getRequestCycle().setRedirect(false);
  
 getRequestCycle().setRequestTarget(EmptyRequestTarget.getInstance());
   getResponse().redirect(
 https://mysite/app/?wicket:bookmarkablePage=:com.myapp.UserAccount;);
 
 I could stick with that I guess, since it's trackable.  It would have been
 nice to use the Hybrid approach consistently, though.
 
 -v
 
 
 On Thu, Dec 17, 2009 at 2:12 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 Also, it could be useful to check this out:

 http://day-to-day-stuff.blogspot.com/2008/10/wicket-extreme-consistent-urls.html

 Alex


 V. Jenks wrote:
 
  Excellent, excellent!  This is exactly what I was after!  That
 is...unless
  this SEO can find another monkey wrench to throw in it.  But...it looks
  like
  it's exactly what I need.  Thanks!
 
  Alex R. - good point on tracking info internally.  I think it'd be very
  useful but I'm dealing w/ the marketing dept.  They're so wowed by GA,
 I
  doubt there's any turning back.
 
  Thanks guys.
 
  On Thu, Dec 17, 2009 at 12:08 PM, Alex Objelean
  alex_objel...@yahoo.comwrote:
 
 
  There are two possibilities:
  1) In your application class add the following:
  mount(new HybridUrlCodingStrategy(/checkout, CheckoutPage.class));
 
  2) If you have wicket-stuff annotation dependency
  (
 
 http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-annotation
  )
  you can annotate your page class with:
 
  @MountPath(path=/checkout)
  @MountHybrid
  public class CheckoutPage extends WebPage {}
 
  Alex
 
 
 
  V. Jenks wrote:
  
   Thanks Alex.
  
   I just had another meeting w/ the SEO guy today and the idea is to
  track
   orders moving through our storefront in order go gauge sales based
 on
  the
   SEO strategy.  In other words, where did our customers come from
  (Google
   search?), what did they buy, and did they make it all the way
 through
  the
   checkout process.  We

Re: Pretty URLs and sessions

2009-12-17 Thread Alex Objelean

Though I didn't use it, there is HttpsRequestCycleProcessor (you should add
it in your Application) and @RequireHttps annotation (for each WebPage which
must be accessed through SSL) which should make this work.

Alex


V. Jenks wrote:
 
 Yes I know, I do this most of the time.  However, I'm redirecting from
 http
 to https.  When I wrote this app, this was what everyone was recommending.
 Is there another way?
 
 On Thu, Dec 17, 2009 at 2:45 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 You shouldn't have a code like this:
   getRequestCycle().setRedirect(false);
 
 getRequestCycle().setRequestTarget(EmptyRequestTarget.getInstance());
  getResponse().redirect(
 https://mysite/app/?wicket:bookmarkablePage=:com.myapp.UserAccount;);

 A more 'wicket way' of doing thins is this:

 setResponsePage(UserAccount.class);

 That means that a bookmarkable page will be created (a new instance of
 the
 page will be instantiated).
 You can also do something like this:

 setResponsePage(new UserAccount(account));

 Or you could try to make this page as stateless as possible by passing
 account id or other parameters to the page that depends..

 Alex


 V. Jenks wrote:
 
  Hit a snag!  At the cart page (going into the login page), I redirect
 to
  https like so:
 
getRequestCycle().setRedirect(false);
 
  getRequestCycle().setRequestTarget(EmptyRequestTarget.getInstance());
getResponse().redirect(https://mysite/app/account;);
 
  user-account being mapped like so in the app class:
 
  mount(new HybridUrlCodingStrategy(/account, UserAccount.class));
 
  ...gets me this exception:
 
  org.apache.wicket.WicketRuntimeException: Can't instantiate page using
  constructor public com.agribeef.abcommerce.ui.UserAccount()
  at
 
 org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
  at
 
 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
  at
 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:299)
  at
 
 org.apache.wicket.request.target.coding.HybridUrlCodingStrategy$HybridBookmarkablePageRequestTarget.newPage(HybridUrlCodingStrategy.java:887)
  at
 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:321)
  at
 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
  at
 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
  at
 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
  ...
  Caused by: java.lang.reflect.InvocationTargetException
  at
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
  Method)
  at
 
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
  at
 
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
  at
 java.lang.reflect.Constructor.newInstance(Constructor.java:513)
  at
 
 org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
  ... 40 more
  Caused by: java.lang.NullPointerException
  at com.myapp.UserAccount.init(UserAccount.java:44)
  ... 45 more
 
  ...which is of course, where I try to reference the stateful bean
  (ShoppingCartBean) that I'm passing around.
 
  Prior to now, I just did this:
 
getRequestCycle().setRedirect(false);
 
  getRequestCycle().setRequestTarget(EmptyRequestTarget.getInstance());
getResponse().redirect(
  https://mysite/app/?wicket:bookmarkablePage=:com.myapp.UserAccount;);
 
  I could stick with that I guess, since it's trackable.  It would have
 been
  nice to use the Hybrid approach consistently, though.
 
  -v
 
 
  On Thu, Dec 17, 2009 at 2:12 PM, Alex Objelean
  alex_objel...@yahoo.comwrote:
 
 
  Also, it could be useful to check this out:
 
 
 http://day-to-day-stuff.blogspot.com/2008/10/wicket-extreme-consistent-urls.html
 
  Alex
 
 
  V. Jenks wrote:
  
   Excellent, excellent!  This is exactly what I was after!  That
  is...unless
   this SEO can find another monkey wrench to throw in it.  But...it
 looks
   like
   it's exactly what I need.  Thanks!
  
   Alex R. - good point on tracking info internally.  I think it'd be
 very
   useful but I'm dealing w/ the marketing dept.  They're so wowed by
 GA,
  I
   doubt there's any turning back.
  
   Thanks guys.
  
   On Thu, Dec 17, 2009 at 12:08 PM, Alex Objelean
   alex_objel...@yahoo.comwrote:
  
  
   There are two possibilities:
   1) In your application class add the following:
   mount(new HybridUrlCodingStrategy(/checkout,
 CheckoutPage.class));
  
   2) If you have wicket-stuff annotation dependency

Re: enclosure changes in 1.4.4

2009-12-12 Thread Alex Objelean

As far as I know, this the way it behaves in 1.4.4 is the correct behavior.
I've used it only when specifying the child of enclosure, not any other
component. Maybe there should be a vote about this.

Alex 


igor.vaynberg wrote:
 
 hrm, already two people stumbled into this. i was of the mind that the
 way it works now is the correct behavior, but i am starting to think
 maybe i was incorrect...
 
 -igor
 
 On Sat, Dec 12, 2009 at 12:39 PM, Vadim Tesis vad...@hotmail.com wrote:

 all,



 i just migrated to 1.4.4 from 1.4.3 and looks like enclosure
 functionality changed.  if enclosure doesn't have child element in it, it
 throws exception.

 for example following code works in 1.4.3



    ...

   wicket:enclosure child=link
       div.../div
   /wicket:enclosure
    # ... 

    ...



 but in 1.4.4 it throws exception (see below).

 is 1.4.4 functionality correct or 1.4.3?



 Thanks,

 Vadim



 [#|2009-12-12T12:54:04.546-0500|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=20;_ThreadName=httpSSLWorkerThread-80-0;|12:54:04,546
 ERROR org.apache.wicket.RequestCycle - Exception in rendering component:
 [MarkupContainer [Component id = enclosure-205]]
 org.apache.wicket.WicketRuntimeException: Exception in rendering
 component: [MarkupContainer [Component id = enclosure-205]]
  at org.apache.wicket.Component.renderComponent(Component.java:2656)
  at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
  at org.apache.wicket.Component.render(Component.java:2448)
  at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
  at
 org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureResolver.java:61)
  at
 org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
  at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
  at
 org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
  at
 org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501)
  at org.apache.wicket.Component.renderComponent(Component.java:2617)
  at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
  at org.apache.wicket.Component.render(Component.java:2448)
  at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
  at
 org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
  at
 org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501)
  at
 org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1936)
  at org.apache.wicket.Component.renderComponent(Component.java:2617)
  at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
  at org.apache.wicket.markup.html.form.Form.onRender(Form.java:2007)
  at org.apache.wicket.Component.render(Component.java:2448)
  at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414)
  at
 org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
  at
 org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501)
  at org.apache.wicket.Component.renderComponent(Component.java:2617)
  at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
  at org.apache.wicket.Component.render(Component.java:2448)
  at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
  at
 org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66)
  at
 org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
  at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
  at
 org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
  at
 org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501)
  at org.apache.wicket.Component.renderComponent(Component.java:2617)
  at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
  at org.apache.wicket.Component.render(Component.java:2448)
  at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
  at
 org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73)
  at
 org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
  at
 org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418)
  at
 org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577)
  at
 org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501)
  at org.apache.wicket.Component.renderComponent(Component.java:2617)
  at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512)
  at org.apache.wicket.Component.render(Component.java:2448)
  at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
  at
 org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66)
  at
 

Re: button in one panel can change the components in other panel ?

2009-12-08 Thread Alex Objelean

The simplest solution is to make your button a submit button, this way when
it clicked, the entire page will be  reloaded  components will render
according to their new state. 

The second approach can be using ajax. I prefer the approach described on
this blog:
http://techblog.molindo.at/2008/09/wicket-loose-coupling-of-componens-for-ajax-updates.html

Alex Objelean


Madhuri Garimella wrote:
 
 Hi,
 
 I need a help in wicket. I have a panel containing a button and another
 panel containing components. on click of the first panel button i want to
 change the second panel components. Is there any way to do that. Please
 reply ASAP.
 
 
 Regards
 Madhu.
 
 

-- 
View this message in context: 
http://old.nabble.com/button-in-one-panel-can-change-the-components-in-other-panel---tp26692926p26693609.html
Sent from the Wicket - User 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: Redirect after for submit, but not what you think

2009-12-08 Thread Alex Objelean

You don't have to expose your private panels. Just create a protected method
which handles the form submission  override it in inherited components.

Alex Objelean


rmoskal wrote:
 
 That's just what I don't want to do.  My forms live as private classes on
 a
 panel (one form per one style of panel).  I don't want to have to
 introduce
 n new panels to handle the case where I wan to do the redirect.  I was
 hoping I could do it in one place (kind of like an aop after advice :).
 ___
 Robert Moskal
 Most Media
 Brooklyn, USA
 347-529-4744
 
 
 On Tue, Dec 8, 2009 at 12:09 PM, Alex Rass a...@itbsllc.com wrote:
 
 So: always override onSumbit for the buttons and *sometimes* redirect.
 Tis all.

 - Alex

 -Original Message-
 From: Robert Moskal [mailto:rmos...@mostmedia.com]
 Sent: Tuesday, December 08, 2009 12:05 PM
 To: users@wicket.apache.org
 Subject: Redirect after for submit, but not what you think

 Hi all:

 I'd like to be able to redirect after I submit a form, basically I want
 my
 app to navigate to the next question in a survey after a user responds.
  But
 I don't want to do this in the onClick method of the form buttons,
 because
 I
 only want to do this sometimes.  In other words sometimes I want to
 deploy
 an application where I do the auto-navigation and sometimes I want the
 user
 to stay on the same page after submitting.

 The ideal place seems to be on the page level.  but it seems you can't
 call
 setResponsePage in the onDetach method.  Where in request life-cycle
 would
 be the place to do this sort of redirect?

 Thanks and regards,
 ___
 Robert Moskal
 Most Media
 Brooklyn, USA
 347-529-4744


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


 
 

-- 
View this message in context: 
http://old.nabble.com/Redirect-after-for-submit%2C-but-not-what-you-think-tp26697152p26697704.html
Sent from the Wicket - User 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: Redirect after for submit, but not what you think

2009-12-08 Thread Alex Objelean

You can define a default behavior (for instance no redirect after submit) 
apply redirect only for few pages. It is a nice solution... it reminds me
about template method design pattern.

Alex 


rmoskal wrote:
 
 I could do that, but would be nicer if I didn't have to touch n classes or
 create a class hierarchy for my Panel.  I don't like my Page knowing so
 much
 about what goes on in my Panels either.
 
 Thanks!
 
 Robert
 ___
 Robert Moskal
 Most Media
 Brooklyn, USA
 347-529-4744
 
 
 On Tue, Dec 8, 2009 at 12:44 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 You don't have to expose your private panels. Just create a protected
 method
 which handles the form submission  override it in inherited components.

 Alex Objelean


 rmoskal wrote:
 
  That's just what I don't want to do.  My forms live as private classes
 on
  a
  panel (one form per one style of panel).  I don't want to have to
  introduce
  n new panels to handle the case where I wan to do the redirect.  I was
  hoping I could do it in one place (kind of like an aop after advice :).
  ___
  Robert Moskal
  Most Media
  Brooklyn, USA
  347-529-4744
 
 
  On Tue, Dec 8, 2009 at 12:09 PM, Alex Rass a...@itbsllc.com wrote:
 
  So: always override onSumbit for the buttons and *sometimes* redirect.
  Tis all.
 
  - Alex
 
  -Original Message-
  From: Robert Moskal [mailto:rmos...@mostmedia.com]
  Sent: Tuesday, December 08, 2009 12:05 PM
  To: users@wicket.apache.org
  Subject: Redirect after for submit, but not what you think
 
  Hi all:
 
  I'd like to be able to redirect after I submit a form, basically I
 want
  my
  app to navigate to the next question in a survey after a user
 responds.
   But
  I don't want to do this in the onClick method of the form buttons,
  because
  I
  only want to do this sometimes.  In other words sometimes I want to
  deploy
  an application where I do the auto-navigation and sometimes I want the
  user
  to stay on the same page after submitting.
 
  The ideal place seems to be on the page level.  but it seems you can't
  call
  setResponsePage in the onDetach method.  Where in request life-cycle
  would
  be the place to do this sort of redirect?
 
  Thanks and regards,
  ___
  Robert Moskal
  Most Media
  Brooklyn, USA
  347-529-4744
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Redirect-after-for-submit%2C-but-not-what-you-think-tp26697152p26697704.html
 Sent from the Wicket - User 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


 
 

-- 
View this message in context: 
http://old.nabble.com/Redirect-after-for-submit%2C-but-not-what-you-think-tp26697152p26698038.html
Sent from the Wicket - User 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: Redirect after for submit, but not what you think

2009-12-08 Thread Alex Objelean

Wicket is unmanaged framework. I've never have seen a wicket code which would
use instantiation of panels using spring. I don't know I understand it... do
you have some special use-case? Can you describe it? My first thought is,
that this is some sort of over engineering which doesn't bring you any
advantage.

Alex 


rmoskal wrote:
 
 Thanks Alex.  It does seem a like a slightly old-fashioned way of doing
 things. My factory instantiates the Panels by reflection from the class
 name
 (kept in a spring file).  I personally don't know how to create an
 anonymous
 class when I instantiate something using the reflection api.  I suppose I
 could pass in an interface that is to be called by the onSubmit method or
 change the factory to create an anonymous subclass of my panels, but all
 this seems like a lot of work to accomplish such a simple thing.
 
 I will keep thinking on it and will post if I come up a less obtrusive way
 to handle this.  You have helped me focus my thoughts.
 
 Regards,
 
 Robert
 ___
 Robert Moskal
 Most Media
 Brooklyn, USA
 347-529-4744
 
 
 On Tue, Dec 8, 2009 at 1:05 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 You can define a default behavior (for instance no redirect after submit)
 
 apply redirect only for few pages. It is a nice solution... it reminds me
 about template method design pattern.

 Alex


 rmoskal wrote:
 
  I could do that, but would be nicer if I didn't have to touch n classes
 or
  create a class hierarchy for my Panel.  I don't like my Page knowing so
  much
  about what goes on in my Panels either.
 
  Thanks!
 
  Robert
  ___
  Robert Moskal
  Most Media
  Brooklyn, USA
  347-529-4744
 
 
  On Tue, Dec 8, 2009 at 12:44 PM, Alex Objelean
  alex_objel...@yahoo.comwrote:
 
 
  You don't have to expose your private panels. Just create a protected
  method
  which handles the form submission  override it in inherited
 components.
 
  Alex Objelean
 
 
  rmoskal wrote:
  
   That's just what I don't want to do.  My forms live as private
 classes
  on
   a
   panel (one form per one style of panel).  I don't want to have to
   introduce
   n new panels to handle the case where I wan to do the redirect.  I
 was
   hoping I could do it in one place (kind of like an aop after advice
 :).
   ___
   Robert Moskal
   Most Media
   Brooklyn, USA
   347-529-4744
  
  
   On Tue, Dec 8, 2009 at 12:09 PM, Alex Rass a...@itbsllc.com wrote:
  
   So: always override onSumbit for the buttons and *sometimes*
 redirect.
   Tis all.
  
   - Alex
  
   -Original Message-
   From: Robert Moskal [mailto:rmos...@mostmedia.com]
   Sent: Tuesday, December 08, 2009 12:05 PM
   To: users@wicket.apache.org
   Subject: Redirect after for submit, but not what you think
  
   Hi all:
  
   I'd like to be able to redirect after I submit a form, basically I
  want
   my
   app to navigate to the next question in a survey after a user
  responds.
But
   I don't want to do this in the onClick method of the form buttons,
   because
   I
   only want to do this sometimes.  In other words sometimes I want to
   deploy
   an application where I do the auto-navigation and sometimes I want
 the
   user
   to stay on the same page after submitting.
  
   The ideal place seems to be on the page level.  but it seems you
 can't
   call
   setResponsePage in the onDetach method.  Where in request
 life-cycle
   would
   be the place to do this sort of redirect?
  
   Thanks and regards,
   ___
   Robert Moskal
   Most Media
   Brooklyn, USA
   347-529-4744
  
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/Redirect-after-for-submit%2C-but-not-what-you-think-tp26697152p26697704.html
  Sent from the Wicket - User 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
 
 
 
 

 --
 View this message in context:
 http://old.nabble.com/Redirect-after-for-submit%2C-but-not-what-you-think-tp26697152p26698038.html
 Sent from the Wicket - User 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


 
 

-- 
View this message in context: 
http://old.nabble.com/Redirect-after-for-submit%2C-but-not-what-you-think-tp26697152p26699099.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Re: Redirect after for submit, but not what you think

2009-12-08 Thread Alex Objelean

You may want to take a look to brix (http://code.google.com/p/brix-cms/)
project. It is a wicket-based CMS framework  it also has a similar use-case
like yours. Maybe you'll find their approach interesting...

Alex


rmoskal wrote:
 
 Our application is configured after compilation.  I have many different
 renderers implemented as  panels with a private form for a large
 population of content types.
 
 When we deploy the application we have to specify the ones we want to
 actually use. Since there's no compilation involved in deploying and since
 we already use it for all sorts of other things (like specifying
 persistence
 providers, third party integration), the spring context seems like a a
 natural place from which to load the
 
 Currently I'm thinking about implementing the functionality using jquery
 in
 the client.  Find the appropriate ui control, decorate it and
 programmatically click the next button.  It's elegant in the sense that
 use
 case is addressed with a single change and not too fragile, since it is
 done
 on the page level and page is where the paging control lives.
 
 Again Alex, thanks for sharpening my thoughts
 ___
 Robert Moskal
 Most Media
 Brooklyn, USA
 347-529-4744
 
 
 On Tue, Dec 8, 2009 at 2:12 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 Wicket is unmanaged framework. I've never have seen a wicket code which
 would
 use instantiation of panels using spring. I don't know I understand it...
 do
 you have some special use-case? Can you describe it? My first thought is,
 that this is some sort of over engineering which doesn't bring you any
 advantage.

 Alex


 rmoskal wrote:
 
  Thanks Alex.  It does seem a like a slightly old-fashioned way of doing
  things. My factory instantiates the Panels by reflection from the class
  name
  (kept in a spring file).  I personally don't know how to create an
  anonymous
  class when I instantiate something using the reflection api.  I suppose
 I
  could pass in an interface that is to be called by the onSubmit method
 or
  change the factory to create an anonymous subclass of my panels, but
 all
  this seems like a lot of work to accomplish such a simple thing.
 
  I will keep thinking on it and will post if I come up a less obtrusive
 way
  to handle this.  You have helped me focus my thoughts.
 
  Regards,
 
  Robert
  ___
  Robert Moskal
  Most Media
  Brooklyn, USA
  347-529-4744
 
 
  On Tue, Dec 8, 2009 at 1:05 PM, Alex Objelean
  alex_objel...@yahoo.comwrote:
 
 
  You can define a default behavior (for instance no redirect after
 submit)
  
  apply redirect only for few pages. It is a nice solution... it reminds
 me
  about template method design pattern.
 
  Alex
 
 
  rmoskal wrote:
  
   I could do that, but would be nicer if I didn't have to touch n
 classes
  or
   create a class hierarchy for my Panel.  I don't like my Page knowing
 so
   much
   about what goes on in my Panels either.
  
   Thanks!
  
   Robert
   ___
   Robert Moskal
   Most Media
   Brooklyn, USA
   347-529-4744
  
  
   On Tue, Dec 8, 2009 at 12:44 PM, Alex Objelean
   alex_objel...@yahoo.comwrote:
  
  
   You don't have to expose your private panels. Just create a
 protected
   method
   which handles the form submission  override it in inherited
  components.
  
   Alex Objelean
  
  
   rmoskal wrote:
   
That's just what I don't want to do.  My forms live as private
  classes
   on
a
panel (one form per one style of panel).  I don't want to have to
introduce
n new panels to handle the case where I wan to do the redirect. 
 I
  was
hoping I could do it in one place (kind of like an aop after
 advice
  :).
___
Robert Moskal
Most Media
Brooklyn, USA
347-529-4744
   
   
On Tue, Dec 8, 2009 at 12:09 PM, Alex Rass a...@itbsllc.com
 wrote:
   
So: always override onSumbit for the buttons and *sometimes*
  redirect.
Tis all.
   
- Alex
   
-Original Message-
From: Robert Moskal [mailto:rmos...@mostmedia.com]
Sent: Tuesday, December 08, 2009 12:05 PM
To: users@wicket.apache.org
Subject: Redirect after for submit, but not what you think
   
Hi all:
   
I'd like to be able to redirect after I submit a form, basically
 I
   want
my
app to navigate to the next question in a survey after a user
   responds.
 But
I don't want to do this in the onClick method of the form
 buttons,
because
I
only want to do this sometimes.  In other words sometimes I want
 to
deploy
an application where I do the auto-navigation and sometimes I
 want
  the
user
to stay on the same page after submitting.
   
The ideal place seems to be on the page level.  but it seems you
  can't
call
setResponsePage in the onDetach method.  Where in request
  life-cycle
would
be the place to do this sort of redirect?
   
Thanks and regards,
___
Robert Moskal
Most Media

Re: InvalidUrlException considered evil?

2009-12-04 Thread Alex Objelean

That is why this Exception was created... you can override requestCycle 
handle this kind of exception whatever you like ...

Alex Objelean


Marat Radchenko-2 wrote:
 
 There some places in Wicket sources where it throws
 InvalidUrlException that causes exception logging and
 InternalErrorPage is shown.
 
 However, I don't agree that badly constructed URL is and _internal_
 error. It is external error (for example, user was playing with urls,
 modifying them by hand).
 
 So, my proposal: stop treating invalid urls and internal errors, don't
 log traces for them, don't show InternalErrorPage. Instead, either
 redirect user to home page, or show him 404, or show him 400 (bad
 request), or whatever else.
 
 The main point: do _not_ log errors just because user passed us an url
 that we couldn't resolve to a page/component.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/InvalidUrlException-considered-evil--tp26607291p26635840.html
Sent from the Wicket - User 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: [RFE] AjaxLazyLoadPanel callback script rendering

2009-11-25 Thread Alex Objelean

The problem with your approach is that each onclick will trigger an ajax
update... It is not exactly what I want. Still, there is absolutely no
impact in making AjaxLazyLoadPanel easier to extend. 

My question to core dev team is: should I create a JIRA issue or you need
more arguments? :)

Regards, 
Alex Objelean


Pedro H. O. dos Santos wrote:
 
 Hi Alex, don't you got the same impression than I, that it isn't an lazy
 load panel? Looks more like an triggered load panel. I have a few in my
 projects, and I using an strategy like have an page implementing
 IAjaxIndicatorAware, then changing panels with Component.replace method
 inside onSubimit or onClick implementations.
 
 On Wed, Nov 25, 2009 at 7:48 AM, Objelean Alex
 alex.objel...@gmail.comwrote:
 
 I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then
 on
 document onready js event (triggered later by some client-side event,
 like
 click on some button). The way it is implemented right now, there is no
 way
 to override AjaxLazyLoadPanel  change callback handling script. It would
 be
 useful if instead of:

 =
 add(new AbstractDefaultAjaxBehavior() {
  ...
  @Override
  public void renderHead(IHeaderResponse response)
  {
super.renderHead(response);
response.renderOnDomReadyJavascript(getCallbackScript().toString());
  }
  ...
 }
 =

 it would be a protected method which would do the same thing:

 =
 add(new AbstractDefaultAjaxBehavior() {
  ...
   @Override
  public void renderHead(final IHeaderResponse response) {
super.renderHead(response);
handleCallbackScript(response, getCallbackScript().toString());
  }
  ...
 }

 protected void handleCallbackScript(final IHeaderResponse response, final
 String callbackScript) {
  response.renderOnDomReadyJavascript(callbackScript);
 }
 =

 Should I open a JIRA issue with a patch attached?

 Thanks!

 Alex Objelean

 
 
 
 -- 
 Pedro Henrique Oliveira dos Santos
 
 

-- 
View this message in context: 
http://old.nabble.com/-RFE--AjaxLazyLoadPanel-callback-script-rendering-tp26509971p26515359.html
Sent from the Wicket - User 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: SessionListeners and Wicket?

2009-11-25 Thread Alex Objelean

I've done something similar. Using the SessionListener seems to be the only
one way to do the trick (only here you can access the session which is still
valid). And of course you can access your wicket strongly type session from
SessionListener: MySession.get().getUser().
 
Alex Objelean


Loritsch, Berin C. wrote:
 
 I have a requirement to have a queue of items that need work with a pool
 of people working on them.  I need to lock the record while someone is
 working on it.  Once the item is processed it will be removed
 permanently from the list.  Occasionally users open an item and then
 close it.  That part I've got taken care of.  I also have the part taken
 care of where a user manually logs out and the system releases any locks
 the user has.
 
 However, that doesn't catch the problem where users sessions time out.
 My best guess is that I need to add a SessionListener to the web.xml to
 handle this corner case.  So I have two questions:
 
 * Can I use the IMSSession.get() from my SessionListener and get the one
 for the running application?
 * Is there a more elegant Wicket way of doing the same thing?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/SessionListeners-and-Wicket--tp26519900p26520248.html
Sent from the Wicket - User 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: Posting A Form To NonWicket

2009-11-21 Thread Alex Objelean

You can use HttpClient for this.

Alex Objelean


chocba wrote:
 
 Thanks Igor. I'll give it a try. But the api doc says
 redirectrequesttarget will only redirect to an external url, but I would
 like to post the form, not just redirect.
 
 
 igor.vaynberg wrote:
 
 class myform extends form {
   protected void onsubmit() {
// do something
string url=
 getrequestcycle().setrequesttarget(new
 redirectrequesttarget(url));
 }
 }
 
 -igor
 
 On Sat, Nov 21, 2009 at 8:23 AM, chocba cho...@gmail.com wrote:

 No. Right now, I tried exactly the way you mentioned. I created a form
 element in javascript and add hidden fields to post the form. THe hidden
 fields are populated after extracting the values from wicket input
 elements.
 I'm concerned about the security since anyone could view source and  see
 the
 action url and try to post the form. Please let me know if any other
 alternative. Thanks.


 Edward Zarecor-2 wrote:

 Is there a requirement to process the data in any way before
 submitting to the remote application?  Why wouldn't you just use an
 HTML form with the appropriate action pointing to the remote host?
 Wicket may not need to know about this form.

 Ed.


 On Fri, Nov 20, 2009 at 12:14 PM, Balaji C cho...@gmail.com wrote:
 I've a wicket form with input elements. I would like to post this form
 to
 a
 non-wicket url. Is it possible to post this form from submit event of
 wicket
 button? I google and couldn't find any clear solution. Any help is
 appreciated. If any other alternative, please let me know. Thanks.


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




 --
 View this message in context:
 http://old.nabble.com/Posting-A-Form-To-NonWicket-tp26447615p26458059.html
 Sent from the Wicket - User 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
 
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Posting-A-Form-To-NonWicket-tp26447615p26460913.html
Sent from the Wicket - User 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: Bookmarkable images from db

2009-11-02 Thread Alex Objelean

Exactly. You can see the example posted by Vytautas Racelis earlier at this
link:
http://xaloon.googlecode.com/svn/trunk/xaloon-wicket-repository/src/main/java/org/xaloon/wicket/component/resource/ImageLink.java

I prefer to do it this way:
http://pastebin.com/m328e21ff

The first example allow you to use directly an Image component, while the
second allows you to build the url of any resource by name.. 

Alex Objelean


Peter Dotchev wrote:
 
 Hi Alex,
 
 I check SharedResources, but as I understand it I would have to add there
 a Resource object for each image.
 
 After checking again the javadoc there might be another way.
 Display each image with Image constructor that takes ValueMap and provide
 there some image identification.
 Add a single Resource object for all images and from getResourceStream()
 implementation to call getParameters() which will return the same
 parameters passed to Image constructor and tell me which image to return.
 Will this work?
 
 Best regards,
 Petar
 
 
 Alexandru Objelean wrote:
 
 Besides the servlet, there is also a wicket way of do it:
 
 - Use shared resource, which is stateless and bookmarkable 
 
 If you need more informations about this approach, search on forum or
 just ask... and I'll provide you with some examples of how I do it..
 
 Alex Objelean
 
 
 Peter Dotchev wrote:
 
 Hi,
 
 My app allows users to upload images and I store them in JCR 
 http://en.wikipedia.org/wiki/Content_repository_API_for_Java. I can 
 get InputStream for each one of them.
 I want to display images in specific pages and I want image URLs to be 
 stable/bookmarkable. Also I don't want these pages to use the session in 
 any way.
 I checked again chapter 9 about images from Wicket In Action but such 
 use case is not addressed there.
 
 I found that SharedResources allows for stable URLs, but I cannot 
 register each individual image.
 
 What approach would you suggest?
 
 Best regards,
 Peter
 
 
 
 
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Bookmarkable-images-from-db-tp26154577p26157757.html
Sent from the Wicket - User 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: Bookmarkable images from db

2009-11-01 Thread Alex Objelean

Besides the servlet, there is also a wicket way of do it:

- Use shared resource, which is stateless and bookmarkable 

If you need more informations about this approach, search on forum or just
ask... and I'll provide you with some examples of how I do it..

Alex Objelean


Peter Dotchev wrote:
 
 Hi,
 
 My app allows users to upload images and I store them in JCR 
 http://en.wikipedia.org/wiki/Content_repository_API_for_Java. I can 
 get InputStream for each one of them.
 I want to display images in specific pages and I want image URLs to be 
 stable/bookmarkable. Also I don't want these pages to use the session in 
 any way.
 I checked again chapter 9 about images from Wicket In Action but such 
 use case is not addressed there.
 
 I found that SharedResources allows for stable URLs, but I cannot 
 register each individual image.
 
 What approach would you suggest?
 
 Best regards,
 Peter
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Bookmarkable-images-from-db-tp26154577p26154636.html
Sent from the Wicket - User 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: urlFor(ResourceReference) strangeness

2009-10-28 Thread Alex Objelean

I am pretty sure, it is a bug. The reason why the urlFor(ResourceReference)
is not working properly is because you are using
BookmarkablePageRequestTargetUrlCodingStrategy for page mounting or a
similar strategy which encodes the params like this:
http://server/context/param1/value1/param2/value2 ... To prove that this is
a bug, try to change (just for test purpose) the mounting to
QueryStringUrlCodingStrategy, to make the url look like this: 
http://server/context?param1=value1. I suspect that when the url is built,
it depends on the page url from where the urlFor(ResourceReference) is
called... and wicket doesn't remove the parameters from the url and mess
this up... The real problem is when you are trying to build an absolute url
for a ResourceReference. If this is indeed the reason of the problem, we
should raise a jira issue... 

Alex Objelean  


pieter claassen-2 wrote:
 
 Ok, but I have a panel and I want to add an Image to the panel but when I
 log into my application I get the ../../.. prefix, and the
 ResourceReference
 then fails. However, once I click on any link, the prefix disappears and
 then my panel can find the ResourceReference. Am I misunderstanding how
 resource references should be used?
 
 Thanks,
 Pieter
 
 On Tue, Oct 27, 2009 at 4:21 PM, Ryan McKinley ryan...@gmail.com wrote:
 
 urlFor( ) uses the current request to get a relative path.  If the
 location
 you are calling urlFor() from changes, it will get a new location

 Note the only difference between the two urls is the ../../.. prefix


 On Oct 27, 2009, at 11:05 AM, pieter claassen wrote:

  WHen I start my application, my urlFor() returns a different URL than
 when
 I
 call it a second time?

   ResourceReference iconref = new ResourceReference(anchorclass,
 iconname);
   System.out.println(URL: +urlFor(iconref));

 First time it returns:
 URL:

 ../../../resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png

 second time:
 URL:

 resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png

 Any ideas?

 Thanks
 Pieter
 --



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


 
 
 -- 
 Pieter Claassen
 musmato.com
 
 

-- 
View this message in context: 
http://www.nabble.com/urlFor%28ResourceReference%29-strangeness-tp26079363p26089957.html
Sent from the Wicket - User 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: images not cached

2009-10-28 Thread Alex Objelean

You could add a shared resource to your application, like this:
Application.get().getSharedResources().add(name, WebResource)... in the
WebResource implementation you can control the response headers by adding
expire headers or etag.. This is pretty clean approach. 

Alex Objelean


Fernando Wermus-2 wrote:
 
 Hi all,
 I am testing an app in production and I have reached a problem you may
 help solve me. Like the war files were big, I decided to move all static
 images to a folder in production and add the following code to my
 Applicacion class.
 
 mount(new URIRequestTargetUrlCodingStrategy(/images) {
 
 @Override public IRequestTarget decode(RequestParameters
 requestParameters)
 {
 
 try {
 
 return serveStaticImages(getURI(requestParameters), );
 
 } catch (Exception e) {
 
 throw new WicketRuntimeException(e);
 
 }
 
 }
 
 });
 
 The problem is that each time that  someone calls a page, all the images
 are
 downloaded again. I know this isnt the best aproach and actually, it is
 awful in practices because of this issue. Why isnt caching the images and
 which would be the best approach?
 
 Thanks in advance
 
 
 -- 
 Fernando Wermus.
 
 www.linkedin.com/in/fernandowermus
 
 

-- 
View this message in context: 
http://www.nabble.com/images-not-cached-tp26087246p26089989.html
Sent from the Wicket - User 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: urlFor(ResourceReference) strangeness

2009-10-28 Thread Alex Objelean

Still, is this acceptable for you? Is my statement about mounting true? If it
is, could you create a jira issue for this?

Alex


pieter claassen-2 wrote:
 
 Alex,
 
 The problem went away. I had some pages mounted (I landed on a mounted
 page)
 and others not so as soon as I removed all the mounted pages, the problem
 went away).
 
 Rgds,
 Pieter
 
 On Wed, Oct 28, 2009 at 7:31 AM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 

 I am pretty sure, it is a bug. The reason why the
 urlFor(ResourceReference)
 is not working properly is because you are using
 BookmarkablePageRequestTargetUrlCodingStrategy for page mounting or a
 similar strategy which encodes the params like this:
 http://server/context/param1/value1/param2/value2 ... To prove that this
 is
 a bug, try to change (just for test purpose) the mounting to
 QueryStringUrlCodingStrategy, to make the url look like this:
 http://server/context?param1=value1. I suspect that when the url is
 built,
 it depends on the page url from where the urlFor(ResourceReference) is
 called... and wicket doesn't remove the parameters from the url and mess
 this up... The real problem is when you are trying to build an absolute
 url
 for a ResourceReference. If this is indeed the reason of the problem, we
 should raise a jira issue...

 Alex Objelean


 pieter claassen-2 wrote:
 
  Ok, but I have a panel and I want to add an Image to the panel but when
 I
  log into my application I get the ../../.. prefix, and the
  ResourceReference
  then fails. However, once I click on any link, the prefix disappears
 and
  then my panel can find the ResourceReference. Am I misunderstanding how
  resource references should be used?
 
  Thanks,
  Pieter
 
  On Tue, Oct 27, 2009 at 4:21 PM, Ryan McKinley ryan...@gmail.com
 wrote:
 
  urlFor( ) uses the current request to get a relative path.  If the
  location
  you are calling urlFor() from changes, it will get a new location
 
  Note the only difference between the two urls is the ../../.. prefix
 
 
  On Oct 27, 2009, at 11:05 AM, pieter claassen wrote:
 
   WHen I start my application, my urlFor() returns a different URL than
  when
  I
  call it a second time?
 
ResourceReference iconref = new ResourceReference(anchorclass,
  iconname);
System.out.println(URL: +urlFor(iconref));
 
  First time it returns:
  URL:
 
 
 ../../../resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png
 
  second time:
  URL:
 
 
 resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png
 
  Any ideas?
 
  Thanks
  Pieter
  --
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Pieter Claassen
  musmato.com
 
 

 --
 View this message in context:
 http://www.nabble.com/urlFor%28ResourceReference%29-strangeness-tp26079363p26089957.html
 Sent from the Wicket - User 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


 
 
 -- 
 Pieter Claassen
 musmato.com
 
 

-- 
View this message in context: 
http://www.nabble.com/urlFor%28ResourceReference%29-strangeness-tp26079363p26091991.html
Sent from the Wicket - User 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: urls with localization

2009-10-05 Thread Alex Objelean

It is indeed a simple decorator of the Request object... nothing special..

Alex Objelean


Vytautas C(ivilis wrote:
 
 Question regarding your code in wiki page: RequestDecorator, this seems
 to be class in your package? Could it be posted too?
 
 Regards,
 Vytautas
 
 
 Alex Objelean wrote:
 I've created a draft version of the page in wiki:
 http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs
 http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs 
 
 Now it will not expire ;).
 
 Alex Objelean
 
 
 Vytautas C(ivilis wrote:
 Hi, Alex.

 Could you repost LocaleUrlCodingStrategyDecorator to pastebin, as it has
 been expired?

 Thanks!

 Vytautas

 Alex Objelean wrote:
 RequestDecorator is nothing but a decorator implementation of Request
 class...
 [CODE]
 public class RequestDecorator
   extends Request {
   /**
* Decorated request.
*/
   private final Request request;


   /**
* Constructor.
*
* @param request to decorate.
*/
   public RequestDecorator(final Request request) {
 if (request == null) {
   throw new IllegalArgumentException(Decorated Request cannot be
 NULL!);
 }
 this.request = request;
   }


   /**
* {...@inheritdoc}
*/
   @Override
   public Locale getLocale() {
 return request.getLocale();
   }


   /**
* {...@inheritdoc}
*/
   @Override
   public String getParameter(final String key) {
 return request.getParameter(key);
   }


   /**
* {...@inheritdoc}
*/
   @Override
   public MapString, String[] getParameterMap() {
 return request.getParameterMap();
   }


   /**
* {...@inheritdoc}
*/
   @Override
   public String[] getParameters(final String key) {
 return request.getParameters(key);
   }


   /**
* {...@inheritdoc}
*/
   @Override
   public String getPath() {
 return request.getPath();
   }


   /**
* {...@inheritdoc}
*/
   @Override
   public String getQueryString() {
 return request.getQueryString();
   }


   /**
* {...@inheritdoc}
*/
   @Override
   public String getRelativePathPrefixToContextRoot() {
 return request.getRelativePathPrefixToContextRoot();
   }


   /**
* {...@inheritdoc}
*/
   @Override
   public String getRelativePathPrefixToWicketHandler() {
 return request.getRelativePathPrefixToWicketHandler();
   }


   /**
* {...@inheritdoc}
*/
   @Override
   public String getURL() {
 return request.getURL();
   }
 }
 [/CODE]


 Gatos wrote:
 I'm using wicket 1.3.5 and RequestDecorator could not be found.

 On Mon, Jul 27, 2009 at 1:05 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:

 There is another thread where I have posted a link with
 implementation
 (which is currently in production)... so, you can just reuse it:

 http://www.nabble.com/Is-IRequestTargetUrlCodingStrategy-needed-for-mapping-bookmarkable--URLs--td24407411.html#a24409330

 Alex Objelean


 Gatos wrote:
 Hello,

 How is it possible to use such urls in wicket?
 If users clicks that link then appropriate page with defined locale
 will
 be
 shown.
 www.domain.com/uk/home
 www.domain.com/nl/home

 Thank you


 --
 View this message in context:
 http://www.nabble.com/urls-with-localization-tp24676709p24677616.html
 Sent from the Wicket - User 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



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

-- 
View this message in context: 
http://www.nabble.com/urls-with-localization-tp24676709p25754194.html
Sent from the Wicket - User 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: InvalidUrlException - how to show 404 page

2009-10-02 Thread Alex Objelean

Or you can update the settings in your Application class:

getApplicationSettings().setInternalErrorPage(HomePage.class);

Alex Objelean


Thomas Singer-4 wrote:
 
 As I have reported a couple of weeks ago (but can't find the message any
 more for a follow-up), Wicket shows an ugly internal-error page if one
 somehow modified the stateful URLs, e.g.
 
 http://localhost:8080/?wicket:interface=:8
 
 Following exception is logged:
 
 org.apache.wicket.protocol.http.request.InvalidUrlException:
 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = :6
  at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:231)
  at org.apache.wicket.Request.getRequestParameters(Request.java:172)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
  at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
  at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
  at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
  at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 
 How to configure Wicket to show the configured 404-page instead?
 
 Tom
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/InvalidUrlException---how-to-show-404-page-tp25712108p25712450.html
Sent from the Wicket - User 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: urls with localization

2009-10-02 Thread Alex Objelean

I've created a draft version of the page in wiki:
http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs
http://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLs 

Now it will not expire ;).

Alex Objelean


Vytautas C(ivilis wrote:
 
 Hi, Alex.
 
 Could you repost LocaleUrlCodingStrategyDecorator to pastebin, as it has
 been expired?
 
 Thanks!
 
 Vytautas
 
 Alex Objelean wrote:
 RequestDecorator is nothing but a decorator implementation of Request
 class...
 [CODE]
 public class RequestDecorator
   extends Request {
   /**
* Decorated request.
*/
   private final Request request;
 
 
   /**
* Constructor.
*
* @param request to decorate.
*/
   public RequestDecorator(final Request request) {
 if (request == null) {
   throw new IllegalArgumentException(Decorated Request cannot be
 NULL!);
 }
 this.request = request;
   }
 
 
   /**
* {...@inheritdoc}
*/
   @Override
   public Locale getLocale() {
 return request.getLocale();
   }
 
 
   /**
* {...@inheritdoc}
*/
   @Override
   public String getParameter(final String key) {
 return request.getParameter(key);
   }
 
 
   /**
* {...@inheritdoc}
*/
   @Override
   public MapString, String[] getParameterMap() {
 return request.getParameterMap();
   }
 
 
   /**
* {...@inheritdoc}
*/
   @Override
   public String[] getParameters(final String key) {
 return request.getParameters(key);
   }
 
 
   /**
* {...@inheritdoc}
*/
   @Override
   public String getPath() {
 return request.getPath();
   }
 
 
   /**
* {...@inheritdoc}
*/
   @Override
   public String getQueryString() {
 return request.getQueryString();
   }
 
 
   /**
* {...@inheritdoc}
*/
   @Override
   public String getRelativePathPrefixToContextRoot() {
 return request.getRelativePathPrefixToContextRoot();
   }
 
 
   /**
* {...@inheritdoc}
*/
   @Override
   public String getRelativePathPrefixToWicketHandler() {
 return request.getRelativePathPrefixToWicketHandler();
   }
 
 
   /**
* {...@inheritdoc}
*/
   @Override
   public String getURL() {
 return request.getURL();
   }
 }
 [/CODE]
 
 
 Gatos wrote:
 I'm using wicket 1.3.5 and RequestDecorator could not be found.

 On Mon, Jul 27, 2009 at 1:05 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:


 There is another thread where I have posted a link with implementation
 (which is currently in production)... so, you can just reuse it:

 http://www.nabble.com/Is-IRequestTargetUrlCodingStrategy-needed-for-mapping-bookmarkable--URLs--td24407411.html#a24409330

 Alex Objelean


 Gatos wrote:
 Hello,

 How is it possible to use such urls in wicket?
 If users clicks that link then appropriate page with defined locale
 will
 be
 shown.
 www.domain.com/uk/home
 www.domain.com/nl/home

 Thank you


 --
 View this message in context:
 http://www.nabble.com/urls-with-localization-tp24676709p24677616.html
 Sent from the Wicket - User 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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/urls-with-localization-tp24676709p25713262.html
Sent from the Wicket - User 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: InvalidUrlException - how to show 404 page

2009-10-02 Thread Alex Objelean

You should know that InvalidUrlException can be quite useful... if user try
to tweak the url, that means he is attempting to hack your application
(which is impossible anyway). In such cases, you can display a nice message
like: don't try to hack the application, it won't work or you cand display
404 page.. 

Alex Objelean


Thomas Singer-4 wrote:
 
 Hi Linda, Alex and Jonas,
 
 Thank you for your answers.
 
 Just for the records: I'm now setting the internal error page in
 WebApplication.init() as Alex suggested and override
 WebApplication.newRequestCycle(Request, Response) to return a subclass of
 WebRequestCycle which overrides logRuntimeException(RuntimeException) to
 not
 log this InvalidUrlException.
 
 Tom
 
 
 Jonas wrote:
 I think it should be possible to have the webserver deliver the standard
 404 page by throwing AbortWithWebErrorCodeException
 
 You can hook in at WebRequestCycleProcessor#respond(RuntimeException
 e, RequestCycle requestCycle)
 and throw the mentioned exception. Works find just like this in our
 webapp
 
 cheers,
 Jonas
 
 
 On Fri, Oct 2, 2009 at 10:22 AM, Thomas Singer wic...@regnis.de wrote:
 As I have reported a couple of weeks ago (but can't find the message any
 more for a follow-up), Wicket shows an ugly internal-error page if one
 somehow modified the stateful URLs, e.g.

 http://localhost:8080/?wicket:interface=:8

 Following exception is logged:

 org.apache.wicket.protocol.http.request.InvalidUrlException:
 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = :6
   at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:231)
   at
 org.apache.wicket.Request.getRequestParameters(Request.java:172)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
   at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
   at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 How to configure Wicket to show the configured 404-page instead?

 Tom



 -
 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
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/InvalidUrlException---how-to-show-404-page-tp25712108p25726016.html
Sent from the Wicket - User 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: exclude wicket:panel

2009-09-30 Thread Alex Objelean

In your Application class add the following line: 

getMarkupSettings().setStripWicketTags(true);


Martin Letendre wrote:
 
 Don't display the wicket:panel tag
 
 1- I am using a wicket panel to create a component here is the code.
 
 wicket:panel
 div
... some code
 /div
 /wicket:panel
 
 
 2- The call to the component is
 
 div wicket:id=actionMenuOneactions/div
 
 3- The generated HTML by wicket is
 
 div   wicket:id=actionMenuOne   id=actionMenuOne1
 wicket:panel
 div
 ... some code
 /div
 /wicket:panel
 /div
 
 4- The tag wicket:panel is breaking some YUI javascript...
 
 *Question: *
 
 is there a way to exclude wicket:panel tag for this component but keep
 the  div wicket:id=actionMenuOne tag ?
 
 
 
 
 
 
 -- 
 Martin Letendre
 4230 Wilson
 Montréal, Qc
 514.690.8027
 
 

-- 
View this message in context: 
http://www.nabble.com/exclude-%3Cwicket%3Apanel%3E-tp25678826p25678951.html
Sent from the Wicket - User 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: Internal error parsing wicket:interface = :6

2009-08-19 Thread Alex Objelean

If they would bookmark these url, they would get SessionExpired page... I'm
pretty sure they have tried to hack the url.

Alex Objelean


Thomas Singer-4 wrote:
 
 Thanks, Alex. So you are sure this is no problem of our web application,
 but
 rather users who change such URLs manually or have bookmarked non-static
 ones?
 
 Tom
 
 
 Alex Objelean wrote:
 In wicket 1.3.x you would get just WicketRuntimeException... by default
 you
 will be redirected to default InternalErrorPage.. InvalidUrlException was
 introduced in wicket-1.4.0 in order to handle situation when user tweaks
 the
 url making it unusable... you can treat this exception somehow different
 by
 redirecting to some page or displaying an error message.
 
 Alex Objelean
 
 
 Thomas Singer-4 wrote:
 Recently, we upgraded to Wicket 1.4.0 and now I can find following
 exceptions in the Tomcat log:

 09/08/18 18:59:15 ERROR wicket.RequestCycle:
 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = :6
 org.apache.wicket.protocol.http.request.InvalidUrlException:
 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = :6
at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:231)
at org.apache.wicket.Request.getRequestParameters(Request.java:172)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
 com.syntevo.hpsmart.SmCanonicalizeUrlFilter.doFilter(SmCanonicalizeUrlFilter.java:99)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:542)
at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)
 Caused by: org.apache.wicket.WicketRuntimeException: Internal error
 parsing wicket:interface = :6
at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:613)
at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:584)
at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:206)
... 24 more
 Is this a known problem?

 Thanks in advance,
 Tom

 -
 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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Internal-error-parsing-wicket%3Ainterface-%3D-%3A6-tp25031846p25038637.html
Sent from the Wicket - User 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 Kill Previous Page

2009-08-07 Thread Alex Objelean

getPage().getPageMap().remove(); ?

Alex Objelean


carlo c wrote:
 
 Hi,
 
 I would like to ask if it's possible to kill the previous page out of the
 pagestore.
 I have this requirement in which i have a view screen which can be able to
 delete or edit an entity.
 
 My problem is that when the client copies the url and pastes it back the
 client can go back to the previous page since the client can retrieve it
 from the session store.
 
 Is there  a way in which wicket can actually destroy the previous page?
 
 the problem is the users can copy for exampler
 
 View Page
 wicket:interface=1
 
 Acknowledgement Page
 wicket:interface=2
 
 The user can actually paste the url
 
 wicket:interface=1 to the browser and still be able to view the record.
 
 Is there any way for me to kill the page with id = 1?
 
 Thanks A Lot
 Carlo
 
 

-- 
View this message in context: 
http://www.nabble.com/How-To-Kill-Previous-Page-tp24863148p24863291.html
Sent from the Wicket - User 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 rewriting name attributes in form

2009-08-06 Thread Alex Objelean

Override getInputName() method of each FormComponent..

Alex Objelean


Bas Vroling wrote:
 
 I have written an wicket page that collects some user input and  
 calculates values. These values need to be sent to an external python  
 script that does something with this data and renders a results page.  
 This almost works fine but wicket messes up my form. In the HTML  
 template I have specified my form like this:
 
 form method=post action=some_url
   input type=text class=field wicket:id=proteinId  
 name=protein_id /
   input type=submit class=button value=Go! /
 /form
 
 but when wicket renders the page it creates this:
 
 form method=post action=some_url
   input type=text class=field wicket:id=proteinId  
 name=mutantPredictionSubmitPanel:proteinId value=adrb2_human/
   input type=submit class=button value=Go! /
 /form
 
 The difference is in the name of proteinId value being rewritten from  
 protein_id to mutantPredictionSubmitPanel:proteinId, and this  
 causes the python script at the other end to choke.
 
 Is there a way to disable the rewriting of the name attribute, or  
 specify my own name?
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/wicket-rewriting-name-attributes-in-form-tp24842731p24842984.html
Sent from the Wicket - User 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: Can I send a parameter value to RequestCycle?

2009-08-06 Thread Alex Objelean

I think this is not enough...
The generated markup looks like this:

li wicket:id=tabs class=tab2 last 

?wicket:interface=:2:tabs:tabs-container:tabs:2:link::ILinkListener::amp;tabId=2tabId=2
third tab  
/li 

In order to make it work, the wicketAjaxGet url should also contain the
itemId parameter appended.. Otherwise it will work only when javascript is
disabled.

Alex Objelean


igor.vaynberg wrote:
 
 c.add(new abstractbehavior() {
   oncomponenttag(tag) {
 tag.put(href, tag.getattributes().get(href)+itemid=xxx);
   }
 }
 
 -igor
 
 
 On Thu, Aug 6, 2009 at 6:05 AM, marius1marumarius1m...@yahoo.com wrote:

  Thank you for your answer Igor.

  I did not manage to append the id to the url. I tried something like
 this:

                tabbedPanel = new AjaxTabbedPanel(mytabpanel, tabs) {

                       �...@override
                        protected WebMarkupContainer newLink(String
 linkId, final int index) {

                                final WebMarkupContainer c = new
 IndicatingAjaxLink(linkId) {

                                       �...@override
                                        public void
 onClick(AjaxRequestTarget target) {
                                                setSelectedTab(index);
                                                if (target != null) {
                                                      
  target.addComponent(MyTabbedPanel.this);
                                                }
                                                onAjaxUpdate(target);
                                        }
                                };

                                c.add(new SimpleAttributeModifier(href,
 itemId=xxx));

                                return c;
                        }

  I also tried:
                        final IModelString model = new
 AbstractReadOnlyModelString() {
                                       @Override
                                       public String getObject() {
                                                return itemId=xxx;
                                       }
                        };

                        add(new AttributeModifier(href, model) {
                               @Override
                               protected String newValue(String
 currentValue, String
 replacementValue) {
                                  return currentValue + replacementValue;
                               }
                        });

  but in WebRequestCycle, the URL is always without itemId=xxx at the
 end.

 Can you please tell me what am I missing here? Or what should I do to
 modify
 the url generated by ajaxtabpanel?

 Thank you,
 Marius Anton


 igor.vaynberg wrote:

 your request cycle has access to the url that caused the page expired
 exception. at that point you cannot know anything else because there
 is no longer a session either.

 what you might want to do is append itemid to the urls generated by
 the ajaxtabbedpanel.

 -igor

 On Wed, Aug 5, 2009 at 1:52 AM, Marius Antonmarius1m...@yahoo.com
 wrote:
 Hello everybody,

 I hope that someone can help me on this.

  I have a page that displays information about a particular item. On
 that
 page there is also an ajax tab panel (from wicket.extensions).
  For every item, the url looks like this:
 http://mysite?itemId=-x. After the page expires I want the
 current page to be refreshed.

  After the page expires, and the user clicks on one of the tabs, a page
 expired exception is thrown. I have a custom request cycle, witch
 extends
 WebRequestCycle, that caches that exception,
  but the problem is that I can not redirect the user to the same page
 because there in my request cycle I am not able to see the parameter
  itemId. Inside RequstCycle, if I try request.getUrl, I get something
 like this:
 mypage?wicket:interface=:5:10:::0:random=0.8618006417527795.

  My question is: can I somehow send a parameter(itemId) to the request
 cycle when a page expired exception is thrown?
 Or how can I refresh the current page(witch has the itemId as
 parameter)
 when the user clicks on an ajax link(in this case a tab)
 after the page expired?

 Any sugestion will be apreciated.




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




 --
 View this message in context:
 http://www.nabble.com/Can-I-send-a-parameter-value-to-RequestCycle--tp24823173p24846158.html
 Sent from the Wicket - User 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

Re: Pretty Session URLs

2009-08-05 Thread Alex Objelean

Use HybridUrlCodingStrategy..

Alex Objelean


randomaccessandy wrote:
 
 Sorry everyone if this question has been posted before (I've searched the
 mailing list and not found a definitive answer)...
 
 With the help of this list, I now have a good grasp of URL
 mounting/encoding
 - at least for bookmarkable pages. My issue is how to ensure that session
 based URLs don't give away the fact that the application uses Wicket.
 
 An example:
 
 I've been experimenting with pageable data views and noticed that, when
 paging through some search results, the URLs are appended with something
 similar to this:
 
 ?wicket:interface=:0:1:::
 
 Now, I'm not concerned that this makes the page not bookmarkable - but it
 would still be nice if these session type URLs did not have to contain the
 word wicket. Is there some way of getting round this? i.e. make them a
 little more pretty and not an implementation giveaway?
 
 There is also the question of whether there is a way of using the
 PagingNavigator without having to rely on session parameters. However, I'm
 assuming the best way to solve this would be to write custom code. At the
 end of the day, if one wants to essentially have bookmarkable paging, it
 will require moving the paging parameters into the query string.
 
 Any help on my first point (pretty session URLs) would be appreciated.
 
 Regards,
 
 Andrew
 
 

-- 
View this message in context: 
http://www.nabble.com/Pretty-Session-URLs-tp24826656p24827408.html
Sent from the Wicket - User 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: Processing GET requests

2009-08-05 Thread Alex Objelean

Why would you use wicket for this? The simplest approach is a plain servlet..

Alex Objelean


arungupta wrote:
 
 I need to define couple of URLs in my app that return JSON data on GET
 request and are not tied to any view. Planning to use
 QueryStringUrlCodingStrategy and append the URL as
 type=runlogschart=barchart. Then in the WebPage, extract the query
 string and process them.
 
 How do I ensure that JSON data is returned for GET requests to those URLs
 ?
 
 Thanks,
 -Arun
 
 -- 
 Need Application Server ? - Download glassfish.org
 Blog: http://blogs.sun.com/arungupta
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Processing-GET-requests-tp24836398p24836616.html
Sent from the Wicket - User 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: Stateless login form?

2009-08-02 Thread Alex Objelean

Jeremy Thomerson already gave you the hint: override isStateless and return
true... thus you'll not get a session relative url.

Alex.



MartinM wrote:
 
 Login page is visible, but the form
 action=/?wicket:interface=:0:1 which is stateful.  If my session
 dies I will definitely get an error.
 
 Try clicking this link with a new browser that does not have a session
 on the site: http://www.tipspot.com/?wicket:interface=:0:1
 
 This is what you would get if your browser loaded the page from cache
 (or if you let it wait until the session invalidates). Does not look
 professional and it is totaly unnecessary, in my opinnion. It should
 be possible to handle forms on virgin (=no state bound yet)
 invocations too.
 
 **
 Martin
 
 2009/8/2 Erik van Oosten e.vanoos...@grons.nl:
 Martin,

 I am not sure what you mean. On the site you are referring, the login
 page
 is always visible under /login.

 Regards,
   Erik.

 Martin Makundi wrote:

 If I understood correctly, you might find this interesting:

 http://day-to-day-stuff.blogspot.com/2008/10/wicket-extreme-consistent-urls.html


 Does appear to make stateless-looking urls AFTER you CLICK/REDIRECT
 (looking at the example page referred on the site). Not BEFORE you
 CLICK...




 -
 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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Stateless-login-form--tp24757066p24782234.html
Sent from the Wicket - User 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 for non Web/AJAX developers?

2009-08-02 Thread Alex Objelean

The similar confusion had a friend of mine who didn't have any experience at
all with wicket and indeed, at the first glance, a 33 letters long class
seems a bit strange :)... But, you must know that according to wicket coding
convensions:
- each class implementing IBehavior interface has a 'Behavior' suffix
- each ajax related component or behavior has an 'Ajax' prefix
Remove those two, and it will become easier to understand... 
Do you have other suggestions for naming convensions?

Alex Objelean


LazyBoy wrote:
 
 Much of the class design  documentation assume knowledge of
 these things, especially when you get down to stuff like
 AjaxFormComponentUpdatingBehavior.  WTF?
 

-- 
View this message in context: 
http://www.nabble.com/Wicket-for-non-Web-AJAX-developers--tp24780111p24782326.html
Sent from the Wicket - User 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: Thanks Wicket-Team!

2009-07-28 Thread Alex Objelean

That's impressive! Nice concept, looks very good... I'll use it :).

Alex


okrohne wrote:
 
 Hi,
 
 Many thanks to the Wicket-Team for the great Framework and 
 of course for the support I have received from the mailinglist.
 
 I started with zero-Wicket knowledge and now 4 month later
 we have launched a new community website:
 
 http://fytch.com 
 
 It is based on Wicket, Spring, OpenJPA, Lucene, PostgreSQL.
 
 I would be glad if you try out Fytch and of course any feedback is
 welcome.
 Should I put Fytch on the wiki Sites using Wicket?
 
 Thanks for the fabulous Wicket,
 Oliver
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Thanks-Wicket-Team%21-tp24697082p24697954.html
Sent from the Wicket - User 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: UnauthorizedActionException wrapped in an InvalidUrlException - how to deal with it ?

2009-07-27 Thread Alex Objelean


This is the link of the RFE:
https://issues.apache.org/jira/browse/WICKET-2307


Olger Warnier-2 wrote:
 
 On 26 jul 2009, at 22:59, Alex Objelean wrote:

 If you think this would help, then you could remove  
 InvalidUrlException and
 invalidate the jira RFE created by me... I don't think this would  
 heart
 anyone...
 Intresting, I assume that it is of value to have this construction,  
 could you give me the link to the RFE ?
 
 At any time, somehing was a WicketRuntimeException and only a  
 PageExpired (original or as cause) is now rethrown. All others are  
 wrapped.
 Is there a case that in the AbstractRequestCycleProcessor the  
 following works then ?
 
 else if (e instanceof AuthorizationException)
   {
   // are authorization exceptions always  
 thrown
 
 Kind Regards,
 
 Olger
 

 Alex


 igor.vaynberg wrote:

 my point is that this case is on the fence.

 it is an invalid url, and it is a security violation. so which one
 should take precendence?

 my other concern is that we would have to maintain a long list of
 exceptions that should be passed through, which becomes a pita.

 -igor

 On Sun, Jul 26, 2009 at 1:32 PM, Alex Objeleanalex_objel...@yahoo.com 
 
 wrote:

 I just want to remind the reason why the InvalidUrlException was
 introduced:
 to avoid situations when user would tweak somehow the url and get  
 the
 InternalError Page...  I introduced a request for enhancement for
 InvalidUrlException feature and if there are any problems related  
 to it,
 you
 can blame me..:(

 Alex Objelean


 igor.vaynberg wrote:

 then we are getting in a debate of what use an invalidurlexception
 really is. if we forward page expired and a bunch of other  
 exceptions,
 why do we even need an invalidurlexception...

 the point is the user has submitted a form that they should not  
 have
 been able to, it is an invalid url...

 i dont know off the top of my head what the best approach is.

 -igor

 On Sun, Jul 26, 2009 at 12:46 PM, Olger Warnierol...@xs4all.nl  
 wrote:
 Hi Igor,

 if the form is disabled why is it allowed to be submitted?

 In a test you can ;)
 When you know what to submit, it is possible to submit those  
 values
 without
 a page, although I can imagine that it is quite hard to achieve  
 due to
 the
 way wicket handles form variables and stuff (via the session).

 Even with that in mind, I wonder if it is possible to have  the
 UnauthorizedException thrown directly (without the
 InvalidUrlException).

 Kind Regards,

 Olger


 -igor

 On Sun, Jul 26, 2009 at 10:58 AM, Olger Warnierol...@xs4all.nl
 wrote:

 Hi Developers,

 Slowly but surely I move through the tests of the wicket  
 security
 framework.
 In one test, the SecureFormTest, i ran into some strange  
 behaviour.
 It starts with an exception like this:
 org.apache.wicket.protocol.http.request.InvalidUrlException:
 org.apache.wicket.authorization.UnauthorizedActionException:
 Component
 [MarkupContainer [Component id = form]] does not permit action  
 ENABLE

 (note, the test is commented in order to prevent build failures)

 There is a secureform that has no rights to be filled an  
 submitted.
 Normal
 behaviour till now was the return of a login page. In some  
 cases I
 found
 the
 return of the UnauthorizedActionException - all fine till now.
 (running
 1.4-rc7)
 In this test though, I there is no redirection to a Login Page  
 and I
 can't
 catch the UnauthorizedActionException. This started my quest  
 into the
 originating throws, this happens to be the throw of an
 InvalidUrlException
 in WebRequestCycleProcessor (line 248 and on)

   catch (WicketRuntimeException e)
   {
   // we need to let page expired exception  
 sift
 through
 instead of covering it up

   if (e instanceof PageExpiredException)
   {
   throw e;
   }
   else if (e.getCause() instanceof
 PageExpiredException)
   {
   throw e;
   }
   else
   {
   throw new InvalidUrlException(e);
   }
   }

 The UnauthorizedActionException is catched here and thereafter  
 thrown
 wrapped in an InvalidUrlException.

 This is not the end of it, the RequestCycle catches this  
 exception
 and
 has
 some logic for it  (line 1337 starting) :

   catch (RuntimeException e)
   {
   /*
* check if the raised exception wraps  
 an abort
 exception. if so, it is probably wise to
* unwrap and rethrow the abort exception
*/
   Throwable cause = e.getCause();
   while (cause != null)
   {
   if (cause

Re: urls with localization

2009-07-27 Thread Alex Objelean


There is another thread where I have posted a link with implementation
(which is currently in production)... so, you can just reuse it:
http://www.nabble.com/Is-IRequestTargetUrlCodingStrategy-needed-for-mapping-bookmarkable--URLs--td24407411.html#a24409330

Alex Objelean


Gatos wrote:
 
 Hello,
 
 How is it possible to use such urls in wicket?
 If users clicks that link then appropriate page with defined locale will
 be
 shown.
 www.domain.com/uk/home
 www.domain.com/nl/home
 
 Thank you
 
 

-- 
View this message in context: 
http://www.nabble.com/urls-with-localization-tp24676709p24677616.html
Sent from the Wicket - User 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: UnauthorizedActionException wrapped in an InvalidUrlException - how to deal with it ?

2009-07-27 Thread Alex Objelean


You can treat runtime exceptions by overriding newRequestCycle method of
your Application class...
@Override
  public Page onRuntimeException(final Page page, final RuntimeException e)
{
 if (e instanceof InvalidUrlException) {
   //redirect to 404
 } else {
return super.onRuntimeException(page, e);
 }
  }


Olger Warnier-2 wrote:
 
 Sorry to keep on buggin over this, I try to understand what is the  
 best option to plugin the unauthorized type of exceptions into the  
 wicket framework.
 It seems (maybe because of lack of understanding) that the  
 UnAuthorizedException handling can't work as it is now.
 Now to move on:
 
 I've read the RFE Alex sent.
 
 As you create a more specific extension of the runtime exception, it  
 will be wrapped by the WebRequestCycleProcessor to an  
 InvalidURLException.
 
 How do you make sure that it will show the 404 ? (or is that default  
 for the InvalidURLException ?)
 
 It might be an idea to have some kind of exception resolvement at the  
 spot where this decision is made. (I don't know where that is, I have  
 seen hints that this is already done somehow and you are able to  
 override it. ) and throw runtime exceptions as is to that level. By  
 registering exception handler pages you have the option to customize  
 the behaviour.
 
 If I like to do that in the current situation, I need to handle the  
 InvalidUrlException, check the cause and do something only in the case  
 I'd like to process (Unauthorized)
 What to do with the other causes of the InvalidUrl then ?
 
 
 Kind Regards,
 
 Olger
 
 
 On 27 jul 2009, at 11:41, Alex Objelean wrote:
 


 This is the link of the RFE:
 https://issues.apache.org/jira/browse/WICKET-2307


 Olger Warnier-2 wrote:

 On 26 jul 2009, at 22:59, Alex Objelean wrote:

 If you think this would help, then you could remove
 InvalidUrlException and
 invalidate the jira RFE created by me... I don't think this would
 heart
 anyone...
 Intresting, I assume that it is of value to have this construction,
 could you give me the link to the RFE ?

 At any time, somehing was a WicketRuntimeException and only a
 PageExpired (original or as cause) is now rethrown. All others are
 wrapped.
 Is there a case that in the AbstractRequestCycleProcessor the
 following works then ?

else if (e instanceof AuthorizationException)
  {
  // are authorization exceptions always
 thrown

 Kind Regards,

 Olger


 Alex


 igor.vaynberg wrote:

 my point is that this case is on the fence.

 it is an invalid url, and it is a security violation. so which one
 should take precendence?

 my other concern is that we would have to maintain a long list of
 exceptions that should be passed through, which becomes a pita.

 -igor

 On Sun, Jul 26, 2009 at 1:32 PM, Alex Objeleanalex_objel...@yahoo.com

 wrote:

 I just want to remind the reason why the InvalidUrlException was
 introduced:
 to avoid situations when user would tweak somehow the url and get
 the
 InternalError Page...  I introduced a request for enhancement for
 InvalidUrlException feature and if there are any problems related
 to it,
 you
 can blame me..:(

 Alex Objelean


 igor.vaynberg wrote:

 then we are getting in a debate of what use an  
 invalidurlexception
 really is. if we forward page expired and a bunch of other
 exceptions,
 why do we even need an invalidurlexception...

 the point is the user has submitted a form that they should not
 have
 been able to, it is an invalid url...

 i dont know off the top of my head what the best approach is.

 -igor

 On Sun, Jul 26, 2009 at 12:46 PM, Olger Warnierol...@xs4all.nl
 wrote:
 Hi Igor,

 if the form is disabled why is it allowed to be submitted?

 In a test you can ;)
 When you know what to submit, it is possible to submit those
 values
 without
 a page, although I can imagine that it is quite hard to achieve
 due to
 the
 way wicket handles form variables and stuff (via the session).

 Even with that in mind, I wonder if it is possible to have  the
 UnauthorizedException thrown directly (without the
 InvalidUrlException).

 Kind Regards,

 Olger


 -igor

 On Sun, Jul 26, 2009 at 10:58 AM, Olger  
 Warnierol...@xs4all.nl
 wrote:

 Hi Developers,

 Slowly but surely I move through the tests of the wicket
 security
 framework.
 In one test, the SecureFormTest, i ran into some strange
 behaviour.
 It starts with an exception like this:
 org.apache.wicket.protocol.http.request.InvalidUrlException:
 org.apache.wicket.authorization.UnauthorizedActionException:
 Component
 [MarkupContainer [Component id = form]] does not permit action
 ENABLE

 (note, the test is commented in order to prevent build  
 failures)

 There is a secureform that has no rights to be filled an
 submitted.
 Normal
 behaviour till now was the return of a login page. In some
 cases I
 found
 the
 return of the UnauthorizedActionException - all fine till now.
 (running
 1.4-rc7)
 In this test though, I

Re: urls with localization

2009-07-27 Thread Alex Objelean

RequestDecorator is nothing but a decorator implementation of Request
class...
[CODE]
public class RequestDecorator
  extends Request {
  /**
   * Decorated request.
   */
  private final Request request;


  /**
   * Constructor.
   *
   * @param request to decorate.
   */
  public RequestDecorator(final Request request) {
if (request == null) {
  throw new IllegalArgumentException(Decorated Request cannot be
NULL!);
}
this.request = request;
  }


  /**
   * {...@inheritdoc}
   */
  @Override
  public Locale getLocale() {
return request.getLocale();
  }


  /**
   * {...@inheritdoc}
   */
  @Override
  public String getParameter(final String key) {
return request.getParameter(key);
  }


  /**
   * {...@inheritdoc}
   */
  @Override
  public MapString, String[] getParameterMap() {
return request.getParameterMap();
  }


  /**
   * {...@inheritdoc}
   */
  @Override
  public String[] getParameters(final String key) {
return request.getParameters(key);
  }


  /**
   * {...@inheritdoc}
   */
  @Override
  public String getPath() {
return request.getPath();
  }


  /**
   * {...@inheritdoc}
   */
  @Override
  public String getQueryString() {
return request.getQueryString();
  }


  /**
   * {...@inheritdoc}
   */
  @Override
  public String getRelativePathPrefixToContextRoot() {
return request.getRelativePathPrefixToContextRoot();
  }


  /**
   * {...@inheritdoc}
   */
  @Override
  public String getRelativePathPrefixToWicketHandler() {
return request.getRelativePathPrefixToWicketHandler();
  }


  /**
   * {...@inheritdoc}
   */
  @Override
  public String getURL() {
return request.getURL();
  }
}
[/CODE]


Gatos wrote:
 
 I'm using wicket 1.3.5 and RequestDecorator could not be found.
 
 On Mon, Jul 27, 2009 at 1:05 PM, Alex Objelean
 alex_objel...@yahoo.comwrote:
 


 There is another thread where I have posted a link with implementation
 (which is currently in production)... so, you can just reuse it:

 http://www.nabble.com/Is-IRequestTargetUrlCodingStrategy-needed-for-mapping-bookmarkable--URLs--td24407411.html#a24409330

 Alex Objelean


 Gatos wrote:
 
  Hello,
 
  How is it possible to use such urls in wicket?
  If users clicks that link then appropriate page with defined locale
 will
  be
  shown.
  www.domain.com/uk/home
  www.domain.com/nl/home
 
  Thank you
 
 

 --
 View this message in context:
 http://www.nabble.com/urls-with-localization-tp24676709p24677616.html
 Sent from the Wicket - User 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


 
 

-- 
View this message in context: 
http://www.nabble.com/urls-with-localization-tp24676709p24681795.html
Sent from the Wicket - User 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



  1   2   3   >