Re: MarkupId generation [SOLVED]

2011-02-06 Thread Uwe Schäfer

On 02/06/2011 05:51 AM, msj121 wrote:


I see, well I am happy I could help, and it sounds like you have quite an
interesting project.


humm, indeed ;)

just to let everyone know:
adding this to application init works nicely:

addComponentInstantiationListener(new IComponentInstantiationListener(){
public void onInstantiation(final Component arg0){
arg0.setMarkupId(this.prefix + arg0.getMarkupId());
}
});

thanks again, uwe

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



Re: Calculating wicket page URL in JavaScript

2011-02-06 Thread mbrictson

My solution is to put a link tag on every page with a reference to the home
page URL. That way scripts can always build URLs based on the home page
root.

For example:

BasePage.html

head
  link rel=home wicket:id=home-link /
/head

BasePage.java

add(new BookmarkablePageLink(home-link, getApplication().getHomePage()));

Then your JavaScript can do something like this (jQuery):

var projectPageUrl = $(link[rel='home']).attr(href) + project/ +
projectId;
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Calculating-wicket-page-URL-in-JavaScript-tp3262459p3263084.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: File upload progress bar

2011-02-06 Thread Schaaf van der, Haiko H (NSC)
Ik kom het aankomende week ophalen.

Haiko van der Schaaf 

NS Reizigers
CC-Internet, Business Systemen 

Laan van Puntenburg 100
Postbus 2025
3500 HA Utrecht 

T 06 - 18515494
www.ns.nl 

 

-Oorspronkelijk bericht-
Van: Valentin Avksentyev [mailto:v...@360works.com] 
Verzonden: vrijdag 4 februari 2011 14:18
Aan: users@wicket.apache.org
Onderwerp: Re: File upload progress bar

So has anyone out there has been able to get the upload progress bar
working?  If so, please advise.

I definitely don't mind putting together a quickstart, are there
directions for that anywhere?

-Valentin

On Feb 3, 2011, at 10:18 AM, Valentin Avksentyev wrote:

 No I'm testing on my own machine, with a 300Mb file, in fact Chrome
gives me upload feedback, but nothing from the upload progress bar.
 
 Here is the code I'm using:
 
 I'm overriding newWebRequest in my Application class:
 @Override
   protected WebRequest newWebRequest(HttpServletRequest
servletRequest)
   {
   return new UploadWebRequest(servletRequest);
   }
 
 Here is the code in my upload panel class:
   FormVoid uploadform = new FormVoid(fileUploadForm)
{
   @Override
   protected void onSubmit() {
   final FileUpload upload =
fileUploadField.getFileUpload();
   if (upload != null) {
   try {
   File newFile = new
File(uploadFolder, upload.getClientFileName() );
   // Save to new file
   newFile.createNewFile();
   upload.writeTo(newFile);

_processSelection(server, newFile, destFolder);
   } catch (Exception e) {
   throw new
RuntimeException(Unable to write file);
   }
   } else {
   throw new RuntimeException(
file selected for upload is empty );
   }
   }
   };
   uploadform.setMultiPart(true);
   uploadform.setMaxSize(Bytes.gigabytes(1));
 
   uploadform.add(fileUploadField = new
FileUploadField(fileInput));
   uploadform.add(new UploadProgressBar(progress,
uploadform));
   uploadform.add( new UploadValidator(fileUploadField,
prefix) );
   add( uploadform );
 
 
 On Feb 3, 2011, at 12:37 AM, Timo Schmidt wrote:
 
 On Wed 02.02.2011 23:49, Valentin Avksentyev wrote:
 On Feb 2, 2011, at 2:22 PM, Valentin Avksentyev wrote:
 
 The files get uploaded just fine in my app, but no progress is 
 tracked.
 
 It's definitely hard to verify if the progress bar works in the 
 example sites, with a limit of 100k, I haven't tried throttling my 
 upload speed, I guess I should try that next.
 
 Any suggestions?
 
 Is your application runnning behind a proxy? If so, maybe the entire 
 client request will be buffered by the proxy before being passed on 
 to the backend proxied servers. As a result, upload progress meters 
 will not function correctly if they work by measuring the data 
 received by the backend servers.
 
 -Timo
 
 -
 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


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



How to set Wicket with embedded Jetty?

2011-02-06 Thread Surapol Pairojtanachai

Please guide me on how to set Wicket to run with embedded Jetty. I run
the code below and keep getting java.lang.IllegalStateException: filter
path was not configured.

