Wicket 6.0.0 + Netbeans + Atmosphere

2012-08-27 Thread Mats
Hi,

I just tried to get Atmosphere up and running in Wicket 6.0.0-beta3 using
Netbeans 7.2...

I have just added the jars needed one by one. Still I get some runtime error
at startup;

  @Override
  public void init() {
super.init();
eventBus = new EventBus(this);   SEVERE:
WebModule[/WebUI_2]PWC1270: Exception starting filter WicketApplication ...
  }

So, my question is; *Exactly what jars do I need to include in my project?*
I'm using NetBeans with Glassfish 3.1.2

This is the included jars so far...
http://apache-wicket.1842946.n4.nabble.com/file/n4651521/jars.png 

Anyone that could help me?





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-0-0-Netbeans-Atmosphere-tp4651521.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 6.0.0 + Netbeans + Atmosphere

2012-08-27 Thread Martin Grigorov
Hi,

There must be a more detailed exception in the logs explaining what
exactly is the problem.

There were several fixes to wicket-atmosphere since beta3. Create a
quickstart with 6.0-SNAPSHOT from
http://wicket.apache.org/start/quickstart.html and then add your
Atmosphere related code.
Wicket 6.0.0 is being voted and most likely will be released in the
next few days.

On Mon, Aug 27, 2012 at 9:25 AM, Mats mats.gudmunds...@delaval.com wrote:
 Hi,

 I just tried to get Atmosphere up and running in Wicket 6.0.0-beta3 using
 Netbeans 7.2...

 I have just added the jars needed one by one. Still I get some runtime error
 at startup;

   @Override
   public void init() {
 super.init();
 eventBus = new EventBus(this);   SEVERE:
 WebModule[/WebUI_2]PWC1270: Exception starting filter WicketApplication ...
   }

 So, my question is; *Exactly what jars do I need to include in my project?*
 I'm using NetBeans with Glassfish 3.1.2

 This is the included jars so far...
 http://apache-wicket.1842946.n4.nabble.com/file/n4651521/jars.png

 Anyone that could help me?





 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-6-0-0-Netbeans-Atmosphere-tp4651521.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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

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



Re: Wicket Render speed

2012-08-27 Thread steven.li
Thanks. Found out the root cause by jprofiler.  

It's the model problem, too many times to read database directly in the
model.

Thanks for your help very much !



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Render-speed-tp4651489p4651523.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 6.0.0 + Netbeans + Atmosphere

2012-08-27 Thread Emond Papegaaij
You probably did not setup Atmosphere. Wicket-Atmosphere requires Atmosphere 
to be available in your web application. Please consult the documentation of 
Atmosphere for instructions. You can also take a look at wicket-examples 
(especially web.xml and atmosphere.xml), which includes a working Wicket-
Atmosphere example.

Best regards,
Emond

On Monday 27 August 2012 00:25:44 Mats wrote:
 Hi,
 
 I just tried to get Atmosphere up and running in Wicket 6.0.0-beta3 using
 Netbeans 7.2...
 
 I have just added the jars needed one by one. Still I get some runtime error
 at startup;
 
   @Override
   public void init() {
 super.init();
 eventBus = new EventBus(this);   SEVERE:
 WebModule[/WebUI_2]PWC1270: Exception starting filter WicketApplication ...
   }
 
 So, my question is; *Exactly what jars do I need to include in my project?*
 I'm using NetBeans with Glassfish 3.1.2
 
 This is the included jars so far...
 http://apache-wicket.1842946.n4.nabble.com/file/n4651521/jars.png
 
 Anyone that could help me?
 
 
 
 
 
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-6-0-0-Netbeans-Atmosphere
 -tp4651521.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: Interpolate response with IResponseFilter

2012-08-27 Thread guillaume.mary
Thanks for the tip Sven, I will give it a try.
For now I have another issue about the AbstractTransformerBehavior: as soon
as I add it to my Page, I get encoding problems of characters into my page,
this is weird. Here is my very simple transformer:
new AbstractTransformerBehavior() {
public CharSequence transform(Component component, CharSequence output)
throws Exception {
return output.toString();
}
}

You should ask why are you using output.toString() since returning output
is sufficient ?. Well, the begining of the story is that I really need a
String instance to be interpolated by Wicket MapVariableInterpolator, I
encountered encoding problems so I removed interpolation and came to the
above code.

The encoding problem is that accent characters are replaced by ? in my
browser.

So, I realized that response headers are very different (in my client
browser) with and without an AbstractTransformerBehavior. I think it
shouldn't and I'm guessing that's the cause of my charset problems.
AbstractTransformerBehavior seems to lose the initial headers, but I didn't
see anything for that in Wicket code.
Any idea ?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Interpolate-response-with-IResponseFilter-tp4651476p4651525.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



Mounting URLs with locale prefix

2012-08-27 Thread Adriano dos Santos Fernandes
Hi!

I do want to mount our application URLs as following:

/${locale}/PageName

So I can access Page1 as:
/pt-br/Page1
/en-us/Page1

The application is a simple website with not so many dynamic content, so
in most cases it directly uses a href=... /, img src=... /
without wicket:id.

That's fine. hrefs and image srcs are resolved correct (wicket strips
the locale from images), but if they're referenced in CSS
(background-image, for example), Wicket does not do it, so I end with
some images going to /image and another ones going to /${locale}/image.

I may mount the resources in two different places, like:
/res/${name}
/${locale}/res/${name}

But this does not seems good for me.

What's the best practice to mount pages with a URL prefix and still make
HTML/CSS to work without needing to use Wicket components (wicket:id)
for everything?


Adriano


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



Re: Interpolate response with IResponseFilter