Thanks in Advance,
Surapol Pairojtanachai

   Server server = new Server();
   SelectChannelConnector connector = new SelectChannelConnector();
   connector.setHost(localhost);
   connector.setPort(8080);
   server.setConnectors(new Connector[] { connector });
   Context root = new Context(server, /, Context.SESSIONS);
 ServletHolder serverHolder = new ServletHolder(new
DefaultServlet());
   root.addServlet(serverHolder, /*);
   FilterHolder filterHolder = new FilterHolder(WicketFilter.class);

filterHolder.setInitParameter(ContextParamWebApplicationFactory.APP_CLASS_PARAM,
MyWebServer.class.getName());
   root.addFilter(filterHolder, /*, Handler.DEFAULT);
   server.start();
   server.join();



ubuntu 10.10 amd64
JDK 1.6.0.23 amd64
Jetty 6.1.26



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



Wicket auth-roles and Spring Security 3

2011-02-06 Thread ookpalm

Hello everyone,

Can we provide a principle with many roles? My idea is to create role per
page. Something like.

@AuthorizeInstantiation(PageA)
Class PageA
...

@AuthorizeInstantiation(PageB)
Class PageB
...

@AuthorizeInstantiation(PageC)
Class PageC

And assign roles to a principle like  Mr. One has PageA, PageB roles so he
can access to PageA and PageB.

Can we do this in Wicket auth-roles and Spring Security 3 integration? Or is
there another way to achieve this?

Thank you
OOkpalm
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-auth-roles-and-Spring-Security-3-tp3263515p3263515.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 auth-roles and Spring Security 3

2011-02-06 Thread James Carman
Yes, you can do it.  You just have to figure out how to maintain all
of that role - user stuff.

On Sun, Feb 6, 2011 at 10:20 PM, ookpalm ookp...@gmail.com wrote:

 Hello everyone,

 Can we provide a principle with many roles? My idea is to create role per
 page. Something like.

 @AuthorizeInstantiation(PageA)
 Class PageA
 ...

 @AuthorizeInstantiation(PageB)
 Class PageB
 ...

 @AuthorizeInstantiation(PageC)
 Class PageC

 And assign roles to a principle like  Mr. One has PageA, PageB roles so he
 can access to PageA and PageB.

 Can we do this in Wicket auth-roles and Spring Security 3 integration? Or is
 there another way to achieve this?

 Thank you
 OOkpalm
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-auth-roles-and-Spring-Security-3-tp3263515p3263515.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: How to set Wicket with embedded Jetty?

2011-02-06 Thread James Carman
Why don't you try creating a quickstart
(http://wicket.apache.org/start/quickstart.html) and just copy the
code from the Start class that's provided for you there?


On Sun, Feb 6, 2011 at 8:58 PM, Surapol Pairojtanachai
sura...@bridsystems.com wrote:
 Please guide me on how to set Wicket to run with embedded Jetty. I run
 the code below and keep getting java.lang.IllegalStateException: filter
 path was not configured.

 Thanks in Advance,
 Surapol Pairojtanachai

       Server server = new Server();
       SelectChannelConnector connector = new SelectChannelConnector();
       connector.setHost(localhost);
       connector.setPort(8080);
       server.setConnectors(new Connector[] { connector });
       Context root = new Context(server, /, Context.SESSIONS);
             ServletHolder serverHolder = new ServletHolder(new
 DefaultServlet());
       root.addServlet(serverHolder, /*);
       FilterHolder filterHolder = new FilterHolder(WicketFilter.class);

 filterHolder.setInitParameter(ContextParamWebApplicationFactory.APP_CLASS_PARAM,
 MyWebServer.class.getName());
       root.addFilter(filterHolder, /*, Handler.DEFAULT);
       server.start();
       server.join();



 ubuntu 10.10 amd64
 JDK 1.6.0.23 amd64
 Jetty 6.1.26



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



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



Re: How to set Wicket with embedded Jetty?

2011-02-06 Thread Surapol Pairojtanachai
It doesn't create wicket project with embedded jetty. By embedded jetty, 
I mean no web.xml file. Is this possible?


Regards,
Surapol

On 02/07/2011 11:28 AM, James Carman wrote:

Why don't you try creating a quickstart
(http://wicket.apache.org/start/quickstart.html) and just copy the
code from the Start class that's provided for you there?


On Sun, Feb 6, 2011 at 8:58 PM, Surapol Pairojtanachai
sura...@bridsystems.com  wrote:

Please guide me on how to set Wicket to run with embedded Jetty. I run
the code below and keep getting java.lang.IllegalStateException: filter
path was not configured.

Thanks in Advance,
Surapol Pairojtanachai

   Server server = new Server();
   SelectChannelConnector connector = new SelectChannelConnector();
   connector.setHost(localhost);
   connector.setPort(8080);
   server.setConnectors(new Connector[] { connector });
   Context root = new Context(server, /, Context.SESSIONS);
 ServletHolder serverHolder = new ServletHolder(new
DefaultServlet());
   root.addServlet(serverHolder, /*);
   FilterHolder filterHolder = new FilterHolder(WicketFilter.class);

filterHolder.setInitParameter(ContextParamWebApplicationFactory.APP_CLASS_PARAM,
MyWebServer.class.getName());
   root.addFilter(filterHolder, /*, Handler.DEFAULT);
   server.start();
   server.join();



ubuntu 10.10 amd64
JDK 1.6.0.23 amd64
Jetty 6.1.26



-
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



Re: How to set Wicket with embedded Jetty?

2011-02-06 Thread James Carman
This is not a Wicket question, then.  I'd try the Jetty mailing lists.

On Sun, Feb 6, 2011 at 11:47 PM, Surapol Pairojtanachai
sura...@bridsystems.com wrote:
 It doesn't create wicket project with embedded jetty. By embedded jetty, I
 mean no web.xml file. Is this possible?

 Regards,
 Surapol

 On 02/07/2011 11:28 AM, James Carman wrote:

 Why don't you try creating a quickstart
 (http://wicket.apache.org/start/quickstart.html) and just copy the
 code from the Start class that's provided for you there?


 On Sun, Feb 6, 2011 at 8:58 PM, Surapol Pairojtanachai
 sura...@bridsystems.com  wrote:

 Please guide me on how to set Wicket to run with embedded Jetty. I run
 the code below and keep getting java.lang.IllegalStateException: filter
 path was not configured.

 Thanks in Advance,
 Surapol Pairojtanachai

       Server server = new Server();
       SelectChannelConnector connector = new SelectChannelConnector();
       connector.setHost(localhost);
       connector.setPort(8080);
       server.setConnectors(new Connector[] { connector });
       Context root = new Context(server, /, Context.SESSIONS);
             ServletHolder serverHolder = new ServletHolder(new
 DefaultServlet());
       root.addServlet(serverHolder, /*);
       FilterHolder filterHolder = new FilterHolder(WicketFilter.class);


 filterHolder.setInitParameter(ContextParamWebApplicationFactory.APP_CLASS_PARAM,
 MyWebServer.class.getName());
       root.addFilter(filterHolder, /*, Handler.DEFAULT);
       server.start();
       server.join();



 ubuntu 10.10 amd64
 JDK 1.6.0.23 amd64
 Jetty 6.1.26



 -
 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



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



Re: Wicket auth-roles and Spring Security 3

2011-02-06 Thread ookpalm

Thank you James for your answer.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-auth-roles-and-Spring-Security-3-tp3263515p3263615.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: How to set Wicket with embedded Jetty?

2011-02-06 Thread Surapol Pairojtanachai
I can easily create embedded jetty project (java web project without 
WEB-INF and web.xml), hence a very modular web server for many purposes. 
No need to have configuration for a simple/quick fix and small web 
server. Only embedded jetty with Wicket that I cannot do. It seems 
Wicket is really fixated to web.xml. Can this character be bypassed?


Thanks,
Surapol

On 02/07/2011 11:56 AM, James Carman wrote:

This is not a Wicket question, then.  I'd try the Jetty mailing lists.

On Sun, Feb 6, 2011 at 11:47 PM, Surapol Pairojtanachai
sura...@bridsystems.com  wrote:

It doesn't create wicket project with embedded jetty. By embedded jetty, I
mean no web.xml file. Is this possible?

Regards,
Surapol

On 02/07/2011 11:28 AM, James Carman wrote:

Why don't you try creating a quickstart
(http://wicket.apache.org/start/quickstart.html) and just copy the
code from the Start class that's provided for you there?


On Sun, Feb 6, 2011 at 8:58 PM, Surapol Pairojtanachai
sura...@bridsystems.comwrote:

Please guide me on how to set Wicket to run with embedded Jetty. I run
the code below and keep getting java.lang.IllegalStateException: filter
path was not configured.

Thanks in Advance,
Surapol Pairojtanachai

   Server server = new Server();
   SelectChannelConnector connector = new SelectChannelConnector();
   connector.setHost(localhost);
   connector.setPort(8080);
   server.setConnectors(new Connector[] { connector });
   Context root = new Context(server, /, Context.SESSIONS);
 ServletHolder serverHolder = new ServletHolder(new
DefaultServlet());
   root.addServlet(serverHolder, /*);
   FilterHolder filterHolder = new FilterHolder(WicketFilter.class);


filterHolder.setInitParameter(ContextParamWebApplicationFactory.APP_CLASS_PARAM,
MyWebServer.class.getName());
   root.addFilter(filterHolder, /*, Handler.DEFAULT);
   server.start();
   server.join();



ubuntu 10.10 amd64
JDK 1.6.0.23 amd64
Jetty 6.1.26



-
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



-
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