2012-08-27 Thread guillaume.mary
After searching a bit, I found that AbstractTransformerBehavior replaces the
RequestCycle.response temporarly to put its own, between beforeRender en
afterRender methods, whereas other classes manipulates the response during
that phase, so when AbstractTransformerBehavior puts back the original
response, it is no more the official response.
In fact I'm not sure that AbstractTransformerBehavior is for me, i'm going
to write my own behavior which doesn't keep the orginal response. First
tests seem promising.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Interpolate-response-with-IResponseFilter-tp4651476p4651529.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: Mounting URLs with locale prefix

2012-08-27 Thread Martin Grigorov
Hi,

Check http://www.wicket-library.com/wicket-examples/mappers/en_US
example. It shows how to do this with LocaleFirstMapper.java

On Mon, Aug 27, 2012 at 2:20 PM, Adriano dos Santos Fernandes
adrian...@gmail.com wrote:
 Hi!

 I do want to mount our application URLs as following:

 /${locale}/PageName

 So I can access Page1 as:
 /pt-br/Page1
 /en-us/Page1

 The application is a simple website with not so many dynamic content, so
 in most cases it directly uses a href=... /, img src=... /
 without wicket:id.

 That's fine. hrefs and image srcs are resolved correct (wicket strips
 the locale from images), but if they're referenced in CSS
 (background-image, for example), Wicket does not do it, so I end with
 some images going to /image and another ones going to /${locale}/image.

 I may mount the resources in two different places, like:
 /res/${name}
 /${locale}/res/${name}

 But this does not seems good for me.

 What's the best practice to mount pages with a URL prefix and still make
 HTML/CSS to work without needing to use Wicket components (wicket:id)
 for everything?


 Adriano


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




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

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



Re: Performance tuning Wicket[1.5]...

2012-08-27 Thread Martin Grigorov
Fire Yourkit/JProfiler and see what they say.

On Mon, Aug 27, 2012 at 2:45 PM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 Hi

 Im seeing a load on our server.

 Tried these settings in wicketapplication:

 getPageSettings().setVersionPagesByDefault(false);
 getStoreSettings().setInmemoryCacheSize(200);
 And in our MainPage:
 setVersioned(false);

 All of our services are being cached, so it's not the backend thats the
 problem.. Im using LDM's everywhere.

 Our main page are using ajax to refresh itself. And load
 turns linearly bad, until max load on somewhere around 100 sessions.

 Memory are not a problem, wicket app uses very little around 100 mb and
 server has 4gb. CPU are a AMD opteron 2.2 ghz.


 --
 Best regards / Med venlig hilsen
 Nino Martinez



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

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



Re: Performance tuning Wicket[1.5]...

2012-08-27 Thread nino martinez wael
Yup, I'll do that another round.. Although I'll use visualvm...

2012/8/27 Martin Grigorov mgrigo...@apache.org

 Fire Yourkit/JProfiler and see what they say.

 On Mon, Aug 27, 2012 at 2:45 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
  Hi
 
  Im seeing a load on our server.
 
  Tried these settings in wicketapplication:
 
  getPageSettings().setVersionPagesByDefault(false);
  getStoreSettings().setInmemoryCacheSize(200);
  And in our MainPage:
  setVersioned(false);
 
  All of our services are being cached, so it's not the backend thats the
  problem.. Im using LDM's everywhere.
 
  Our main page are using ajax to refresh itself. And load
  turns linearly bad, until max load on somewhere around 100 sessions.
 
  Memory are not a problem, wicket app uses very little around 100 mb and
  server has 4gb. CPU are a AMD opteron 2.2 ghz.
 
 
  --
  Best regards / Med venlig hilsen
  Nino Martinez



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

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




-- 
Best regards / Med venlig hilsen
Nino Martinez


Best practices for passing configurations, such as Facebook app_id, to JavaScript

2012-08-27 Thread Alec Swan
Hello,

We deploy our web app on different domains which means that JavaScript
Facebook integration needs to use different app_id values. I am
planning to store these values in a configuration file and wonder how
to expose them to JavaScript. I would also like to write a unit test
that verifies that settings were passed correctly.

I could use a HeaderContributor to inject raw JavaScript, but this
doesn't seem to be very unit-testable. I could create a div which
attributes/elements contain the settings, which seems to be more
unit-testable.

Thoughts?

Thanks,

Alec

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



Re: Which RENDER_STRATEGY is best for clustered setup?

2012-08-27 Thread sudeivas
Though I am using 'ONE_PASS_RENDER' strategy, I am still getting the below
warning,

WARN http-8000-2 [org.apache.wicket.request.handler.render.WebPageRenderer]
- Falling back to Redirect_To_Buffer render strategy because none of the
conditions matched.

Am I missing something? I am worried that this may cause some page
expiration issue.

-Suresh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Which-RENDER-STRATEGY-is-best-for-clustered-setup-tp4651420p4651536.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: Mounting URLs with locale prefix

2012-08-27 Thread asfernandes
Martin,

Thanks for the Mapper hint, but things still don't work well in my case
(html files without wicket:id tags).

I had it almost working, but I need to call
getMarkupSettings().setAutomaticLinking(true), but this caused another
problem: Wicket is putting an onclick in   tags inside   redirecting to the
image (via window.location.href). I do not want it, I want just my links ( )
work.

When I remove setAutomaticLinking(true), Wickets sets wrong directory. It
appends a ../ before src, hrefs, etc.

This is what I said initially on the need to mount things in two different
places. I mount my resources inside the locale directory, so CSS
background-image in HTML files work, but then it fails on the other
resources (caused by this ../ prefix).



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Mounting-URLs-with-locale-prefix-tp4651528p4651539.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