Re: How to handle these nested table tags

2007-09-10 Thread Roland Huss

Hi,

 td width=284 align=center class=welcomeBox
 ¡¡  Welcome label wicket:id=userName/label

Could it be, that label is not supported as markup for a Label component
and that you should use something like  instead ?

... roland

-- 
View this message in context: 
http://www.nabble.com/How-to-handle-these-nested-%3Ctable%3E-tags-tf4412208.html#a12587601
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to handle these nested table tags

2007-09-10 Thread Kevin Liu
Thank you for your help!  But the major problem is The Label Is Not at the same 
level as the form , the Label is deep inside those table tags. Is there any 
solution to this kind of problem.  
Thanks again~
Kevin Liu [EMAIL PROTECTED] wrote:  I have a html page that displays welcome 
,XXX ,or something like that, the XXX is the current user name, and I use 
Label to display it. But there is an exception when it runs.

Unable to find component with id 'userName' in [MarkupContainer [Component id = 
_relative_path_prefix_14, page = com.cmip.web.pages.TopFrame, path = 
3:topForm:_relative_path_prefix_13:_relative_path_prefix_14.WebMarkupContainer, 
isVisible = true, isVersioned = true]]. This means that you declared 
wicket:id=userName in your markup, but that you either did not add the 
component to your page at all, or that the hierarchy does not match.


The code:
public TopFrame(){
super();
String name = ((CMIPSession)this.getSession()).getUser().getUserName();
Label userName = new Label(userName,new Model(name));
Form topForm = new Form(topForm);
topForm.add(userName);
this.add(topForm);


html:


  
  

  
   
  
  

  °æ±¾ºÅ£ºV1.0

  
  
  






  

  

  
  

  
  

  


  
  


   
  
¡¡ Welcome 







  
   updateTime();
  




-Kevin Liu

-
Pinpoint customers who are looking for what you sell. 


-Kevin Liu
   
-
Pinpoint customers who are looking for what you sell. 

Re: First Day Disgust!

2007-09-10 Thread chickabee

It is absurd. You can deploy your web application wherever you want. 

Thanks for explaining the most esoteric aspect of web applications. Perhaps
no one knew it so far :-) .   Well, it's not your fault either since this
thread has grown out of proportions, and it's not easy to read all message.



Alex Objelean wrote:
 
 It is absurd. You can deploy your web application wherever you want. 
 I use Merve Eclipse plugin. It has the same benefits as Jetty, as you do
 not need to deploy your war for each modification, you just push the start
 button and it works (by inspecting the classpath of the projects
 involved). Or use maven to build the war for you, then copy it manually to
 tomcat or jboss or whatever... Or use ant (if you like it so much) to do
 the same thing.
 
 Alex.
 
 
 chickabee wrote:
 
 2. It favors Jetty. ( Why even say Jetty, pom.xml has jetty dependencies
 defined. )
 
 
 

-- 
View this message in context: 
http://www.nabble.com/First-Day-Disgust%21-tf4405663.html#a12587740
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: {wicket 1.3 beta 3} Howto add keywords No cache etc?

2007-09-10 Thread Nino Saturnino Martinez Vazquez Wael
No, it did not work for me using ajax. Until I added one of the 
solutions described.


Should I provide a quickstart?

regards Nino

Igor Vaynberg wrote:

as far as i know Image works just fine with ajax. if you want an image that
is not cached use NonCachingImage.

-igor


On 9/9/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
wrote:
  

This has been rejected as invalid for fixing... But should'nt at least
something have been added to the component. Currently Image are not
valid for ajax calls, and you wont see the problem until you catch it in
your browser.. Either we write something in the javadocs or??? Could be
nice to tell if the component did not work with ajax, somehow.

regards Nino

Matej Knopp wrote:


Well, i guess with component path encoded in url, the milliseconds could
  

do ;)


-Matej

On 9/7/07, Martijn Dashorst [EMAIL PROTECTED] wrote:

  

Yes, but all those images will have a different url, or are they the
same? The milliseconds parameter is only used to distinguish between
requests, not within one.

Martijn

On 9/7/07, Matej Knopp [EMAIL PROTECTED] wrote:



Really? What's so odd about it? Say you have a page with 100 images.
How long do you think such page renders? It shouldn't take long than
say 5 ms on a decent machine.

-Matej

On 9/7/07, Johan Compagner [EMAIL PROTECTED] wrote:

  

2 tags generating the same milisecond for the same client/session?
that looks very very very odd to me.

johan


On 9/7/07, Nino Saturnino Martinez Vazquez Wael 


[EMAIL PROTECTED]


wrote:



Actually  we discussed that.

I suggested it but as Matej wrote:
don't think so. you can have two tags generated in same
  

millisecond.. As


for nano might be better, lesser chance for tags being generated in
  

the


same nanosec. But whats wrong with autoindex?

Martijn Dashorst wrote:

  

Why not use System.currentTimeMillis()? Or if you are really


concerned


use nanotime.

Martijn

On 9/7/07, Nino Saturnino Martinez Vazquez Wael 


[EMAIL PROTECTED]


wrote:

  

so no, talking to Matej on ##wicket, the fix was this:

Resolutions are these two :
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put(src, tag.getString(src) + rand= +
Math.random());
}

or event better since random could give duplicate results:
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put(src, tag.getString(src) + autoIndex= +
getPage().getAutoIndex());
}
Although im not sure if its safe to use autoIndex?I've put up a
  

feature


request for it to be implemented.

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


-Nino


Nino Saturnino Martinez Vazquez Wael wrote:


  

this is whats generated:





http://localhost:8080/thirdparty-webapp/thirdParty/?wicket:interface=:4:form:phoneA:phoneThumb:image::IResourceListener


::

  

regards Nino

Martijn Dashorst wrote:




The most failsafe solution to the update image using Ajax
  

request to


my mind is to add a random number to the url for the image (I
  

thought


we already did that?).

Martijn

On 9/7/07, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:



  

Hi

How do I add keywords no-cache and etc, for a panel? Reason are


that


the
panel carries a image and that gets cached so when my ajax call
comes in
and updates the model then the old image are shown..

regards Nino






-


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  


-


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

-
To unsubscribe, 

Re: Invitation to Cocoon GetTogether 2007

2007-09-10 Thread Paolo Di Tommaso
I'm not a Wicket core developer guru, but I'm leading a big Wicket based
project in Rome.

I would pleased to attend Cocoon conference and bring my Wicket experience.


Paolo Di Tommaso


On 9/9/07, Grzegorz Kossakowski [EMAIL PROTECTED] wrote:

 Hello Wicket devs and users!

 On behalf of Cocoon GetTogether organizers I would invite you to Cocoon GT
 2007 that will take place
 in Rome, Italy this year!

 First two days are reserved for community meet up called Hackathon.
 Hackathon is informal event
 which essential function is to have fun while developers are hacking their
 favourite projects.

 All in all, GT is a great venue for you to spend few days out in a nice
 location and hack around
 your Wicket stuff or help us hack Wicket into Cocoon as we already plan to
 do so! :-)
 It is also a great chance for some cross-pollination and ideas sharing. We
 are going to have really
 much fun, food, beers in a one big room.
 With fancy Wi-Fi connected table and a glass of italian wine?
 Then come Rome and join us!

 More details on http://www.cocoongt.org/

 --
 Grzegorz Kossakowski
 Committer and PMC Member of Apache Cocoon
 http://reflectingonthevicissitudes.wordpress.com/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: {wicket 1.3 beta 3} Howto add keywords No cache etc?

2007-09-10 Thread Nino Saturnino Martinez Vazquez Wael
I know(and agree), but I just feel that we should somehow warn people 
that image won't work with ajax?


regards Nino

Matej Knopp wrote:

Again, try using NonCachingImage instead of Image. I does exacly what
the suggested fix does. I just overlooked it.

-Matej

On 9/10/07, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

No, it did not work for me using ajax. Until I added one of the
solutions described.

Should I provide a quickstart?

regards Nino

Igor Vaynberg wrote:


as far as i know Image works just fine with ajax. if you want an image that
is not cached use NonCachingImage.

-igor


On 9/9/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
wrote:

  

This has been rejected as invalid for fixing... But should'nt at least
something have been added to the component. Currently Image are not
valid for ajax calls, and you wont see the problem until you catch it in
your browser.. Either we write something in the javadocs or??? Could be
nice to tell if the component did not work with ajax, somehow.

regards Nino

Matej Knopp wrote:



Well, i guess with component path encoded in url, the milliseconds could

  

do ;)



-Matej

On 9/7/07, Martijn Dashorst [EMAIL PROTECTED] wrote:


  

Yes, but all those images will have a different url, or are they the
same? The milliseconds parameter is only used to distinguish between
requests, not within one.

Martijn

On 9/7/07, Matej Knopp [EMAIL PROTECTED] wrote:




Really? What's so odd about it? Say you have a page with 100 images.
How long do you think such page renders? It shouldn't take long than
say 5 ms on a decent machine.

-Matej

On 9/7/07, Johan Compagner [EMAIL PROTECTED] wrote:


  

2 tags generating the same milisecond for the same client/session?
that looks very very very odd to me.

johan


On 9/7/07, Nino Saturnino Martinez Vazquez Wael 



[EMAIL PROTECTED]



wrote:




Actually  we discussed that.

I suggested it but as Matej wrote:
don't think so. you can have two tags generated in same

  

millisecond.. As



for nano might be better, lesser chance for tags being generated in

  

the



same nanosec. But whats wrong with autoindex?

Martijn Dashorst wrote:


  

Why not use System.currentTimeMillis()? Or if you are really



concerned



use nanotime.

Martijn

On 9/7/07, Nino Saturnino Martinez Vazquez Wael 



[EMAIL PROTECTED]



wrote:


  

so no, talking to Matej on ##wicket, the fix was this:

Resolutions are these two :
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put(src, tag.getString(src) + rand= +
Math.random());
}

or event better since random could give duplicate results:
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put(src, tag.getString(src) + autoIndex= +
getPage().getAutoIndex());
}
Although im not sure if its safe to use autoIndex?I've put up a

  

feature



request for it to be implemented.

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


-Nino


Nino Saturnino Martinez Vazquez Wael wrote:



  

this is whats generated:






http://localhost:8080/thirdparty-webapp/thirdParty/?wicket:interface=:4:form:phoneA:phoneThumb:image::IResourceListener



::


  

regards Nino

Martijn Dashorst wrote:





The most failsafe solution to the update image using Ajax

  

request to



my mind is to add a random number to the url for the image (I

  

thought



we already did that?).

Martijn

On 9/7/07, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:




  

Hi

How do I add keywords no-cache and etc, for a panel? Reason are



that



the
panel carries a image and that gets cached so when my ajax call
comes in
and updates the model then the old image are shown..

regards Nino







-



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  

-




Form.updateFormComponentModels bug?

2007-09-10 Thread Matthijs Wensveen

Hi,

According to the javadoc Form.updateFormComponentModels should update 
all the models of all FormComponents in a form (without validation 
presumably?). This sets all the model objects to the convertedInput 
value (in FormComponent.updateModel), unfortunately convertedInput is 
only set after a call to validate(). This really makes 
updateFormComponentModels useless as a protected method. If validation 
is really mandatory (which I doubt), processInput should be the only 
callable method as it validates first and then updates the model.


In any case, the call to convertInput() inside validate() strikes me as 
odd (the wrong place to call such a method).
Also, the javadoc of FormComponent.updateModel() states: .. it expect 
that the object is already converted through the convert() call, but 
there is no convert() method in FormComponent.


Off-topic: Why are so much methods marked final? This might prevent 
API-misuse but also prevents innovative _use_! I can understand you want 
framework users to do it the wicket way, because they will probably only 
spam the users list with questions that have obvious solutions (like me 
:D ). But sometimes it's just frustrating.
Maybe this is a consequence of the fact that wicket forces you to 
subclass components so much. It's just too tempting to override so much 
methods. I love wicket (I really do!) but I'd rather see wicket more 
event listener oriented. This would also make it easier to listen to 
events that are very deeply nested (fetch the component, register a 
listener), which is almost impossible now.


--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Stuff Dojo Repository

2007-09-10 Thread Vincent Demay

Hi,

Wicketstuff dojo has just been modified in order to build its artifact 
on the same location as usually :

http://www.wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-dojo

Cheers

--
Vincent

Maurice Marrink wrote:

Johan recently made some changes to the wicket-stuff repository (see
dev mailing list). requiring all projects (automatically build via
bamboo) to update there pom. So if they are not yet back on there old
spot they probably did not make the change.

You could try bugging them about that ;)

As soon as they update there poms is should be right were it always was.

Maurice

On 9/8/07, Aaron Hiniker [EMAIL PROTECTED] wrote:
  

Where did it move to?

Aaron

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Kronos-cms installation

2007-09-10 Thread Ted Roeloffzen
I was one of two people who built kronos, but i have to say that i haven't
worked on it for quite a while, because of time issues, so the dependency is
most likely out of date.

Ted


2007/9/8, Maurice Marrink [EMAIL PROTECTED]:

 Ted, who build kronos, is on vacation and I'm not sure if he is
 monitoring the mailing list during this time. I do believe the 1.2
 branch to be the latest version. As for your other questions i have no
 idea :) A couple of months ago there also some questions on this
 mailing list (well the old sourceforge one actually) have you tried
 those?

 Maurice

 On 9/8/07, Tauren Mills [EMAIL PROTECTED] wrote:
  I just checked out kronos-cms to take a look at it.  I could only find
  it under the wicket-1.2 branch in wicketstuff.  Is that correct, or is
  there a 1.3 release?
 
  During mvn install, I got a build error that it was missing
  javax.jcr:jcr:jar:1.0.1.  It suggested the following:
 
Try downloading the file manually from:
 
 http://www.day.com/site/en/index/related/downloads/RI_download.html
 
Then, install it using the command:
mvn install:install-file -DgroupId=javax.jcr -DartifactId=jcr \
-Dversion=1.0.1 -Dpackaging=jar -Dfile=/path/to/file
 
  When I went to that download page, and filled out the form to get the
  download, I downloaded a file called jcr-ri-1.0.zip.  There isn't a
  jar file included in it.  Upon looking at the sources, it includes
  some org.apache.jackrabbit packages.
 
  Is that really the file I should be using, or is the kronos dependency
  out of date?  On the apache jackrabbit site, there are downloads
  available as well.  Would those work instead of the day.com download?
 
  I don't want to waste  a bunch of time trying to get this working.  If
  anyone else has messed with kronos-cms and has some tips, I'm all
  ears.
 
  If someone could share their jcr-1.0.1.jar, that would work too!
 
  Thanks!
  Tauren
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: why final?

2007-09-10 Thread Martijn Dashorst
On 9/10/07, Matthijs Wensveen [EMAIL PROTECTED] wrote:
 Off-topic: Why are so much methods marked final? This might prevent
 API-misuse but also prevents innovative _use_! I can understand you want
 framework users to do it the wicket way, because they will probably only
 spam the users list with questions that have obvious solutions (like me
 :D ). But sometimes it's just frustrating.

Innovative use is something we frown upon. Seriously: we *NEED* the
ability to be able to get stuff out of the way. Sometimes the hiding
capabilities of Java are not enough in a good OO hierarchy. When we
open up something to be overridable we do so *only* when we are
confident it will not break stuff. This gives us leeway to replace
parts of our api we aren't proud of (yes we are still learning) with
an api that is much better suited.

More from an old faq (I added it to our wiki):

Classes and methods in Wicket are generally declared as final until
the need for extensibility is well understood. While this defensive
approach may seem obsessive to some, the major benefit is that classes
and methods which haven't been designed for extension cannot be
extended until the problem(s) at hand are examined by the Wicket
development team. This helps to ensure that the best approach is
taken. Sometimes, straightforward extension is not the best approach.
Sometimes, features of the API have been misapplied or misunderstood.
It's best to catch this early.

While this does provoke more discussion and sometimes a bit of
annoyance, the discussion generally improves Wicket and will help
ensure greater backwards compatibility in the future. It's really a
matter of how the development team manages API commitments. By making
fewer commitments in the API in terms of extension points, we are more
likely to be able to support those extension points that we do allow
in the future. We are also more likely to catch anti-pattern use cases
and provide features appropriate to the problems you are trying to
solve.

Honestly, we aren't trying to annoy anyone and we do aim to respond
quickly to any extension needs that arise which make sense. If you
really don't agree with all this, remember that Wicket is open source.
You can always check out the source code, remove the final keyword
that offends you and rebuild the project.

 Maybe this is a consequence of the fact that wicket forces you to
 subclass components so much. It's just too tempting to override so much
 methods. I love wicket (I really do!) but I'd rather see wicket more
 event listener oriented. This would also make it easier to listen to
 events that are very deeply nested (fetch the component, register a
 listener), which is almost impossible now.

This is not good OO IMO. Here you break encapsulation big time. It is
much cleaner IMO to provide extension points as part of your API, not
to give full access to a component.

The following panel illustrates my point: the panel clearly publishes
two important extension points: onLogin and onLogoff. Giving direct
access to the form and having to register an onSubmitListener or the
link and having to register an onClick listener breaks encapsulation:
I am then bound to always supply the link and form. I can't make it an
ajax panel without my clients having to know about it.

public abstract class LoginPanel extends Panel {
public LoginPanel(String id) {

if(Session.get().getUser() != null) {
   add(new LogoffFragment(content));
} else {
   add(new UsernamePasswordFragment(content));
}
}

protected abstract boolean onLogin(String username, Stringpassword);
protected abstract void onLogoff();

private class LogoffFragment extends Fragment {
...
   add(new Link(logoff) {
   protected void onClick() {
   onLogoff();
   Session.get().invalidate();
   }
   });
   ...
}

-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket-based website gone on-line

2007-09-10 Thread Jan Kriesten

hi thomas,

  http://www.syntevo.com
 If somebody finds a problem, please let me know.

looks nice. :-) only thing you should consider is to open external links in a
new browser window (so your site stays available).

regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket-based website gone on-line

2007-09-10 Thread Martijn Dashorst
Congratulations!

You might want to set setStripWicketTags to true though.

Martijn

On 9/10/07, Thomas Singer [EMAIL PROTECTED] wrote:
 I just wanted to let you know, that our Wicket-based website gone on-line:

   http://www.syntevo.com

 If somebody finds a problem, please let me know.

 We really liked the flexibility of Wicket. Although not supported out-of-the
 box, we configured Wicket, so our templates can be 100% pure HTML (except
 the wicket:id attributes), all links to pages, static stylesheets or
 graphics are valid at development time (even in embedded templates) and
 Wicket corrects them for us.

 Thanks, Wicket-team, for providing such a high-quality framework (in means
 of well-thought architecture, flexibility and code quality) and the
 outstanding e-mail support.

 --
 Best regards,
 Thomas Singer
 _
 SyntEvo GmbH
 Brunnfeld 11
 83404 Ainring
 Germany
 www.syntevo.com

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to handle these nested table tags

2007-09-10 Thread Ryan Holmes
No, LABEL is a valid HTML element for a Label component (it would be  
pretty twisted if it wasn't ;)). Besides, if a tag check was failing,  
the error message would say so.


But keep the guesses coming. That's all I've been able to for Kevin  
so far...


-Ryan

On Sep 10, 2007, at 12:00 AM, Roland Huss wrote:



Hi,


td width=284 align=center class=welcomeBox
¡¡  Welcome label wicket:id=userName/label


Could it be, that label is not supported as markup for a Label  
component

and that you should use something like  instead ?

... roland

--
View this message in context: http://www.nabble.com/How-to-handle- 
these-nested-%3Ctable%3E-tags-tf4412208.html#a12587601

Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Johan Compagner
invocation count 1??

So you only do 1 request and you profile that?
thats not a good test. You have to do plenty and multiply on  the same time
(10 for 100 request or something like that)
to really see the difference. (and have a warm up phase)

johan



On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Matej, I must disagree with you regarding performance issues of the
 SecondLevelSessionStore. I've reverted the Application#newSessionStore to
 HttpSessionStore and this significantly improved the application overall
 performance. Maybe this is not so obvious for small applications, but when
 it is about a large one - things changes.

 Below, you will find attached two images. The first one is a profiling of
 an
 action when working with HttpSessionStore, the second one is a profiling
 for
 the same action when using SecondSessionLevelStore. The difference is
 huge:
 593ms vs 174420ms. I cannot explain what exactly is going on, but I've
 noticed that by switching from default SecondLevelSessionStore to the
 HttpSessionStore improved a lot the responsiveness of the application.

 Alex.

 http://www.nabble.com/file/p12588790/HttpSessionStore.jpg
 http://www.nabble.com/file/p12588790/SecondSessionLevelStore.jpg




 Matej Knopp-2 wrote:
 
  You can revert to httpsessionstore by changing
  Application.newSessionStore method. But that's not recommended. What
  are your performance problems? I doubt it is caused by the session
  store.
 
  -Matej
 
  On 9/7/07, jamieballing [EMAIL PROTECTED] wrote:
 
  We are trying to do some performance troubleshooting and want to
 disable
  the
  second level page cache.
 
  Is there any way to do this?
 
  Thanks,
  Jamie
  --
  View this message in context:
 
 http://www.nabble.com/Disable-the-SecondLevelPageCache--tf4403977.html#a12563895
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Disable-the-SecondLevelPageCache--tf4403977.html#a12588790
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Wicket-based website gone on-line

2007-09-10 Thread Ryan Holmes


On Sep 10, 2007, at 1:31 AM, Jan Kriesten wrote:

looks nice. :-) only thing you should consider is to open external  
links in a

new browser window (so your site stays available).

regards, --- jan.


Gah! I thought opening new windows for external links went out with  
the blink tag ;) Seriously, isn't that universally agreed to be  
almost as annoying as popup ads and sort of tantamount to a big neon  
sign saying hi, we haven't used the internet in about 5 years?


I say do as Wikipedia does and leave the navigation up to users. If  
they want to come back after visiting an external link they'll hit  
the back button.


-Ryan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Johan Compagner
that looks very strange to me. We have also a very large app here and we
dont notice a difference
So i am very curious what is happening at your place then. Are you sure for
example that the pages
are serializable ?  That we don't have constantly exceptions?

johan


On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Maybe the profiling was not a perfect one. But still, I have to give up
 using
 SecondSessionLevelStore just because the responsiveness of the application
 is very slow.


 Johan Compagner wrote:
 
  invocation count 1??
 
  So you only do 1 request and you profile that?
  thats not a good test. You have to do plenty and multiply on  the same
  time
  (10 for 100 request or something like that)
  to really see the difference. (and have a warm up phase)
 
  johan
 
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
 
  Matej, I must disagree with you regarding performance issues of the
  SecondLevelSessionStore. I've reverted the Application#newSessionStore
 to
  HttpSessionStore and this significantly improved the application
 overall
  performance. Maybe this is not so obvious for small applications, but
  when
  it is about a large one - things changes.
 
  Below, you will find attached two images. The first one is a profiling
 of
  an
  action when working with HttpSessionStore, the second one is a
 profiling
  for
  the same action when using SecondSessionLevelStore. The difference is
  huge:
  593ms vs 174420ms. I cannot explain what exactly is going on, but I've
  noticed that by switching from default SecondLevelSessionStore to the
  HttpSessionStore improved a lot the responsiveness of the application.
 
  Alex.
 
  http://www.nabble.com/file/p12588790/HttpSessionStore.jpg
  http://www.nabble.com/file/p12588790/SecondSessionLevelStore.jpg
 
 
 
 
  Matej Knopp-2 wrote:
  
   You can revert to httpsessionstore by changing
   Application.newSessionStore method. But that's not recommended. What
   are your performance problems? I doubt it is caused by the session
   store.
  
   -Matej
  
   On 9/7/07, jamieballing [EMAIL PROTECTED] wrote:
  
   We are trying to do some performance troubleshooting and want to
  disable
   the
   second level page cache.
  
   Is there any way to do this?
  
   Thanks,
   Jamie
   --
   View this message in context:
  
 
 http://www.nabble.com/Disable-the-SecondLevelPageCache--tf4403977.html#a12563895
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Disable-the-SecondLevelPageCache--tf4403977.html#a12588790
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Disable-the-SecondLevelPageCache--tf4403977.html#a12589190
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to force a delete (from disk) of the session from the session store?

2007-09-10 Thread Johan Compagner
you should call invalidate() anyway instead of invalidateNow()
there could maybe be usecases where you should call the invalidateNow() for
example if you want to invalidate
the current http session and make in the same request a new one (if that is
possible??)

But you should do invalidate() because that will clean up the session after
the current request ends

johan


On 9/9/07, Chris Lintz [EMAIL PROTECTED] wrote:


 Interesting.  I was using session.invalidateNow() which did not remove it
 from disk.  But session.invalidate() worked like a charm.  Should
 session.invalidateNow() also remove the session from disk immediately?

 thanks for your help


 Eelco Hillenius wrote:
 
  Chris Lintz wrote:
  
   Hi,
   When a user logouts of the site, i want to kill the session and have
 it
  be
   removed from disk immediately.  I have extended WebSession properly,
  but
   no methods on the WebSession class seem to do the trick for me.
  
   Is there a way to to trigger the removal of the session cleanly from
  disk
   via the SessionStore or some other approach?
  
 
  I think this is done automatically when you call session.invalidate().
 
  Yep, that should do the trick.
 
  Eelco
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-to-force-a-delete-%28from-disk%29-of-the-session-from-the-session-store--tf4404925.html#a12580502
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Wicket Stuff Dojo Repository

2007-09-10 Thread Vincent Demay

Maurice Marrink wrote:

@vincent
Hmm, looks like you are generating unique id's for your snapshots. I
don't think that is wise as the server will run out of disk space like
that in no time. You should put uniqueVersionfalse/uniqueVersion
inside the snapshotRepository tag.

  

Tnx Maurice,

I added it.

Cheers

--
Vincent


Maurice

On 9/10/07, Vincent Demay [EMAIL PROTECTED] wrote:
  

Hi,

Wicketstuff dojo has just been modified in order to build its artifact
on the same location as usually :
http://www.wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-dojo

Cheers

--
Vincent

Maurice Marrink wrote:


Johan recently made some changes to the wicket-stuff repository (see
dev mailing list). requiring all projects (automatically build via
bamboo) to update there pom. So if they are not yet back on there old
spot they probably did not make the change.

You could try bugging them about that ;)

As soon as they update there poms is should be right were it always was.

Maurice

On 9/8/07, Aaron Hiniker [EMAIL PROTECTED] wrote:

  

Where did it move to?

Aaron

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Param = null

2007-09-10 Thread chickabee

Here is the constructor of the class i have:

public CategoryBrowser(final PageParameters parameters) {
// Add the simplest type of label
add(new Label(message, Welcome to the Category Browser Page));

System.out.println(Param =  + parameters.getString(id) );
}


When I use the url:
https://lilo:8443/whisky/app/cat/?id=1
Not to mention that i have been using the Nice Url here for the above class.

I get the following  in consol output:
Param = null

Can anyone point out what may b wrong? I expected it to be:
Param = 1

-- 
View this message in context: 
http://www.nabble.com/Param-%3D-null-tf4413478.html#a12589727
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Param = null

2007-09-10 Thread Francis De Brabandere
tried https://lilo:8443/whisky/app/cat/id/1 ?

you might want to have a look at QueryStringUrlCodingStrategy

On 9/10/07, chickabee [EMAIL PROTECTED] wrote:

 Here is the constructor of the class i have:

 public CategoryBrowser(final PageParameters parameters) {
 // Add the simplest type of label
 add(new Label(message, Welcome to the Category Browser Page));

 System.out.println(Param =  + parameters.getString(id) );
 }


 When I use the url:
 https://lilo:8443/whisky/app/cat/?id=1
 Not to mention that i have been using the Nice Url here for the above class.

 I get the following  in consol output:
 Param = null

 Can anyone point out what may b wrong? I expected it to be:
 Param = 1

 --
 View this message in context: 
 http://www.nabble.com/Param-%3D-null-tf4413478.html#a12589727
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Stuff Dojo Repository

2007-09-10 Thread Johan Compagner
yes please change this because else i can keep on deleting constantly stuff
:(


On 9/10/07, Maurice Marrink [EMAIL PROTECTED] wrote:

 @vincent
 Hmm, looks like you are generating unique id's for your snapshots. I
 don't think that is wise as the server will run out of disk space like
 that in no time. You should put uniqueVersionfalse/uniqueVersion
 inside the snapshotRepository tag.

 Maurice

 On 9/10/07, Vincent Demay [EMAIL PROTECTED] wrote:
  Hi,
 
  Wicketstuff dojo has just been modified in order to build its artifact
  on the same location as usually :
 
 http://www.wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-dojo
 
  Cheers
 
  --
  Vincent
 
  Maurice Marrink wrote:
   Johan recently made some changes to the wicket-stuff repository (see
   dev mailing list). requiring all projects (automatically build via
   bamboo) to update there pom. So if they are not yet back on there old
   spot they probably did not make the change.
  
   You could try bugging them about that ;)
  
   As soon as they update there poms is should be right were it always
 was.
  
   Maurice
  
   On 9/8/07, Aaron Hiniker [EMAIL PROTECTED] wrote:
  
   Where did it move to?
  
   Aaron
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Form.updateFormComponentModels bug?

2007-09-10 Thread Matthijs Wensveen

Johan Compagner wrote:

On 9/10/07, Matthijs Wensveen [EMAIL PROTECTED] wrote:
  

Hi,

According to the javadoc Form.updateFormComponentModels should update
all the models of all FormComponents in a form (without validation
presumably?). This sets all the model objects to the convertedInput





no it updates the form component models where conversion and validation did
go alright.
  


Okay, so the difference with Form.process() is that process() does not 
update at all when one of the FormComponents is invalid, and 
updateFormComponentModels updates all that ARE valid, right? So that's 
usually what you want (and what I want in this case). Thanks for making 
this clear.


In Form.process() where this method is called, the form is validated 
first, so conversion took place as a side effect of validation. There I 
can see how it works. Maybe the javadoc of 
Form.updateFormComponentModels should state that Form.validate should be 
called first. Form.validate does state that: This method is typically 
called before updating any models. which is good.




value (in FormComponent.updateModel), unfortunately convertedInput is
  

only set after a call to validate(). This really makes
updateFormComponentModels useless as a protected method. If validation





It is only protected final if you want to do some of your own processing
see IFormSubmittingComponent.getDefaultFormProcessing()


is really mandatory (which I doubt), processInput should be the only
  

callable method as it validates first and then updates the model.





checking required, conversion and validation is mandatory before updating
models.


In any case, the call to convertInput() inside validate() strikes me as
  

odd (the wrong place to call such a method).





no not really, FormComponent.validate() is really all the validation that
can happen
first required validation, then conversion validation and then user
validation on the converted type

We could split up the methods again, like in Form.process()
which calls the above validate only. We could split that up in to
validateRequired(), validateConversion(), validateXX()
but what do we gain then?
  


Readability!

When a method is called validate() I expect it to validate, and validate 
ONLY. Conversion of input is a side effect of validation.


Also, the javadoc of FormComponent.updateModel() states: .. it expect
  

that the object is already converted through the convert() call, but
there is no convert() method in FormComponent.




thats then an error in the doc, there are some changes in that area so that
should be improved
make a jira issue for this.
  


Ehmokay. Do I really need to file a bug for this small documentation 
bug? Done: https://issues.apache.org/jira/browse/WICKET-951


Maybe this is a consequence of the fact that wicket forces you to
  

subclass components so much. It's just too tempting to override so much
methods. I love wicket (I really do!) but I'd rather see wicket more
event listener oriented. This would also make it easier to listen to
events that are very deeply nested (fetch the component, register a
listener), which is almost impossible now





If you want listeners like swing then that is very easy for you to make
just extend link or what ever component or behavior you have once
and make the add/removeXXX and fire methods on them.

We have this also because it preserves memory, If you have to make an
(inner)class instance
and a link instance and attach those 2 each other that can consume much more
memory
then when just making a new class and have there one instance.
  
I'm not sure I see what you mean, but doesn't the (inner) class also 
need instantiation, consuming just as much memory?


Thanks for clearing some things up for me.
Matthijs

--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Param = null

2007-09-10 Thread chickabee

Simply Amazing! It works like a charm.  

So the Wicket syntx is:
https://lilo:8443/whisky/app/cat/param1/value1/param2/value2

Gracias para la ayuda  Fancis!

=


tried https://lilo:8443/whisky/app/cat/id/1 ?


-- 
View this message in context: 
http://www.nabble.com/Param-%3D-null-tf4413478.html#a12589994
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: why final?

2007-09-10 Thread Matthijs Wensveen

Martijn Dashorst wrote:

On 9/10/07, Matthijs Wensveen [EMAIL PROTECTED] wrote:
  

Off-topic: Why are so much methods marked final? This might prevent
API-misuse but also prevents innovative _use_! I can understand you want
framework users to do it the wicket way, because they will probably only
spam the users list with questions that have obvious solutions (like me
:D ). But sometimes it's just frustrating.



Innovative use is something we frown upon. Seriously: we *NEED* the
ability to be able to get stuff out of the way. Sometimes the hiding
capabilities of Java are not enough in a good OO hierarchy. When we
open up something to be overridable we do so *only* when we are
confident it will not break stuff. This gives us leeway to replace
parts of our api we aren't proud of (yes we are still learning) with
an api that is much better suited.

More from an old faq (I added it to our wiki):

Classes and methods in Wicket are generally declared as final until
the need for extensibility is well understood. While this defensive
approach may seem obsessive to some, the major benefit is that classes
and methods which haven't been designed for extension cannot be
extended until the problem(s) at hand are examined by the Wicket
development team. This helps to ensure that the best approach is
taken. Sometimes, straightforward extension is not the best approach.
Sometimes, features of the API have been misapplied or misunderstood.
It's best to catch this early.

While this does provoke more discussion and sometimes a bit of
annoyance, the discussion generally improves Wicket and will help
ensure greater backwards compatibility in the future. It's really a
matter of how the development team manages API commitments. By making
fewer commitments in the API in terms of extension points, we are more
likely to be able to support those extension points that we do allow
in the future. We are also more likely to catch anti-pattern use cases
and provide features appropriate to the problems you are trying to
solve.

Honestly, we aren't trying to annoy anyone and we do aim to respond
quickly to any extension needs that arise which make sense. If you
really don't agree with all this, remember that Wicket is open source.
You can always check out the source code, remove the final keyword
that offends you and rebuild the project.
  


Okay. I'll try to live with it. And when I find use-cases where I really 
need final to be removed, I'll spam the list and either there is a 
better way and I learn something, or I get my way and the final keyword 
is removed. Sounds like a win-win situation! :)
  

Maybe this is a consequence of the fact that wicket forces you to
subclass components so much. It's just too tempting to override so much
methods. I love wicket (I really do!) but I'd rather see wicket more
event listener oriented. This would also make it easier to listen to
events that are very deeply nested (fetch the component, register a
listener), which is almost impossible now.



This is not good OO IMO. Here you break encapsulation big time. It is
much cleaner IMO to provide extension points as part of your API, not
to give full access to a component.

The following panel illustrates my point: the panel clearly publishes
two important extension points: onLogin and onLogoff. Giving direct
access to the form and having to register an onSubmitListener or the
link and having to register an onClick listener breaks encapsulation:
I am then bound to always supply the link and form. I can't make it an
ajax panel without my clients having to know about it.

public abstract class LoginPanel extends Panel {
public LoginPanel(String id) {

if(Session.get().getUser() != null) {
   add(new LogoffFragment(content));
} else {
   add(new UsernamePasswordFragment(content));
}
}

protected abstract boolean onLogin(String username, Stringpassword);
protected abstract void onLogoff();

private class LogoffFragment extends Fragment {
...
   add(new Link(logoff) {
   protected void onClick() {
   onLogoff();
   Session.get().invalidate();
   }
   });
   ...
}

  
Okay, I see what you mean. A component designed to do XX should publish 
onXX methods that are overridable. That's so crazy it just might work!


Matthijs

--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Param = null

2007-09-10 Thread Francis De Brabandere
that is the default, you can changed it using a different UrlCodingStrategy

On 9/10/07, chickabee [EMAIL PROTECTED] wrote:

 Simply Amazing! It works like a charm.

 So the Wicket syntx is:
 https://lilo:8443/whisky/app/cat/param1/value1/param2/value2

 Gracias para la ayuda  Fancis!

 =


 tried https://lilo:8443/whisky/app/cat/id/1 ?


 --
 View this message in context: 
 http://www.nabble.com/Param-%3D-null-tf4413478.html#a12589994
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Param = null

2007-09-10 Thread chickabee

Thanks again, and what will be the best way to make these url temper proof?

Currently,  if i break the key value pairs, the wicket app is very unhappy
like below:

Unexpected RuntimeException

Root cause:

java.lang.IllegalStateException: URL fragment has unmatched key/value pair:
name/foo/id
at
org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters(AbstractRequestTargetUrlCodingStrategy.java:175)
at
org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:76)
at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:384)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:175)



Francis De Brabandere-2 wrote:
 
 that is the default, you can changed it using a different
 UrlCodingStrategy
 
 On 9/10/07, chickabee [EMAIL PROTECTED] wrote:

 Simply Amazing! It works like a charm.

 So the Wicket syntx is:
 https://lilo:8443/whisky/app/cat/param1/value1/param2/value2

 Gracias para la ayuda  Fancis!

 =


 tried https://lilo:8443/whisky/app/cat/id/1 ?


 --
 View this message in context:
 http://www.nabble.com/Param-%3D-null-tf4413478.html#a12589994
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -- 
 http://www.somatik.be
 Microsoft gives you windows, Linux gives you the whole house.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Param-%3D-null-tf4413478.html#a12590261
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Param = null

2007-09-10 Thread Korbinian Bachl
no it is not! - its just 1 way the wicket syntax may be - you should 
look at mount and the existing coding-strategys as well as (if youre on 
1.3 already) on the new HybridUrlCodingStrategy


you can have fllowing URL flavors out of box:

/app/page/value1/value2
(IndexedURLCoding)
/app/page:0
(hybrid)
/app/page/param1/value1/param2/value2
/app/page?param1=value1param2=value2

(forgot the name of the latter, jsut browse the javadocs)

Regards

Korbinian

PS: you also are free to give wicket a own CodingStrategy by extending 
any of these strategys


chickabee schrieb:
Simply Amazing! It works like a charm.  


So the Wicket syntx is:
https://lilo:8443/whisky/app/cat/param1/value1/param2/value2

Gracias para la ayuda  Fancis!

=


tried https://lilo:8443/whisky/app/cat/id/1 ?




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Alex Objelean

Indeed, it is a very big component hierarchy (It contains at least 3 levels
of nested AjaxTabbedPanel components).
 The application is, in fact, a single page and it uses a lot of ajax to
perform the updates. The model reflect the component hierarchy (Appliction
has a single modelObject which nests another objects corresponding to each
component). I do not have a lot of detaching logic, because it is important
to have all the data in the model (caching), also because the services are
very costly operations. 

If this description is not enough for replication, I will be glad to help by
giving you another details.

Alex.


Martijn Dashorst wrote:
 
 How big is the page? Sounds like a really, really big component
 hierarchy. Then it sounds reasonable that the httpsession store is
 much faster: it keeps it in ram, and doesn't use serialization until
 the session is serialized (server shutting down, deciding to put
 session to disk or replication of session across cluster) iirc.
 
 I think we would appreciate some way of replicating your results. I
 assume you can't share the actual code, but could you share a spin-off
 of the page's component structure and a Model that replicates the data
 stuff's size (including the detach logic)?
 
 Martijn
 
 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 If the pages wouldn't be serializable, it wouldn't work in development
 mode.
 Is it right?

 I think that it is not necessarily about how large is application, in my
 case it is about how large is the model I'm working with for that
 specific
 request (ajax request).

 My action was: fetch a subview of a very large table 300x300, each cell
 has
 a heavy model object.

 Alex.


 Johan Compagner wrote:
 
  that looks very strange to me. We have also a very large app here and
 we
  dont notice a difference
  So i am very curious what is happening at your place then. Are you sure
  for
  example that the pages
  are serializable ?  That we don't have constantly exceptions?
 
  johan
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
 
  Maybe the profiling was not a perfect one. But still, I have to give
 up
  using
  SecondSessionLevelStore just because the responsiveness of the
  application
  is very slow.
 
 
  Johan Compagner wrote:
  
   invocation count 1??
  
   So you only do 1 request and you profile that?
   thats not a good test. You have to do plenty and multiply on  the
 same
   time
   (10 for 100 request or something like that)
   to really see the difference. (and have a warm up phase)
  
   johan
  
  
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
  
   Matej, I must disagree with you regarding performance issues of the
   SecondLevelSessionStore. I've reverted the
 Application#newSessionStore
  to
   HttpSessionStore and this significantly improved the application
  overall
   performance. Maybe this is not so obvious for small applications,
 but
   when
   it is about a large one - things changes.
  
   Below, you will find attached two images. The first one is a
 profiling
  of
   an
   action when working with HttpSessionStore, the second one is a
  profiling
   for
   the same action when using SecondSessionLevelStore. The difference
 is
   huge:
   593ms vs 174420ms. I cannot explain what exactly is going on, but
 I've
   noticed that by switching from default SecondLevelSessionStore to
 the
   HttpSessionStore improved a lot the responsiveness of the
 application.
  
   Alex.
  
   http://www.nabble.com/file/p12588790/HttpSessionStore.jpg
   http://www.nabble.com/file/p12588790/SecondSessionLevelStore.jpg
  
  
  
  
   Matej Knopp-2 wrote:
   
You can revert to httpsessionstore by changing
Application.newSessionStore method. But that's not recommended.
 What
are your performance problems? I doubt it is caused by the
 session
store.
   
-Matej
   
On 9/7/07, jamieballing [EMAIL PROTECTED] wrote:
   
We are trying to do some performance troubleshooting and want to
   disable
the
second level page cache.
   
Is there any way to do this?
   
Thanks,
Jamie
--
View this message in context:
   
  
 
 http://www.nabble.com/Disable-the-SecondLevelPageCache--tf4403977.html#a12563895
Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
   
  -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
  -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Disable-the-SecondLevelPageCache--tf4403977.html#a12588790
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: 

Re: mountBookmarkablePage and missing parameters - exception thrown

2007-09-10 Thread chickabee

I believe the
org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters(),
shold not throw a RunTime Exception as it does now,  if the url is tampered,
instead it should always provide the parameters and values to it's best
guess and then let the user decided how the request needs to be processed.

Also, org.apache.wicket.PageParameters, should provide one iterator with all
available params, 

Any comments?




igor.vaynberg wrote:
 
 On 8/8/07, Dariusz Wojtas [EMAIL PROTECTED] wrote:

 I want to use it in cases where the user may be given feeling that he is
 browsing some structure.
 
 
 well, my point was that structure is probably better represented by
 indexed
 coding strategy, which is forgiving. for example
 
 /products/clothes/tshirts/red (indexed)
 
 is better imho then
 
 /products/category/clothes/subcategory/tshirts/color/red (default)
 
 -igor
 
 

-- 
View this message in context: 
http://www.nabble.com/mountBookmarkablePage-and-missing-parameters---exception-thrown-tf4219655.html#a12590494
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: palette problem

2007-09-10 Thread wheleph


severian wrote:
 
 The available list should include the full set I think, not just those
 that are not currently selected.
 
 Severian.
 
 

I've tried this. It doesn't help
-
final Form pupilForm = new PupilForm(pupilForm);

String first = first;
String second = second;

ListString available = new ArrayListString();
available.add(third);
available.add(fourth);
available.add(first);
available.add(second);

ListString selected = new ArrayListString();
selected.add(first);
selected.add(second);

final Palette pupilPalette = new Palette(pupilPalette, new
Model((Serializable) selected), new Model(
  (Serializable)available), new ChoiceRenderer(), 10, false);
pupilForm.add(pupilPalette);

add(pupilForm);
-- 
View this message in context: 
http://www.nabble.com/palette-problem-tf4413718.html#a12590662
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Param = null

2007-09-10 Thread Gerolf Seitz
On 9/10/07, chickabee [EMAIL PROTECTED] wrote:

 These strategies are pretty nice, but the question remains why the
 decoder()
 method pukes out when there is mismatch of key value pairs. Hacker will be
 very happy with the current state of implementation.


only if you deploy your application in development mode. in deployment mode
only the internal error page.
see IApplicationSettings#setInternalErrorPage(Class)

gerolf


=

 Korbinian Bachl wrote:
 
  no it is not! - its just 1 way the wicket syntax may be - you should
  look at mount and the existing coding-strategys as well as (if youre on
  1.3 already) on the new HybridUrlCodingStrategy
 
  you can have fllowing URL flavors out of box:
 
  /app/page/value1/value2
  (IndexedURLCoding)
  /app/page:0
  (hybrid)
  /app/page/param1/value1/param2/value2
  /app/page?param1=value1param2=value2
 
  (forgot the name of the latter, jsut browse the javadocs)
 
  Regards
 
  Korbinian
 
  PS: you also are free to give wicket a own CodingStrategy by extending
  any of these strategys
 
  chickabee schrieb:
  Simply Amazing! It works like a charm.
 
  So the Wicket syntx is:
  https://lilo:8443/whisky/app/cat/param1/value1/param2/value2
 
  Gracias para la ayuda  Fancis!
 
  =
 
 
  tried https://lilo:8443/whisky/app/cat/id/1 ?
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Param-%3D-null-tf4413478.html#a12590606
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Alex Objelean

Matej, how can I say to my model to serialize some objects and to not others?
If I would detach the entire mode, that would mean that the next ajax
request would require again to call the  (very costly) service and this is
not acceptable.

Alex.


Matej Knopp-2 wrote:
 
 There seems to be something terribly weird going on. Your application
 looks like a corner case. On page like that, I wouldn't be surprised
 if there was penalty using SecondLevelCacheSessionStore, but the
 numbers you've posted are way too bad to be caused by wicket itself.
 
 My guess is that your model objects are extremely heavy. Maybe with
 references to your processing layer as well. Of course this will not
 work with 2nd level cache session store, as the whole thing is
 serialized. Normally you detach your models so the data kept in
 memory/session/disk is significantly reduced.
 
 I think secondlevelcachesessionstore should be usable for you as well,
 but that would require not serializing everyhing, rather then that
 just keep things in memory and inject the dependencies on
 deserialization.
 
 -Matej
 
 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 Indeed, it is a very big component hierarchy (It contains at least 3
 levels
 of nested AjaxTabbedPanel components).
  The application is, in fact, a single page and it uses a lot of ajax to
 perform the updates. The model reflect the component hierarchy
 (Appliction
 has a single modelObject which nests another objects corresponding to
 each
 component). I do not have a lot of detaching logic, because it is
 important
 to have all the data in the model (caching), also because the services
 are
 very costly operations.

 If this description is not enough for replication, I will be glad to help
 by
 giving you another details.

 Alex.


 Martijn Dashorst wrote:
 
  How big is the page? Sounds like a really, really big component
  hierarchy. Then it sounds reasonable that the httpsession store is
  much faster: it keeps it in ram, and doesn't use serialization until
  the session is serialized (server shutting down, deciding to put
  session to disk or replication of session across cluster) iirc.
 
  I think we would appreciate some way of replicating your results. I
  assume you can't share the actual code, but could you share a spin-off
  of the page's component structure and a Model that replicates the data
  stuff's size (including the detach logic)?
 
  Martijn
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
  If the pages wouldn't be serializable, it wouldn't work in development
  mode.
  Is it right?
 
  I think that it is not necessarily about how large is application, in
 my
  case it is about how large is the model I'm working with for that
  specific
  request (ajax request).
 
  My action was: fetch a subview of a very large table 300x300, each
 cell
  has
  a heavy model object.
 
  Alex.
 
 
  Johan Compagner wrote:
  
   that looks very strange to me. We have also a very large app here
 and
  we
   dont notice a difference
   So i am very curious what is happening at your place then. Are you
 sure
   for
   example that the pages
   are serializable ?  That we don't have constantly exceptions?
  
   johan
  
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
  
   Maybe the profiling was not a perfect one. But still, I have to
 give
  up
   using
   SecondSessionLevelStore just because the responsiveness of the
   application
   is very slow.
  
  
   Johan Compagner wrote:
   
invocation count 1??
   
So you only do 1 request and you profile that?
thats not a good test. You have to do plenty and multiply on  the
  same
time
(10 for 100 request or something like that)
to really see the difference. (and have a warm up phase)
   
johan
   
   
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
   
Matej, I must disagree with you regarding performance issues of
 the
SecondLevelSessionStore. I've reverted the
  Application#newSessionStore
   to
HttpSessionStore and this significantly improved the application
   overall
performance. Maybe this is not so obvious for small
 applications,
  but
when
it is about a large one - things changes.
   
Below, you will find attached two images. The first one is a
  profiling
   of
an
action when working with HttpSessionStore, the second one is a
   profiling
for
the same action when using SecondSessionLevelStore. The
 difference
  is
huge:
593ms vs 174420ms. I cannot explain what exactly is going on,
 but
  I've
noticed that by switching from default SecondLevelSessionStore
 to
  the
HttpSessionStore improved a lot the responsiveness of the
  application.
   
Alex.
   
http://www.nabble.com/file/p12588790/HttpSessionStore.jpg
http://www.nabble.com/file/p12588790/SecondSessionLevelStore.jpg
   
   
   
   
Matej Knopp-2 wrote:

 You can revert to httpsessionstore by changing
 

Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Matej Knopp
You can make the reference transient. So it would no be serialized,
bit it would be kept in memory as long as the page is the last
accessed one. And if it eventually becomes null (when you e.g go to
another page and return back), you can reinject it. Or you can just
store it to session (outside the page). There are numerious
possibilities, but you need to find out first where the bottleneck is.

-Matej

On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 Matej, how can I say to my model to serialize some objects and to not others?
 If I would detach the entire mode, that would mean that the next ajax
 request would require again to call the  (very costly) service and this is
 not acceptable.

 Alex.


 Matej Knopp-2 wrote:
 
  There seems to be something terribly weird going on. Your application
  looks like a corner case. On page like that, I wouldn't be surprised
  if there was penalty using SecondLevelCacheSessionStore, but the
  numbers you've posted are way too bad to be caused by wicket itself.
 
  My guess is that your model objects are extremely heavy. Maybe with
  references to your processing layer as well. Of course this will not
  work with 2nd level cache session store, as the whole thing is
  serialized. Normally you detach your models so the data kept in
  memory/session/disk is significantly reduced.
 
  I think secondlevelcachesessionstore should be usable for you as well,
  but that would require not serializing everyhing, rather then that
  just keep things in memory and inject the dependencies on
  deserialization.
 
  -Matej
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
  Indeed, it is a very big component hierarchy (It contains at least 3
  levels
  of nested AjaxTabbedPanel components).
   The application is, in fact, a single page and it uses a lot of ajax to
  perform the updates. The model reflect the component hierarchy
  (Appliction
  has a single modelObject which nests another objects corresponding to
  each
  component). I do not have a lot of detaching logic, because it is
  important
  to have all the data in the model (caching), also because the services
  are
  very costly operations.
 
  If this description is not enough for replication, I will be glad to help
  by
  giving you another details.
 
  Alex.
 
 
  Martijn Dashorst wrote:
  
   How big is the page? Sounds like a really, really big component
   hierarchy. Then it sounds reasonable that the httpsession store is
   much faster: it keeps it in ram, and doesn't use serialization until
   the session is serialized (server shutting down, deciding to put
   session to disk or replication of session across cluster) iirc.
  
   I think we would appreciate some way of replicating your results. I
   assume you can't share the actual code, but could you share a spin-off
   of the page's component structure and a Model that replicates the data
   stuff's size (including the detach logic)?
  
   Martijn
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
   If the pages wouldn't be serializable, it wouldn't work in development
   mode.
   Is it right?
  
   I think that it is not necessarily about how large is application, in
  my
   case it is about how large is the model I'm working with for that
   specific
   request (ajax request).
  
   My action was: fetch a subview of a very large table 300x300, each
  cell
   has
   a heavy model object.
  
   Alex.
  
  
   Johan Compagner wrote:
   
that looks very strange to me. We have also a very large app here
  and
   we
dont notice a difference
So i am very curious what is happening at your place then. Are you
  sure
for
example that the pages
are serializable ?  That we don't have constantly exceptions?
   
johan
   
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
   
Maybe the profiling was not a perfect one. But still, I have to
  give
   up
using
SecondSessionLevelStore just because the responsiveness of the
application
is very slow.
   
   
Johan Compagner wrote:

 invocation count 1??

 So you only do 1 request and you profile that?
 thats not a good test. You have to do plenty and multiply on  the
   same
 time
 (10 for 100 request or something like that)
 to really see the difference. (and have a warm up phase)

 johan



 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Matej, I must disagree with you regarding performance issues of
  the
 SecondLevelSessionStore. I've reverted the
   Application#newSessionStore
to
 HttpSessionStore and this significantly improved the application
overall
 performance. Maybe this is not so obvious for small
  applications,
   but
 when
 it is about a large one - things changes.

 Below, you will find attached two images. The first one is a
   profiling
of
 an
 action when working with HttpSessionStore, the second one is a

Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Matej Knopp
Turn on SecondLevelCacheSessionStore, and use FilePageStore as
IPageStore (specified in session store constructor). Then go to your
tmp dir and you should be able to find the serialized pages there.

-Matej

On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 How can I figure it out?




 Johan Compagner wrote:
 
  if you save the page to disk how big is it?
 
  johan
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
 
  Indeed, it is a very big component hierarchy (It contains at least 3
  levels
  of nested AjaxTabbedPanel components).
  The application is, in fact, a single page and it uses a lot of ajax to
  perform the updates. The model reflect the component hierarchy
  (Appliction
  has a single modelObject which nests another objects corresponding to
  each
  component). I do not have a lot of detaching logic, because it is
  important
  to have all the data in the model (caching), also because the services
  are
  very costly operations.
 
  If this description is not enough for replication, I will be glad to help
  by
  giving you another details.
 
  Alex.
 
 
  Martijn Dashorst wrote:
  
   How big is the page? Sounds like a really, really big component
   hierarchy. Then it sounds reasonable that the httpsession store is
   much faster: it keeps it in ram, and doesn't use serialization until
   the session is serialized (server shutting down, deciding to put
   session to disk or replication of session across cluster) iirc.
  
   I think we would appreciate some way of replicating your results. I
   assume you can't share the actual code, but could you share a spin-off
   of the page's component structure and a Model that replicates the data
   stuff's size (including the detach logic)?
  
   Martijn
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
   If the pages wouldn't be serializable, it wouldn't work in development
   mode.
   Is it right?
  
   I think that it is not necessarily about how large is application, in
  my
   case it is about how large is the model I'm working with for that
   specific
   request (ajax request).
  
   My action was: fetch a subview of a very large table 300x300, each
  cell
   has
   a heavy model object.
  
   Alex.
  
  
   Johan Compagner wrote:
   
that looks very strange to me. We have also a very large app here
  and
   we
dont notice a difference
So i am very curious what is happening at your place then. Are you
  sure
for
example that the pages
are serializable ?  That we don't have constantly exceptions?
   
johan
   
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
   
Maybe the profiling was not a perfect one. But still, I have to
  give
   up
using
SecondSessionLevelStore just because the responsiveness of the
application
is very slow.
   
   
Johan Compagner wrote:

 invocation count 1??

 So you only do 1 request and you profile that?
 thats not a good test. You have to do plenty and multiply on  the
   same
 time
 (10 for 100 request or something like that)
 to really see the difference. (and have a warm up phase)

 johan



 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Matej, I must disagree with you regarding performance issues of
  the
 SecondLevelSessionStore. I've reverted the
   Application#newSessionStore
to
 HttpSessionStore and this significantly improved the application
overall
 performance. Maybe this is not so obvious for small
  applications,
   but
 when
 it is about a large one - things changes.

 Below, you will find attached two images. The first one is a
   profiling
of
 an
 action when working with HttpSessionStore, the second one is a
profiling
 for
 the same action when using SecondSessionLevelStore. The
  difference
   is
 huge:
 593ms vs 174420ms. I cannot explain what exactly is going on,
  but
   I've
 noticed that by switching from default SecondLevelSessionStore
  to
   the
 HttpSessionStore improved a lot the responsiveness of the
   application.

 Alex.

 http://www.nabble.com/file/p12588790/HttpSessionStore.jpg
 http://www.nabble.com/file/p12588790/SecondSessionLevelStore.jpg




 Matej Knopp-2 wrote:
 
  You can revert to httpsessionstore by changing
  Application.newSessionStore method. But that's not
  recommended.
   What
  are your performance problems? I doubt it is caused by the
   session
  store.
 
  -Matej
 
  On 9/7/07, jamieballing [EMAIL PROTECTED] wrote:
 
  We are trying to do some performance troubleshooting and want
  to
 disable
  the
  second level page cache.
 
  Is there any way to do this?
 
  Thanks,
  Jamie
  --
  View this message in context:
 

   
  
  

palette problem

2007-09-10 Thread wheleph

Hello everyone!

I've got a problem using component Palette from Wicket-Extensions-1.2.6. The
code I use to add Palette on a Form is cited below:
---
final Form pupilForm = new PupilForm(pupilForm);

ListString available = new ArrayListString();
available.add(third);
available.add(fourth);

ListString selected = new ArrayListString();
selected.add(first);
selected.add(second);

final Palette pupilPalette = new Palette(pupilPalette, new
Model((Serializable) selected), new Model((Serializable)available), new
ChoiceRenderer(), 10, false);
pupilForm.add(pupilPalette);

add(pupilForm);
---
Instead of 
 availableselected
| third |-| first |
| fourth   |-| second |
I get
||-| third|
||-|   |

I guess this is one of those stupid mistakes you'll never find in your own
code. What's wrong with it?

wheleph

-- 
View this message in context: 
http://www.nabble.com/palette-problem-tf4413718.html#a12590320
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Param = null

2007-09-10 Thread Gwyn Evans
On Monday, September 10, 2007, 12:23:36 PM, chickabee [EMAIL PROTECTED] wrote:

 I still do not see why the wicket should treat it as an internal error if
 there are missing parameters? I guess wicket needs to follow the same
 paradigm as in the raw HttpRequest, let the user pull the parameters if they
 exist and take their own decision if they do not. It does not make any sense
 for the Wicket to declare the state of emergency if the parameters  key
 value do not match.

Normally, it does, as in most cases the link would have been generated
by the web-app or another external web-app, so if it's
missing/corrupt, something odd is going on.

You, of course, have the option to supply your own strategy if you
want to attempt to cater for users doing partial/incorrect edits of
the URL, and having your strategy guess what they meant, but it's
rather an isolated requirement, so I don't think it would belong in
the core...

If you're trying to /avoid/ users editing the URL, however, there are
other coding strategies for that that encrypt  decrypt the URLs...

/Gwyn


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Param = null

2007-09-10 Thread chickabee

only if you deploy your application in development mode. in deployment mode
only the internal error page.
see IApplicationSettings#setInternalErrorPage(Class)

gerolf


Thanks for the good piece of info. 

I still do not see why the wicket should treat it as an internal error if
there are missing parameters? I guess wicket needs to follow the same
paradigm as in the raw HttpRequest, let the user pull the parameters if they
exist and take their own decision if they do not. It does not make any sense
for the Wicket to declare the state of emergency if the parameters  key
value do not match.
-- 
View this message in context: 
http://www.nabble.com/Param-%3D-null-tf4413478.html#a12590866
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Alex Objelean

It is about 32MB. Kind a big page :) 


Matej Knopp-2 wrote:
 
 Turn on SecondLevelCacheSessionStore, and use FilePageStore as
 IPageStore (specified in session store constructor). Then go to your
 tmp dir and you should be able to find the serialized pages there.
 
 -Matej
 
 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 How can I figure it out?




 Johan Compagner wrote:
 
  if you save the page to disk how big is it?
 
  johan
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
 
  Indeed, it is a very big component hierarchy (It contains at least 3
  levels
  of nested AjaxTabbedPanel components).
  The application is, in fact, a single page and it uses a lot of ajax
 to
  perform the updates. The model reflect the component hierarchy
  (Appliction
  has a single modelObject which nests another objects corresponding to
  each
  component). I do not have a lot of detaching logic, because it is
  important
  to have all the data in the model (caching), also because the services
  are
  very costly operations.
 
  If this description is not enough for replication, I will be glad to
 help
  by
  giving you another details.
 
  Alex.
 
 
  Martijn Dashorst wrote:
  
   How big is the page? Sounds like a really, really big component
   hierarchy. Then it sounds reasonable that the httpsession store is
   much faster: it keeps it in ram, and doesn't use serialization until
   the session is serialized (server shutting down, deciding to put
   session to disk or replication of session across cluster) iirc.
  
   I think we would appreciate some way of replicating your results. I
   assume you can't share the actual code, but could you share a
 spin-off
   of the page's component structure and a Model that replicates the
 data
   stuff's size (including the detach logic)?
  
   Martijn
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
   If the pages wouldn't be serializable, it wouldn't work in
 development
   mode.
   Is it right?
  
   I think that it is not necessarily about how large is application,
 in
  my
   case it is about how large is the model I'm working with for that
   specific
   request (ajax request).
  
   My action was: fetch a subview of a very large table 300x300, each
  cell
   has
   a heavy model object.
  
   Alex.
  
  
   Johan Compagner wrote:
   
that looks very strange to me. We have also a very large app here
  and
   we
dont notice a difference
So i am very curious what is happening at your place then. Are
 you
  sure
for
example that the pages
are serializable ?  That we don't have constantly exceptions?
   
johan
   
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
   
Maybe the profiling was not a perfect one. But still, I have to
  give
   up
using
SecondSessionLevelStore just because the responsiveness of the
application
is very slow.
   
   
Johan Compagner wrote:

 invocation count 1??

 So you only do 1 request and you profile that?
 thats not a good test. You have to do plenty and multiply on 
 the
   same
 time
 (10 for 100 request or something like that)
 to really see the difference. (and have a warm up phase)

 johan



 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Matej, I must disagree with you regarding performance issues
 of
  the
 SecondLevelSessionStore. I've reverted the
   Application#newSessionStore
to
 HttpSessionStore and this significantly improved the
 application
overall
 performance. Maybe this is not so obvious for small
  applications,
   but
 when
 it is about a large one - things changes.

 Below, you will find attached two images. The first one is a
   profiling
of
 an
 action when working with HttpSessionStore, the second one is
 a
profiling
 for
 the same action when using SecondSessionLevelStore. The
  difference
   is
 huge:
 593ms vs 174420ms. I cannot explain what exactly is going on,
  but
   I've
 noticed that by switching from default
 SecondLevelSessionStore
  to
   the
 HttpSessionStore improved a lot the responsiveness of the
   application.

 Alex.

 http://www.nabble.com/file/p12588790/HttpSessionStore.jpg

 http://www.nabble.com/file/p12588790/SecondSessionLevelStore.jpg




 Matej Knopp-2 wrote:
 
  You can revert to httpsessionstore by changing
  Application.newSessionStore method. But that's not
  recommended.
   What
  are your performance problems? I doubt it is caused by the
   session
  store.
 
  -Matej
 
  On 9/7/07, jamieballing [EMAIL PROTECTED] wrote:
 
  We are trying to do some performance troubleshooting and
 want
  to
 disable
  the
  second level page cache.
 
  Is there any way to do this?
 
  Thanks,
  Jamie
  --
  View this message in context:
 

Re: Param = null

2007-09-10 Thread chickabee

Yes you are right.

I guess the the name u were looking for is:
org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy

These strategies are pretty nice, but the question remains why the decoder()
method pukes out when there is mismatch of key value pairs. Hacker will be
very happy with the current state of implementation.



=

Korbinian Bachl wrote:
 
 no it is not! - its just 1 way the wicket syntax may be - you should 
 look at mount and the existing coding-strategys as well as (if youre on 
 1.3 already) on the new HybridUrlCodingStrategy
 
 you can have fllowing URL flavors out of box:
 
 /app/page/value1/value2
 (IndexedURLCoding)
 /app/page:0
 (hybrid)
 /app/page/param1/value1/param2/value2
 /app/page?param1=value1param2=value2
 
 (forgot the name of the latter, jsut browse the javadocs)
 
 Regards
 
 Korbinian
 
 PS: you also are free to give wicket a own CodingStrategy by extending 
 any of these strategys
 
 chickabee schrieb:
 Simply Amazing! It works like a charm.  
 
 So the Wicket syntx is:
 https://lilo:8443/whisky/app/cat/param1/value1/param2/value2
 
 Gracias para la ayuda  Fancis!
 
 =
 
 
 tried https://lilo:8443/whisky/app/cat/id/1 ?
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Param-%3D-null-tf4413478.html#a12590606
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Param = null

2007-09-10 Thread chickabee

I would disagree because this is the first problem any web developer would
like to address, what happens if their urls are being tempered manually, it
should not result into any kind of error by  the web framework, rather this
is the  application validation issue and to be handled by the application
developer and not Wicket.

Here is the example of app generated url:
http://www.cnn.com/2007/WORLD/europe/09/10/madeleine.mccann/index.html

And here is the manually tempered url:
http://www.cnn.com/2007/WORLD/europe/09/10/Foo

And see how nicely this is being handled by the application. 

Applications are architected considering the worst case scenario and not the
ideal world. Right? 

Perhaps,  I need to write my own implementation of
AbstractRequestTargetUrlCodingStrategy.

=

Gwyn wrote:
 
 On Monday, September 10, 2007, 12:23:36 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 I still do not see why the wicket should treat it as an internal error if
 there are missing parameters? I guess wicket needs to follow the same
 paradigm as in the raw HttpRequest, let the user pull the parameters if
 they
 exist and take their own decision if they do not. It does not make any
 sense
 for the Wicket to declare the state of emergency if the parameters  key
 value do not match.
 
 Normally, it does, as in most cases the link would have been generated
 by the web-app or another external web-app, so if it's
 missing/corrupt, something odd is going on.
 
 You, of course, have the option to supply your own strategy if you
 want to attempt to cater for users doing partial/incorrect edits of
 the URL, and having your strategy guess what they meant, but it's
 rather an isolated requirement, so I don't think it would belong in
 the core...
 
 If you're trying to /avoid/ users editing the URL, however, there are
 other coding strategies for that that encrypt  decrypt the URLs...
 
 /Gwyn
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Param-%3D-null-tf4413478.html#a12591422
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Alex Objelean

Indeed, making the reference transient improves the responsiveness even with
the SecondSessionLevelStore. Anyway, I am curious, what is your advice for
this kind of applications? Keep using HttpSessionStore or switch to
SecondLevelSessionStore and make the most big objects transient? What is the
benefits of each method? Maybe my approach was a wrong one? 

Thank you for your replies!
Alex.


Matej Knopp-2 wrote:
 
 You can make the reference transient. So it would no be serialized,
 bit it would be kept in memory as long as the page is the last
 accessed one. And if it eventually becomes null (when you e.g go to
 another page and return back), you can reinject it. Or you can just
 store it to session (outside the page). There are numerious
 possibilities, but you need to find out first where the bottleneck is.
 
 -Matej
 
 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 Matej, how can I say to my model to serialize some objects and to not
 others?
 If I would detach the entire mode, that would mean that the next ajax
 request would require again to call the  (very costly) service and this
 is
 not acceptable.

 Alex.


 Matej Knopp-2 wrote:
 
  There seems to be something terribly weird going on. Your application
  looks like a corner case. On page like that, I wouldn't be surprised
  if there was penalty using SecondLevelCacheSessionStore, but the
  numbers you've posted are way too bad to be caused by wicket itself.
 
  My guess is that your model objects are extremely heavy. Maybe with
  references to your processing layer as well. Of course this will not
  work with 2nd level cache session store, as the whole thing is
  serialized. Normally you detach your models so the data kept in
  memory/session/disk is significantly reduced.
 
  I think secondlevelcachesessionstore should be usable for you as well,
  but that would require not serializing everyhing, rather then that
  just keep things in memory and inject the dependencies on
  deserialization.
 
  -Matej
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
  Indeed, it is a very big component hierarchy (It contains at least 3
  levels
  of nested AjaxTabbedPanel components).
   The application is, in fact, a single page and it uses a lot of ajax
 to
  perform the updates. The model reflect the component hierarchy
  (Appliction
  has a single modelObject which nests another objects corresponding to
  each
  component). I do not have a lot of detaching logic, because it is
  important
  to have all the data in the model (caching), also because the services
  are
  very costly operations.
 
  If this description is not enough for replication, I will be glad to
 help
  by
  giving you another details.
 
  Alex.
 
 
  Martijn Dashorst wrote:
  
   How big is the page? Sounds like a really, really big component
   hierarchy. Then it sounds reasonable that the httpsession store is
   much faster: it keeps it in ram, and doesn't use serialization until
   the session is serialized (server shutting down, deciding to put
   session to disk or replication of session across cluster) iirc.
  
   I think we would appreciate some way of replicating your results. I
   assume you can't share the actual code, but could you share a
 spin-off
   of the page's component structure and a Model that replicates the
 data
   stuff's size (including the detach logic)?
  
   Martijn
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
   If the pages wouldn't be serializable, it wouldn't work in
 development
   mode.
   Is it right?
  
   I think that it is not necessarily about how large is application,
 in
  my
   case it is about how large is the model I'm working with for that
   specific
   request (ajax request).
  
   My action was: fetch a subview of a very large table 300x300, each
  cell
   has
   a heavy model object.
  
   Alex.
  
  
   Johan Compagner wrote:
   
that looks very strange to me. We have also a very large app here
  and
   we
dont notice a difference
So i am very curious what is happening at your place then. Are
 you
  sure
for
example that the pages
are serializable ?  That we don't have constantly exceptions?
   
johan
   
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
   
Maybe the profiling was not a perfect one. But still, I have to
  give
   up
using
SecondSessionLevelStore just because the responsiveness of the
application
is very slow.
   
   
Johan Compagner wrote:

 invocation count 1??

 So you only do 1 request and you profile that?
 thats not a good test. You have to do plenty and multiply on 
 the
   same
 time
 (10 for 100 request or something like that)
 to really see the difference. (and have a warm up phase)

 johan



 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Matej, I must disagree with you regarding performance issues
 of
  the
 SecondLevelSessionStore. I've 

Re: Param = null

2007-09-10 Thread Gwyn Evans
Pardon? All that's doing is showing their custom error page, exactly
as the other replies have suggested that you'd want to do with Wicket
- I'd be more impressed if it had shown an index of the news for that
date, but as it is, that's just what you can easily do with Wicket.

All you need to do is set your own custom error page and switch to
Deployment mode, so as not to get the developer-friendly error
messages.

/Gwyn

On Monday, September 10, 2007, 1:05:17 PM, chickabee [EMAIL PROTECTED] wrote:

 I would disagree because this is the first problem any web developer would
 like to address, what happens if their urls are being tempered manually, it
 should not result into any kind of error by  the web framework, rather this
 is the  application validation issue and to be handled by the application
 developer and not Wicket.

 Here is the example of app generated url:
 http://www.cnn.com/2007/WORLD/europe/09/10/madeleine.mccann/index.html

 And here is the manually tempered url:
 http://www.cnn.com/2007/WORLD/europe/09/10/Foo

 And see how nicely this is being handled by the application. 

 Applications are architected considering the worst case scenario and not the
 ideal world. Right? 

 Perhaps,  I need to write my own implementation of
 AbstractRequestTargetUrlCodingStrategy.

 =

 Gwyn wrote:
 
 On Monday, September 10, 2007, 12:23:36 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 I still do not see why the wicket should treat it as an internal error if
 there are missing parameters? I guess wicket needs to follow the same
 paradigm as in the raw HttpRequest, let the user pull the parameters if
 they
 exist and take their own decision if they do not. It does not make any
 sense
 for the Wicket to declare the state of emergency if the parameters  key
 value do not match.
 
 Normally, it does, as in most cases the link would have been generated
 by the web-app or another external web-app, so if it's
 missing/corrupt, something odd is going on.
 
 You, of course, have the option to supply your own strategy if you
 want to attempt to cater for users doing partial/incorrect edits of
 the URL, and having your strategy guess what they meant, but it's
 rather an isolated requirement, so I don't think it would belong in
 the core...
 
 If you're trying to /avoid/ users editing the URL, however, there are
 other coding strategies for that that encrypt  decrypt the URLs...
 
 /Gwyn
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 




/Gwyn


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Locating CSS under WEB-INF, please help

2007-09-10 Thread Jason Mihalick

sigh  Ok, thanks for the help on this.  My objective was to be able to have
a structure of HTML and resource dependencies (css, js, img, etc) that could
be easily edited in an HTML editor such that the editor doesn't have
problems resolving the resources and such that Wicket doesn't have problems
resolving the resources.  From reading your comments and those of others,
however, this doesn't seem to be an easy task at all.  So, I've gone back to
the standard Wicket approach where I have placed all HTML files along side
my Java classes and have located my resources (css, js, img, etc) at the
root of my web context (in the maven world, this is under the webapp dir, as
a sibling to WEB-INF).  This keeps Wicket very happy at runtime, but makes
it difficult for me to edit my site using a HTML editor.  Maybe this won't
be that big of a deal in practice.  I guess I will find out in time.

Thanks again guys!
 

igor.vaynberg wrote:
 
 oi. the basic problem is that WEB-INF is inaccessible via direct urls.
 this
 is because it houses stuff like classes and you dont want the user to have
 access to those.
 
 so there is a way to make it work, but it will involve wicket or another
 servlet streaming those static resources, which is a lot of overhead.
 
 my suggestion is to move all the css/js/foo out of WEB-INF
 
 -igor
 
 
 On 9/8/07, Jason Mihalick [EMAIL PROTECTED] wrote:


 I've been searching the forums and wiki on this half the night and I just
 can't figure out what I'm doing wrong here, so please bear with me if
 there
 is an obvious answer to this.

 Wicket is not finding my css or js resources when the application is
 deployed.

 I followed the wiki instructions for Wicket 1.3 on how to Control where
 HTML files are loaded from
 (
 http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3
 ).
 I have the following structure under WEB-INF:

 WEB-INF/
 +--- content/
+--- css/
+--- help/
+--- img/
+--- js/
BasePage.html
Page1.html
Page2.html
etc.
 web.xml

 In the init() method of my application class, I have added this code as
 per
 the wiki:

 IResourceSettings resourceSettings = this.getResourceSettings();
 resourceSettings.addResourceFolder( WEB-INF/content );
 resourceSettings.setResourceStreamLocator( new PathStripperLocator()
 );

 My implementation of the PathStripperLocator class matches that found on
 the
 wiki.

 When I view the source of Page1.html (which inherits from my BasePage) in
 my
 browser after wicket has served it, I see that Wicket is rewriting the
 location of the css resources as follows:

 link href=../css/styles.css rel=stylesheet type=text/css/

 I expected the href value to instead be css/styles.css (without the
 ../).

 What do I need to do here in order to make this work?

 Your help is greatly appreciated!

 --
 Jason


 --
 View this message in context:
 http://www.nabble.com/Locating-CSS-under-WEB-INF%2C-please-help-tf4408084.html#a12575952
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/Locating-CSS-under-WEB-INF%2C-please-help-tf4408084.html#a12592027
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Param = null

2007-09-10 Thread chickabee

Ok, let me give you a  different scenario and see if wicket has a way to
handle it.

Assume there are 10 parameters are being passed to the app as below:
http://some.web.site/wicket/app/page/p1/v1/p2/v2/p3/v3/...p9/v9/p10/v10

Now If I mess-up the key value pair at the end like:
http://some.web.site/wicket/app/page/p1/v1/p2/v2/p3/v3/...p9/v9/p10=v10

In that case how do i get the value of first 9 correct parameter and values?
and do something with this available info, rather than blindly redirecting
the user to the Error Page.

Thanks..

===


Gwyn wrote:
 
 Pardon? All that's doing is showing their custom error page, exactly
 as the other replies have suggested that you'd want to do with Wicket
 - I'd be more impressed if it had shown an index of the news for that
 date, but as it is, that's just what you can easily do with Wicket.
 
 All you need to do is set your own custom error page and switch to
 Deployment mode, so as not to get the developer-friendly error
 messages.
 
 /Gwyn
 
 On Monday, September 10, 2007, 1:05:17 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 I would disagree because this is the first problem any web developer
 would
 like to address, what happens if their urls are being tempered manually,
 it
 should not result into any kind of error by  the web framework, rather
 this
 is the  application validation issue and to be handled by the application
 developer and not Wicket.
 
 Here is the example of app generated url:
 http://www.cnn.com/2007/WORLD/europe/09/10/madeleine.mccann/index.html
 
 And here is the manually tempered url:
 http://www.cnn.com/2007/WORLD/europe/09/10/Foo
 
 And see how nicely this is being handled by the application. 
 
 Applications are architected considering the worst case scenario and not
 the
 ideal world. Right? 
 
 Perhaps,  I need to write my own implementation of
 AbstractRequestTargetUrlCodingStrategy.
 
 =
 
 Gwyn wrote:
 
 On Monday, September 10, 2007, 12:23:36 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 I still do not see why the wicket should treat it as an internal error
 if
 there are missing parameters? I guess wicket needs to follow the same
 paradigm as in the raw HttpRequest, let the user pull the parameters if
 they
 exist and take their own decision if they do not. It does not make any
 sense
 for the Wicket to declare the state of emergency if the parameters  key
 value do not match.
 
 Normally, it does, as in most cases the link would have been generated
 by the web-app or another external web-app, so if it's
 missing/corrupt, something odd is going on.
 
 You, of course, have the option to supply your own strategy if you
 want to attempt to cater for users doing partial/incorrect edits of
 the URL, and having your strategy guess what they meant, but it's
 rather an isolated requirement, so I don't think it would belong in
 the core...
 
 If you're trying to /avoid/ users editing the URL, however, there are
 other coding strategies for that that encrypt  decrypt the URLs...
 
 /Gwyn
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 
 /Gwyn
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Param-%3D-null-tf4413478.html#a12592145
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Johan Compagner
you got to be kidding me...32MB
really? Or is this a nice joke so in the middle of the day :)

johan



On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 It is about 32MB. Kind a big page :)


 Matej Knopp-2 wrote:
 
  Turn on SecondLevelCacheSessionStore, and use FilePageStore as
  IPageStore (specified in session store constructor). Then go to your
  tmp dir and you should be able to find the serialized pages there.
 
  -Matej
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
  How can I figure it out?
 
 
 
 
  Johan Compagner wrote:
  
   if you save the page to disk how big is it?
  
   johan
  
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
  
   Indeed, it is a very big component hierarchy (It contains at least 3
   levels
   of nested AjaxTabbedPanel components).
   The application is, in fact, a single page and it uses a lot of ajax
  to
   perform the updates. The model reflect the component hierarchy
   (Appliction
   has a single modelObject which nests another objects corresponding
 to
   each
   component). I do not have a lot of detaching logic, because it is
   important
   to have all the data in the model (caching), also because the
 services
   are
   very costly operations.
  
   If this description is not enough for replication, I will be glad to
  help
   by
   giving you another details.
  
   Alex.
  
  
   Martijn Dashorst wrote:
   
How big is the page? Sounds like a really, really big component
hierarchy. Then it sounds reasonable that the httpsession store is
much faster: it keeps it in ram, and doesn't use serialization
 until
the session is serialized (server shutting down, deciding to put
session to disk or replication of session across cluster) iirc.
   
I think we would appreciate some way of replicating your results.
 I
assume you can't share the actual code, but could you share a
  spin-off
of the page's component structure and a Model that replicates the
  data
stuff's size (including the detach logic)?
   
Martijn
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
If the pages wouldn't be serializable, it wouldn't work in
  development
mode.
Is it right?
   
I think that it is not necessarily about how large is
 application,
  in
   my
case it is about how large is the model I'm working with for that
specific
request (ajax request).
   
My action was: fetch a subview of a very large table 300x300,
 each
   cell
has
a heavy model object.
   
Alex.
   
   
Johan Compagner wrote:

 that looks very strange to me. We have also a very large app
 here
   and
we
 dont notice a difference
 So i am very curious what is happening at your place then. Are
  you
   sure
 for
 example that the pages
 are serializable ?  That we don't have constantly exceptions?

 johan


 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Maybe the profiling was not a perfect one. But still, I have
 to
   give
up
 using
 SecondSessionLevelStore just because the responsiveness of the
 application
 is very slow.


 Johan Compagner wrote:
 
  invocation count 1??
 
  So you only do 1 request and you profile that?
  thats not a good test. You have to do plenty and multiply on
  the
same
  time
  (10 for 100 request or something like that)
  to really see the difference. (and have a warm up phase)
 
  johan
 
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED]
 wrote:
 
 
  Matej, I must disagree with you regarding performance
 issues
  of
   the
  SecondLevelSessionStore. I've reverted the
Application#newSessionStore
 to
  HttpSessionStore and this significantly improved the
  application
 overall
  performance. Maybe this is not so obvious for small
   applications,
but
  when
  it is about a large one - things changes.
 
  Below, you will find attached two images. The first one is
 a
profiling
 of
  an
  action when working with HttpSessionStore, the second one
 is
  a
 profiling
  for
  the same action when using SecondSessionLevelStore. The
   difference
is
  huge:
  593ms vs 174420ms. I cannot explain what exactly is going
 on,
   but
I've
  noticed that by switching from default
  SecondLevelSessionStore
   to
the
  HttpSessionStore improved a lot the responsiveness of the
application.
 
  Alex.
 
  http://www.nabble.com/file/p12588790/HttpSessionStore.jpg
 
  http://www.nabble.com/file/p12588790/SecondSessionLevelStore.jpg
 
 
 
 
  Matej Knopp-2 wrote:
  
   You can revert to httpsessionstore by changing
   Application.newSessionStore method. But that's not
   recommended.
What
   are your performance problems? I doubt it is caused by
 the

Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Alex Objelean

:) Unfortunately it's not a joke, but I'm glad you're having fun :D.
Actually, this is result of worst case scenario simulation (I told you that
there are heavy objects in the model). After making transient some of the
fields, the size of the page dropped dramatically.

Alex.


Johan Compagner wrote:
 
 you got to be kidding me...32MB
 really? Or is this a nice joke so in the middle of the day :)
 
 johan
 
 
 
 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 It is about 32MB. Kind a big page :)


 Matej Knopp-2 wrote:
 
  Turn on SecondLevelCacheSessionStore, and use FilePageStore as
  IPageStore (specified in session store constructor). Then go to your
  tmp dir and you should be able to find the serialized pages there.
 
  -Matej
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
  How can I figure it out?
 
 
 
 
  Johan Compagner wrote:
  
   if you save the page to disk how big is it?
  
   johan
  
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
  
   Indeed, it is a very big component hierarchy (It contains at least
 3
   levels
   of nested AjaxTabbedPanel components).
   The application is, in fact, a single page and it uses a lot of
 ajax
  to
   perform the updates. The model reflect the component hierarchy
   (Appliction
   has a single modelObject which nests another objects corresponding
 to
   each
   component). I do not have a lot of detaching logic, because it is
   important
   to have all the data in the model (caching), also because the
 services
   are
   very costly operations.
  
   If this description is not enough for replication, I will be glad
 to
  help
   by
   giving you another details.
  
   Alex.
  
  
   Martijn Dashorst wrote:
   
How big is the page? Sounds like a really, really big component
hierarchy. Then it sounds reasonable that the httpsession store
 is
much faster: it keeps it in ram, and doesn't use serialization
 until
the session is serialized (server shutting down, deciding to put
session to disk or replication of session across cluster) iirc.
   
I think we would appreciate some way of replicating your results.
 I
assume you can't share the actual code, but could you share a
  spin-off
of the page's component structure and a Model that replicates the
  data
stuff's size (including the detach logic)?
   
Martijn
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
If the pages wouldn't be serializable, it wouldn't work in
  development
mode.
Is it right?
   
I think that it is not necessarily about how large is
 application,
  in
   my
case it is about how large is the model I'm working with for
 that
specific
request (ajax request).
   
My action was: fetch a subview of a very large table 300x300,
 each
   cell
has
a heavy model object.
   
Alex.
   
   
Johan Compagner wrote:

 that looks very strange to me. We have also a very large app
 here
   and
we
 dont notice a difference
 So i am very curious what is happening at your place then. Are
  you
   sure
 for
 example that the pages
 are serializable ?  That we don't have constantly exceptions?

 johan


 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Maybe the profiling was not a perfect one. But still, I have
 to
   give
up
 using
 SecondSessionLevelStore just because the responsiveness of
 the
 application
 is very slow.


 Johan Compagner wrote:
 
  invocation count 1??
 
  So you only do 1 request and you profile that?
  thats not a good test. You have to do plenty and multiply
 on
  the
same
  time
  (10 for 100 request or something like that)
  to really see the difference. (and have a warm up phase)
 
  johan
 
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED]
 wrote:
 
 
  Matej, I must disagree with you regarding performance
 issues
  of
   the
  SecondLevelSessionStore. I've reverted the
Application#newSessionStore
 to
  HttpSessionStore and this significantly improved the
  application
 overall
  performance. Maybe this is not so obvious for small
   applications,
but
  when
  it is about a large one - things changes.
 
  Below, you will find attached two images. The first one is
 a
profiling
 of
  an
  action when working with HttpSessionStore, the second one
 is
  a
 profiling
  for
  the same action when using SecondSessionLevelStore. The
   difference
is
  huge:
  593ms vs 174420ms. I cannot explain what exactly is going
 on,
   but
I've
  noticed that by switching from default
  SecondLevelSessionStore
   to
the
  HttpSessionStore improved a lot the responsiveness of the
application.
 
  Alex.
 
  http://www.nabble.com/file/p12588790/HttpSessionStore.jpg
 
  

Re: Locating CSS under WEB-INF, please help

2007-09-10 Thread Johan Maasing
Perhaps template inheritance can help you here. I have a 'base' page
that contains the HTML head tag that all my pages use. For example I
have a Basepage.html:

html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org/;
head
link rel=stylesheet type=text/css href=css/main.css/
link rel=stylesheet type=text/css href=css/header.css/
/head
body
wicket:child /
...

and a Basepage.java (which does some stuff common to all pages, like
setting a feedbackpanel or whatever you like to have for all pages)

Then in my real pages I do like this

RealPage.java
public class Index extends BasePage {
public Index() {
...

but the real funny stuff goes on in the template for the real page:
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.apache.org/;
head
link rel=stylesheet type=text/css
href=../../../../../../WebContent/css/main.css/
link rel=stylesheet type=text/css
href=../../../../../../WebContent/css/header.css/
/head
body
wicket:extend

Real content here

/wicket:extend
/body
...

In this way the template can be edited as a static HTML and include
the right CSS relative to the sources in the filesystem. In runtime
wicket will discard anythiong outside the wicket:extend in the
template and use the HTML from the 'base' page.

Hope this can help you somewhat.

Cheers,
Johan M

On 9/10/07, Jason Mihalick [EMAIL PROTECTED] wrote:

 sigh  Ok, thanks for the help on this.  My objective was to be able to have
 a structure of HTML and resource dependencies (css, js, img, etc) that could
 be easily edited in an HTML editor such that the editor doesn't have
 problems resolving the resources and such that Wicket doesn't have problems
 resolving the resources.  From reading your comments and those of others,
 however, this doesn't seem to be an easy task at all.  So, I've gone back to
 the standard Wicket approach where I have placed all HTML files along side
 my Java classes and have located my resources (css, js, img, etc) at the
 root of my web context (in the maven world, this is under the webapp dir, as
 a sibling to WEB-INF).  This keeps Wicket very happy at runtime, but makes
 it difficult for me to edit my site using a HTML editor.  Maybe this won't
 be that big of a deal in practice.  I guess I will find out in time.

 Thanks again guys!


 igor.vaynberg wrote:
 
  oi. the basic problem is that WEB-INF is inaccessible via direct urls.
  this
  is because it houses stuff like classes and you dont want the user to have
  access to those.
 
  so there is a way to make it work, but it will involve wicket or another
  servlet streaming those static resources, which is a lot of overhead.
 
  my suggestion is to move all the css/js/foo out of WEB-INF
 
  -igor
 
 
  On 9/8/07, Jason Mihalick [EMAIL PROTECTED] wrote:
 
 
  I've been searching the forums and wiki on this half the night and I just
  can't figure out what I'm doing wrong here, so please bear with me if
  there
  is an obvious answer to this.
 
  Wicket is not finding my css or js resources when the application is
  deployed.
 
  I followed the wiki instructions for Wicket 1.3 on how to Control where
  HTML files are loaded from
  (
  http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3
  ).
  I have the following structure under WEB-INF:
 
  WEB-INF/
  +--- content/
 +--- css/
 +--- help/
 +--- img/
 +--- js/
 BasePage.html
 Page1.html
 Page2.html
 etc.
  web.xml
 
  In the init() method of my application class, I have added this code as
  per
  the wiki:
 
  IResourceSettings resourceSettings = this.getResourceSettings();
  resourceSettings.addResourceFolder( WEB-INF/content );
  resourceSettings.setResourceStreamLocator( new PathStripperLocator()
  );
 
  My implementation of the PathStripperLocator class matches that found on
  the
  wiki.
 
  When I view the source of Page1.html (which inherits from my BasePage) in
  my
  browser after wicket has served it, I see that Wicket is rewriting the
  location of the css resources as follows:
 
  link href=../css/styles.css rel=stylesheet type=text/css/
 
  I expected the href value to instead be css/styles.css (without the
  ../).
 
  What do I need to do here in order to make this work?
 
  Your help is greatly appreciated!
 
  --
  Jason
 
 
  --
  View this message in context:
  http://www.nabble.com/Locating-CSS-under-WEB-INF%2C-please-help-tf4408084.html#a12575952
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Locating-CSS-under-WEB-INF%2C-please-help-tf4408084.html#a12592027
 Sent from the Wicket - 

Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Martijn Dashorst
The only caveat you'll have is whether or not the backbutton is
supported long enough, and how many copies of that page you want to
have in memory.

If the non-2nd level cache way works for you, then there is absolutely
nobody telling you to stop using it. The difference has mostly to do
with providing backbutton support and optimizing memory usage. In your
case it is probably best to limit the backbutton, as you claim to work
a lot with ajax. So the back button functionality is probably already
not working (users can press it, but they will leave your site, or go
back to the login page).

Profile the memory usage, multiply with the number of users you expect
and ask if it still fits on the machine available for your budget.

The second level cache will still keep the last rendered page in
memory as I understand it, so that 32MB will still be claimed,
whatever store you choose.

Martijn

On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 :) Unfortunately it's not a joke, but I'm glad you're having fun :D.
 Actually, this is result of worst case scenario simulation (I told you that
 there are heavy objects in the model). After making transient some of the
 fields, the size of the page dropped dramatically.

 Alex.


 Johan Compagner wrote:
 
  you got to be kidding me...32MB
  really? Or is this a nice joke so in the middle of the day :)
 
  johan
 
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
 
  It is about 32MB. Kind a big page :)
 
 
  Matej Knopp-2 wrote:
  
   Turn on SecondLevelCacheSessionStore, and use FilePageStore as
   IPageStore (specified in session store constructor). Then go to your
   tmp dir and you should be able to find the serialized pages there.
  
   -Matej
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
   How can I figure it out?
  
  
  
  
   Johan Compagner wrote:
   
if you save the page to disk how big is it?
   
johan
   
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
   
Indeed, it is a very big component hierarchy (It contains at least
  3
levels
of nested AjaxTabbedPanel components).
The application is, in fact, a single page and it uses a lot of
  ajax
   to
perform the updates. The model reflect the component hierarchy
(Appliction
has a single modelObject which nests another objects corresponding
  to
each
component). I do not have a lot of detaching logic, because it is
important
to have all the data in the model (caching), also because the
  services
are
very costly operations.
   
If this description is not enough for replication, I will be glad
  to
   help
by
giving you another details.
   
Alex.
   
   
Martijn Dashorst wrote:

 How big is the page? Sounds like a really, really big component
 hierarchy. Then it sounds reasonable that the httpsession store
  is
 much faster: it keeps it in ram, and doesn't use serialization
  until
 the session is serialized (server shutting down, deciding to put
 session to disk or replication of session across cluster) iirc.

 I think we would appreciate some way of replicating your results.
  I
 assume you can't share the actual code, but could you share a
   spin-off
 of the page's component structure and a Model that replicates the
   data
 stuff's size (including the detach logic)?

 Martijn

 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 If the pages wouldn't be serializable, it wouldn't work in
   development
 mode.
 Is it right?

 I think that it is not necessarily about how large is
  application,
   in
my
 case it is about how large is the model I'm working with for
  that
 specific
 request (ajax request).

 My action was: fetch a subview of a very large table 300x300,
  each
cell
 has
 a heavy model object.

 Alex.


 Johan Compagner wrote:
 
  that looks very strange to me. We have also a very large app
  here
and
 we
  dont notice a difference
  So i am very curious what is happening at your place then. Are
   you
sure
  for
  example that the pages
  are serializable ?  That we don't have constantly exceptions?
 
  johan
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
 
  Maybe the profiling was not a perfect one. But still, I have
  to
give
 up
  using
  SecondSessionLevelStore just because the responsiveness of
  the
  application
  is very slow.
 
 
  Johan Compagner wrote:
  
   invocation count 1??
  
   So you only do 1 request and you profile that?
   thats not a good test. You have to do plenty and multiply
  on
   the
 same
   time
   (10 for 100 request or something like that)
   to really see the difference. (and have a warm up phase)
  
   johan
  
  
  
   On 

Re: Param = null

2007-09-10 Thread Gwyn Evans
You write your own coding strategy, using the existing ones as
guidelines/templates - I've not got any example code as supporting
free-format user-created URL's isn't a scenario that's been relevant
in the applications I've done.

Wicket provides a number of strategies, but the fundamental point is
that it while it attempts to provide for the majority of users, it
also provides a framework and examples to allow those with unique
requirements to develop their own solutions.

/Gwyn

On Monday, September 10, 2007, 1:58:55 PM, chickabee [EMAIL PROTECTED] wrote:

 Ok, let me give you a  different scenario and see if wicket has a way to
 handle it.

 Assume there are 10 parameters are being passed to the app as below:
 http://some.web.site/wicket/app/page/p1/v1/p2/v2/p3/v3/...p9/v9/p10/v10

 Now If I mess-up the key value pair at the end like:
 http://some.web.site/wicket/app/page/p1/v1/p2/v2/p3/v3/...p9/v9/p10=v10

 In that case how do i get the value of first 9 correct parameter and values?
 and do something with this available info, rather than blindly redirecting
 the user to the Error Page.

 Thanks..

 ===


 Gwyn wrote:
 
 Pardon? All that's doing is showing their custom error page, exactly
 as the other replies have suggested that you'd want to do with Wicket
 - I'd be more impressed if it had shown an index of the news for that
 date, but as it is, that's just what you can easily do with Wicket.
 
 All you need to do is set your own custom error page and switch to
 Deployment mode, so as not to get the developer-friendly error
 messages.
 
 /Gwyn
 
 On Monday, September 10, 2007, 1:05:17 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 I would disagree because this is the first problem any web developer
 would
 like to address, what happens if their urls are being tempered manually,
 it
 should not result into any kind of error by  the web framework, rather
 this
 is the  application validation issue and to be handled by the application
 developer and not Wicket.
 
 Here is the example of app generated url:
 http://www.cnn.com/2007/WORLD/europe/09/10/madeleine.mccann/index.html
 
 And here is the manually tempered url:
 http://www.cnn.com/2007/WORLD/europe/09/10/Foo
 
 And see how nicely this is being handled by the application. 
 
 Applications are architected considering the worst case scenario and not
 the
 ideal world. Right? 
 
 Perhaps,  I need to write my own implementation of
 AbstractRequestTargetUrlCodingStrategy.
 
 =
 
 Gwyn wrote:
 
 On Monday, September 10, 2007, 12:23:36 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 I still do not see why the wicket should treat it as an internal error
 if
 there are missing parameters? I guess wicket needs to follow the same
 paradigm as in the raw HttpRequest, let the user pull the parameters if
 they
 exist and take their own decision if they do not. It does not make any
 sense
 for the Wicket to declare the state of emergency if the parameters  key
 value do not match.
 
 Normally, it does, as in most cases the link would have been generated
 by the web-app or another external web-app, so if it's
 missing/corrupt, something odd is going on.
 
 You, of course, have the option to supply your own strategy if you
 want to attempt to cater for users doing partial/incorrect edits of
 the URL, and having your strategy guess what they meant, but it's
 rather an isolated requirement, so I don't think it would belong in
 the core...
 
 If you're trying to /avoid/ users editing the URL, however, there are
 other coding strategies for that that encrypt  decrypt the URLs...
 
/Gwyn


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Alex Objelean

It is a intranet application, so the number of users for this application is
at most ~30-40 users/day. A back button support is not needed, because there
is a single page and also it doesn't make sense (since it is all ajax). 
I'm still wondering, what is best in this case: 
* Using HttpSessionStore
* Use 2nd level session store and make transient heavy object references.

Alex.



Martijn Dashorst wrote:
 
 The only caveat you'll have is whether or not the backbutton is
 supported long enough, and how many copies of that page you want to
 have in memory.
 
 If the non-2nd level cache way works for you, then there is absolutely
 nobody telling you to stop using it. The difference has mostly to do
 with providing backbutton support and optimizing memory usage. In your
 case it is probably best to limit the backbutton, as you claim to work
 a lot with ajax. So the back button functionality is probably already
 not working (users can press it, but they will leave your site, or go
 back to the login page).
 
 Profile the memory usage, multiply with the number of users you expect
 and ask if it still fits on the machine available for your budget.
 
 The second level cache will still keep the last rendered page in
 memory as I understand it, so that 32MB will still be claimed,
 whatever store you choose.
 
 Martijn
 
 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 :) Unfortunately it's not a joke, but I'm glad you're having fun :D.
 Actually, this is result of worst case scenario simulation (I told you
 that
 there are heavy objects in the model). After making transient some of the
 fields, the size of the page dropped dramatically.

 Alex.


 Johan Compagner wrote:
 
  you got to be kidding me...32MB
  really? Or is this a nice joke so in the middle of the day :)
 
  johan
 
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
 
  It is about 32MB. Kind a big page :)
 
 
  Matej Knopp-2 wrote:
  
   Turn on SecondLevelCacheSessionStore, and use FilePageStore as
   IPageStore (specified in session store constructor). Then go to your
   tmp dir and you should be able to find the serialized pages there.
  
   -Matej
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
   How can I figure it out?
  
  
  
  
   Johan Compagner wrote:
   
if you save the page to disk how big is it?
   
johan
   
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
   
Indeed, it is a very big component hierarchy (It contains at
 least
  3
levels
of nested AjaxTabbedPanel components).
The application is, in fact, a single page and it uses a lot of
  ajax
   to
perform the updates. The model reflect the component hierarchy
(Appliction
has a single modelObject which nests another objects
 corresponding
  to
each
component). I do not have a lot of detaching logic, because it
 is
important
to have all the data in the model (caching), also because the
  services
are
very costly operations.
   
If this description is not enough for replication, I will be
 glad
  to
   help
by
giving you another details.
   
Alex.
   
   
Martijn Dashorst wrote:

 How big is the page? Sounds like a really, really big
 component
 hierarchy. Then it sounds reasonable that the httpsession
 store
  is
 much faster: it keeps it in ram, and doesn't use serialization
  until
 the session is serialized (server shutting down, deciding to
 put
 session to disk or replication of session across cluster)
 iirc.

 I think we would appreciate some way of replicating your
 results.
  I
 assume you can't share the actual code, but could you share a
   spin-off
 of the page's component structure and a Model that replicates
 the
   data
 stuff's size (including the detach logic)?

 Martijn

 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 If the pages wouldn't be serializable, it wouldn't work in
   development
 mode.
 Is it right?

 I think that it is not necessarily about how large is
  application,
   in
my
 case it is about how large is the model I'm working with for
  that
 specific
 request (ajax request).

 My action was: fetch a subview of a very large table 300x300,
  each
cell
 has
 a heavy model object.

 Alex.


 Johan Compagner wrote:
 
  that looks very strange to me. We have also a very large
 app
  here
and
 we
  dont notice a difference
  So i am very curious what is happening at your place then.
 Are
   you
sure
  for
  example that the pages
  are serializable ?  That we don't have constantly
 exceptions?
 
  johan
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED]
 wrote:
 
 
  Maybe the profiling was not a perfect one. But still, I
 have
  to
give
 up
  using
  SecondSessionLevelStore just because the 

Re: Param = null

2007-09-10 Thread chickabee

Thanks Gwyn for all the clarifications and patience, I believe I have all the
answers now.

Also, what's your take on adding an iterator to PageParameters that will
help in looping over the parameters, rather than pulling them one at at time
the way it is right now. I'm not sure if the same can be achieved some other
way using the existing API.

Any Ideas?

===

Gwyn wrote:
 
 You write your own coding strategy, using the existing ones as
 guidelines/templates - I've not got any example code as supporting
 free-format user-created URL's isn't a scenario that's been relevant
 in the applications I've done.
 
 Wicket provides a number of strategies, but the fundamental point is
 that it while it attempts to provide for the majority of users, it
 also provides a framework and examples to allow those with unique
 requirements to develop their own solutions.
 
 /Gwyn
 
 On Monday, September 10, 2007, 1:58:55 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 Ok, let me give you a  different scenario and see if wicket has a way to
 handle it.
 
 Assume there are 10 parameters are being passed to the app as below:
 http://some.web.site/wicket/app/page/p1/v1/p2/v2/p3/v3/...p9/v9/p10/v10
 
 Now If I mess-up the key value pair at the end like:
 http://some.web.site/wicket/app/page/p1/v1/p2/v2/p3/v3/...p9/v9/p10=v10
 
 In that case how do i get the value of first 9 correct parameter and
 values?
 and do something with this available info, rather than blindly
 redirecting
 the user to the Error Page.
 
 Thanks..
 
 ===
 
 
 Gwyn wrote:
 
 Pardon? All that's doing is showing their custom error page, exactly
 as the other replies have suggested that you'd want to do with Wicket
 - I'd be more impressed if it had shown an index of the news for that
 date, but as it is, that's just what you can easily do with Wicket.
 
 All you need to do is set your own custom error page and switch to
 Deployment mode, so as not to get the developer-friendly error
 messages.
 
 /Gwyn
 
 On Monday, September 10, 2007, 1:05:17 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 I would disagree because this is the first problem any web developer
 would
 like to address, what happens if their urls are being tempered
 manually,
 it
 should not result into any kind of error by  the web framework, rather
 this
 is the  application validation issue and to be handled by the
 application
 developer and not Wicket.
 
 Here is the example of app generated url:
 http://www.cnn.com/2007/WORLD/europe/09/10/madeleine.mccann/index.html
 
 And here is the manually tempered url:
 http://www.cnn.com/2007/WORLD/europe/09/10/Foo
 
 And see how nicely this is being handled by the application. 
 
 Applications are architected considering the worst case scenario and
 not
 the
 ideal world. Right? 
 
 Perhaps,  I need to write my own implementation of
 AbstractRequestTargetUrlCodingStrategy.
 
 =
 
 Gwyn wrote:
 
 On Monday, September 10, 2007, 12:23:36 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 I still do not see why the wicket should treat it as an internal
 error
 if
 there are missing parameters? I guess wicket needs to follow the same
 paradigm as in the raw HttpRequest, let the user pull the parameters
 if
 they
 exist and take their own decision if they do not. It does not make
 any
 sense
 for the Wicket to declare the state of emergency if the parameters 
 key
 value do not match.
 
 Normally, it does, as in most cases the link would have been generated
 by the web-app or another external web-app, so if it's
 missing/corrupt, something odd is going on.
 
 You, of course, have the option to supply your own strategy if you
 want to attempt to cater for users doing partial/incorrect edits of
 the URL, and having your strategy guess what they meant, but it's
 rather an isolated requirement, so I don't think it would belong in
 the core...
 
 If you're trying to /avoid/ users editing the URL, however, there are
 other coding strategies for that that encrypt  decrypt the URLs...
 
 /Gwyn
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Param-%3D-null-tf4413478.html#a12592819
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Johan Compagner
if you just have 1 page with no back button support/all ajax
then httpsessionstore is fine

johan


On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 It is a intranet application, so the number of users for this application
 is
 at most ~30-40 users/day. A back button support is not needed, because
 there
 is a single page and also it doesn't make sense (since it is all ajax).
 I'm still wondering, what is best in this case:
 * Using HttpSessionStore
 * Use 2nd level session store and make transient heavy object references.

 Alex.



 Martijn Dashorst wrote:
 
  The only caveat you'll have is whether or not the backbutton is
  supported long enough, and how many copies of that page you want to
  have in memory.
 
  If the non-2nd level cache way works for you, then there is absolutely
  nobody telling you to stop using it. The difference has mostly to do
  with providing backbutton support and optimizing memory usage. In your
  case it is probably best to limit the backbutton, as you claim to work
  a lot with ajax. So the back button functionality is probably already
  not working (users can press it, but they will leave your site, or go
  back to the login page).
 
  Profile the memory usage, multiply with the number of users you expect
  and ask if it still fits on the machine available for your budget.
 
  The second level cache will still keep the last rendered page in
  memory as I understand it, so that 32MB will still be claimed,
  whatever store you choose.
 
  Martijn
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
  :) Unfortunately it's not a joke, but I'm glad you're having fun :D.
  Actually, this is result of worst case scenario simulation (I told you
  that
  there are heavy objects in the model). After making transient some of
 the
  fields, the size of the page dropped dramatically.
 
  Alex.
 
 
  Johan Compagner wrote:
  
   you got to be kidding me...32MB
   really? Or is this a nice joke so in the middle of the day :)
  
   johan
  
  
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
  
   It is about 32MB. Kind a big page :)
  
  
   Matej Knopp-2 wrote:
   
Turn on SecondLevelCacheSessionStore, and use FilePageStore as
IPageStore (specified in session store constructor). Then go to
 your
tmp dir and you should be able to find the serialized pages there.
   
-Matej
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
How can I figure it out?
   
   
   
   
Johan Compagner wrote:

 if you save the page to disk how big is it?

 johan


 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Indeed, it is a very big component hierarchy (It contains at
  least
   3
 levels
 of nested AjaxTabbedPanel components).
 The application is, in fact, a single page and it uses a lot
 of
   ajax
to
 perform the updates. The model reflect the component hierarchy
 (Appliction
 has a single modelObject which nests another objects
  corresponding
   to
 each
 component). I do not have a lot of detaching logic, because it
  is
 important
 to have all the data in the model (caching), also because the
   services
 are
 very costly operations.

 If this description is not enough for replication, I will be
  glad
   to
help
 by
 giving you another details.

 Alex.


 Martijn Dashorst wrote:
 
  How big is the page? Sounds like a really, really big
  component
  hierarchy. Then it sounds reasonable that the httpsession
  store
   is
  much faster: it keeps it in ram, and doesn't use
 serialization
   until
  the session is serialized (server shutting down, deciding to
  put
  session to disk or replication of session across cluster)
  iirc.
 
  I think we would appreciate some way of replicating your
  results.
   I
  assume you can't share the actual code, but could you share
 a
spin-off
  of the page's component structure and a Model that
 replicates
  the
data
  stuff's size (including the detach logic)?
 
  Martijn
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED]
 wrote:
 
  If the pages wouldn't be serializable, it wouldn't work in
development
  mode.
  Is it right?
 
  I think that it is not necessarily about how large is
   application,
in
 my
  case it is about how large is the model I'm working with
 for
   that
  specific
  request (ajax request).
 
  My action was: fetch a subview of a very large table
 300x300,
   each
 cell
  has
  a heavy model object.
 
  Alex.
 
 
  Johan Compagner wrote:
  
   that looks very strange to me. We have also a very large
  app
   here
 and
  we
   dont notice a difference
   So i am very curious what is happening at your place
 then.
  Are
you
 sure
   for
   example that the 

Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Alex Objelean

Johan, Matej, Martijn, 
thank you all for help! 

PS: one more reason to love this community :)


Johan Compagner wrote:
 
 if you just have 1 page with no back button support/all ajax
 then httpsessionstore is fine
 
 johan
 
 
 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 It is a intranet application, so the number of users for this application
 is
 at most ~30-40 users/day. A back button support is not needed, because
 there
 is a single page and also it doesn't make sense (since it is all ajax).
 I'm still wondering, what is best in this case:
 * Using HttpSessionStore
 * Use 2nd level session store and make transient heavy object references.

 Alex.



 Martijn Dashorst wrote:
 
  The only caveat you'll have is whether or not the backbutton is
  supported long enough, and how many copies of that page you want to
  have in memory.
 
  If the non-2nd level cache way works for you, then there is absolutely
  nobody telling you to stop using it. The difference has mostly to do
  with providing backbutton support and optimizing memory usage. In your
  case it is probably best to limit the backbutton, as you claim to work
  a lot with ajax. So the back button functionality is probably already
  not working (users can press it, but they will leave your site, or go
  back to the login page).
 
  Profile the memory usage, multiply with the number of users you expect
  and ask if it still fits on the machine available for your budget.
 
  The second level cache will still keep the last rendered page in
  memory as I understand it, so that 32MB will still be claimed,
  whatever store you choose.
 
  Martijn
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
  :) Unfortunately it's not a joke, but I'm glad you're having fun :D.
  Actually, this is result of worst case scenario simulation (I told you
  that
  there are heavy objects in the model). After making transient some of
 the
  fields, the size of the page dropped dramatically.
 
  Alex.
 
 
  Johan Compagner wrote:
  
   you got to be kidding me...32MB
   really? Or is this a nice joke so in the middle of the day :)
  
   johan
  
  
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
  
   It is about 32MB. Kind a big page :)
  
  
   Matej Knopp-2 wrote:
   
Turn on SecondLevelCacheSessionStore, and use FilePageStore as
IPageStore (specified in session store constructor). Then go to
 your
tmp dir and you should be able to find the serialized pages
 there.
   
-Matej
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
How can I figure it out?
   
   
   
   
Johan Compagner wrote:

 if you save the page to disk how big is it?

 johan


 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Indeed, it is a very big component hierarchy (It contains at
  least
   3
 levels
 of nested AjaxTabbedPanel components).
 The application is, in fact, a single page and it uses a lot
 of
   ajax
to
 perform the updates. The model reflect the component
 hierarchy
 (Appliction
 has a single modelObject which nests another objects
  corresponding
   to
 each
 component). I do not have a lot of detaching logic, because
 it
  is
 important
 to have all the data in the model (caching), also because the
   services
 are
 very costly operations.

 If this description is not enough for replication, I will be
  glad
   to
help
 by
 giving you another details.

 Alex.


 Martijn Dashorst wrote:
 
  How big is the page? Sounds like a really, really big
  component
  hierarchy. Then it sounds reasonable that the httpsession
  store
   is
  much faster: it keeps it in ram, and doesn't use
 serialization
   until
  the session is serialized (server shutting down, deciding
 to
  put
  session to disk or replication of session across cluster)
  iirc.
 
  I think we would appreciate some way of replicating your
  results.
   I
  assume you can't share the actual code, but could you share
 a
spin-off
  of the page's component structure and a Model that
 replicates
  the
data
  stuff's size (including the detach logic)?
 
  Martijn
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED]
 wrote:
 
  If the pages wouldn't be serializable, it wouldn't work in
development
  mode.
  Is it right?
 
  I think that it is not necessarily about how large is
   application,
in
 my
  case it is about how large is the model I'm working with
 for
   that
  specific
  request (ajax request).
 
  My action was: fetch a subview of a very large table
 300x300,
   each
 cell
  has
  a heavy model object.
 
  Alex.
 
 
  Johan Compagner wrote:
  
   that looks very strange to me. We have also a very large
  app
   here
 and
  we
   dont notice a 

Re: {wicket 1.3 beta 3} Howto add keywords No cache etc?

2007-09-10 Thread Igor Vaynberg
you mean when you add Image using ajax it doesnt show up?

being able to refresh something and it not working are two very different
things. if you have a nonversioned page and Image in it you will have the
exact same behavior because the url will remain stable - does that mean
Image is broken in nonversioned pages? no! sometimes you want this behavior,
that is why we provide NonCachingImage for the times when you dont.

-igor


On 9/10/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
wrote:

 I know(and agree), but I just feel that we should somehow warn people
 that image won't work with ajax?

 regards Nino

 Matej Knopp wrote:
  Again, try using NonCachingImage instead of Image. I does exacly what
  the suggested fix does. I just overlooked it.
 
  -Matej
 
  On 9/10/07, Nino Saturnino Martinez Vazquez Wael
  [EMAIL PROTECTED] wrote:
 
  No, it did not work for me using ajax. Until I added one of the
  solutions described.
 
  Should I provide a quickstart?
 
  regards Nino
 
  Igor Vaynberg wrote:
 
  as far as i know Image works just fine with ajax. if you want an image
 that
  is not cached use NonCachingImage.
 
  -igor
 
 
  On 9/9/07, Nino Saturnino Martinez Vazquez Wael 
 [EMAIL PROTECTED]
  wrote:
 
 
  This has been rejected as invalid for fixing... But should'nt at
 least
  something have been added to the component. Currently Image are not
  valid for ajax calls, and you wont see the problem until you catch it
 in
  your browser.. Either we write something in the javadocs or??? Could
 be
  nice to tell if the component did not work with ajax, somehow.
 
  regards Nino
 
  Matej Knopp wrote:
 
 
  Well, i guess with component path encoded in url, the milliseconds
 could
 
 
  do ;)
 
 
  -Matej
 
  On 9/7/07, Martijn Dashorst [EMAIL PROTECTED] wrote:
 
 
 
  Yes, but all those images will have a different url, or are they
 the
  same? The milliseconds parameter is only used to distinguish
 between
  requests, not within one.
 
  Martijn
 
  On 9/7/07, Matej Knopp [EMAIL PROTECTED] wrote:
 
 
 
  Really? What's so odd about it? Say you have a page with 100
 images.
  How long do you think such page renders? It shouldn't take long
 than
  say 5 ms on a decent machine.
 
  -Matej
 
  On 9/7/07, Johan Compagner [EMAIL PROTECTED] wrote:
 
 
 
  2 tags generating the same milisecond for the same
 client/session?
  that looks very very very odd to me.
 
  johan
 
 
  On 9/7/07, Nino Saturnino Martinez Vazquez Wael 
 
 
  [EMAIL PROTECTED]
 
 
  wrote:
 
 
 
  Actually  we discussed that.
 
  I suggested it but as Matej wrote:
  don't think so. you can have two tags generated in same
 
 
  millisecond.. As
 
 
  for nano might be better, lesser chance for tags being generated
 in
 
 
  the
 
 
  same nanosec. But whats wrong with autoindex?
 
  Martijn Dashorst wrote:
 
 
 
  Why not use System.currentTimeMillis()? Or if you are really
 
 
  concerned
 
 
  use nanotime.
 
  Martijn
 
  On 9/7/07, Nino Saturnino Martinez Vazquez Wael 
 
 
  [EMAIL PROTECTED]
 
 
  wrote:
 
 
 
  so no, talking to Matej on ##wicket, the fix was this:
 
  Resolutions are these two :
  protected void onComponentTag(ComponentTag tag) {
  super.onComponentTag(tag);
  tag.put(src, tag.getString(src) + rand= +
  Math.random());
  }
 
  or event better since random could give duplicate results:
  protected void onComponentTag(ComponentTag tag) {
  super.onComponentTag(tag);
  tag.put(src, tag.getString(src) + autoIndex= +
  getPage().getAutoIndex());
  }
  Although im not sure if its safe to use autoIndex?I've put up
 a
 
 
  feature
 
 
  request for it to be implemented.
 
  https://issues.apache.org/jira/browse/WICKET-939
 
 
  -Nino
 
 
  Nino Saturnino Martinez Vazquez Wael wrote:
 
 
 
 
  this is whats generated:
 
 
 
 
 
 
 http://localhost:8080/thirdparty-webapp/thirdParty/?wicket:interface=:4:form:phoneA:phoneThumb:image::IResourceListener
 
 
  ::
 
 
 
  regards Nino
 
  Martijn Dashorst wrote:
 
 
 
 
  The most failsafe solution to the update image using Ajax
 
 
  request to
 
 
  my mind is to add a random number to the url for the image
 (I
 
 
  thought
 
 
  we already did that?).
 
  Martijn
 
  On 9/7/07, Nino Saturnino Martinez Vazquez Wael
  [EMAIL PROTECTED] wrote:
 
 
 
 
 
  Hi
 
  How do I add keywords no-cache and etc, for a panel? Reason
 are
 
 
  that
 
 
  the
  panel carries a image and that gets cached so when my ajax
 call
  comes in
  and updates the model then the old image are shown..
 
  regards Nino
 
 
 
 
 
 
  -
 
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 
 
 
 
  -
 
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
  

Re: Locating CSS under WEB-INF, please help

2007-09-10 Thread Jason Mihalick

Thanks for the reply.

Where are your css resources located under this configuration?  I have a
similar setup.  I have a BasePage.html that refers to the css:

head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /

!--  Stylesheets --
link href=css/styles.cssrel=stylesheet 
type=text/css
/
...
/head

But since my BasePage.html is located with my Java classes (at
src/main/java/com///ui/web/page/BasePage.html) and my css resources
are located at src/main/webapp/css , if I try to load the BasePage.html file
in an HTML editor, it will be unable to resolve the css resources.

--
Jason


Johan Maasing-2 wrote:
 
 Perhaps template inheritance can help you here. I have a 'base' page
 that contains the HTML head tag that all my pages use. For example I
 have a Basepage.html:
 
 html xmlns=http://www.w3.org/1999/xhtml;
 xmlns:wicket=http://wicket.apache.org/;
 head
   link rel=stylesheet type=text/css href=css/main.css/
   link rel=stylesheet type=text/css href=css/header.css/
 /head
 body
   wicket:child /
 ...
 
 and a Basepage.java (which does some stuff common to all pages, like
 setting a feedbackpanel or whatever you like to have for all pages)
 
 Then in my real pages I do like this
 
 RealPage.java
 public class Index extends BasePage {
   public Index() {
 ...
 
 but the real funny stuff goes on in the template for the real page:
 html xmlns=http://www.w3.org/1999/xhtml;
 xmlns:wicket=http://wicket.apache.org/;
 head
 link rel=stylesheet type=text/css
 href=../../../../../../WebContent/css/main.css/
 link rel=stylesheet type=text/css
 href=../../../../../../WebContent/css/header.css/
 /head
 body
 wicket:extend
 
 Real content here
 
 /wicket:extend
 /body
 ...
 
 In this way the template can be edited as a static HTML and include
 the right CSS relative to the sources in the filesystem. In runtime
 wicket will discard anythiong outside the wicket:extend in the
 template and use the HTML from the 'base' page.
 
 Hope this can help you somewhat.
 
 Cheers,
 Johan M
 
 On 9/10/07, Jason Mihalick [EMAIL PROTECTED] wrote:

 sigh  Ok, thanks for the help on this.  My objective was to be able to
 have
 a structure of HTML and resource dependencies (css, js, img, etc) that
 could
 be easily edited in an HTML editor such that the editor doesn't have
 problems resolving the resources and such that Wicket doesn't have
 problems
 resolving the resources.  From reading your comments and those of others,
 however, this doesn't seem to be an easy task at all.  So, I've gone back
 to
 the standard Wicket approach where I have placed all HTML files along
 side
 my Java classes and have located my resources (css, js, img, etc) at the
 root of my web context (in the maven world, this is under the webapp dir,
 as
 a sibling to WEB-INF).  This keeps Wicket very happy at runtime, but
 makes
 it difficult for me to edit my site using a HTML editor.  Maybe this
 won't
 be that big of a deal in practice.  I guess I will find out in time.

 Thanks again guys!


 igor.vaynberg wrote:
 
  oi. the basic problem is that WEB-INF is inaccessible via direct urls.
  this
  is because it houses stuff like classes and you dont want the user to
 have
  access to those.
 
  so there is a way to make it work, but it will involve wicket or
 another
  servlet streaming those static resources, which is a lot of overhead.
 
  my suggestion is to move all the css/js/foo out of WEB-INF
 
  -igor
 
 
  On 9/8/07, Jason Mihalick [EMAIL PROTECTED] wrote:
 
 
  I've been searching the forums and wiki on this half the night and I
 just
  can't figure out what I'm doing wrong here, so please bear with me if
  there
  is an obvious answer to this.
 
  Wicket is not finding my css or js resources when the application is
  deployed.
 
  I followed the wiki instructions for Wicket 1.3 on how to Control
 where
  HTML files are loaded from
  (
 
 http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3
  ).
  I have the following structure under WEB-INF:
 
  WEB-INF/
  +--- content/
 +--- css/
 +--- help/
 +--- img/
 +--- js/
 BasePage.html
 Page1.html
 Page2.html
 etc.
  web.xml
 
  In the init() method of my application class, I have added this code
 as
  per
  the wiki:
 
  IResourceSettings resourceSettings = this.getResourceSettings();
  resourceSettings.addResourceFolder( WEB-INF/content );
  resourceSettings.setResourceStreamLocator( new
 PathStripperLocator()
  );
 
  My implementation of the PathStripperLocator class matches that found
 on
  the
  wiki.
 
  When I view the source of Page1.html (which inherits from my BasePage)
 in
  my
  browser after wicket has served it, I see that Wicket is rewriting the
  location of the css resources as follows:
 
  link href=../css/styles.css 

Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Igor Vaynberg
and one more advice, for you and people reading about this. if you have
large data like that that you want cached because retrieving it is slow, i
would use an external cache. caching it in wicket-models is not the right
place imho because as you can see wicket sometimes needs to serialize/clone
pages. so having something like ehcache glued to your application object
would work better for caching here. it will allow you the speed you need,
and also keep the ui state down to a minimum - which will make your app
clusterable and thus scalable for the future.

-igor


On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:


 Johan, Matej, Martijn,
 thank you all for help!

 PS: one more reason to love this community :)


 Johan Compagner wrote:
 
  if you just have 1 page with no back button support/all ajax
  then httpsessionstore is fine
 
  johan
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
 
 
  It is a intranet application, so the number of users for this
 application
  is
  at most ~30-40 users/day. A back button support is not needed, because
  there
  is a single page and also it doesn't make sense (since it is all ajax).
  I'm still wondering, what is best in this case:
  * Using HttpSessionStore
  * Use 2nd level session store and make transient heavy object
 references.
 
  Alex.
 
 
 
  Martijn Dashorst wrote:
  
   The only caveat you'll have is whether or not the backbutton is
   supported long enough, and how many copies of that page you want to
   have in memory.
  
   If the non-2nd level cache way works for you, then there is
 absolutely
   nobody telling you to stop using it. The difference has mostly to do
   with providing backbutton support and optimizing memory usage. In
 your
   case it is probably best to limit the backbutton, as you claim to
 work
   a lot with ajax. So the back button functionality is probably already
   not working (users can press it, but they will leave your site, or go
   back to the login page).
  
   Profile the memory usage, multiply with the number of users you
 expect
   and ask if it still fits on the machine available for your budget.
  
   The second level cache will still keep the last rendered page in
   memory as I understand it, so that 32MB will still be claimed,
   whatever store you choose.
  
   Martijn
  
   On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
   :) Unfortunately it's not a joke, but I'm glad you're having fun :D.
   Actually, this is result of worst case scenario simulation (I told
 you
   that
   there are heavy objects in the model). After making transient some
 of
  the
   fields, the size of the page dropped dramatically.
  
   Alex.
  
  
   Johan Compagner wrote:
   
you got to be kidding me...32MB
really? Or is this a nice joke so in the middle of the day :)
   
johan
   
   
   
On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:
   
   
It is about 32MB. Kind a big page :)
   
   
Matej Knopp-2 wrote:

 Turn on SecondLevelCacheSessionStore, and use FilePageStore as
 IPageStore (specified in session store constructor). Then go to
  your
 tmp dir and you should be able to find the serialized pages
  there.

 -Matej

 On 9/10/07, Alex Objelean [EMAIL PROTECTED] wrote:

 How can I figure it out?




 Johan Compagner wrote:
 
  if you save the page to disk how big is it?
 
  johan
 
 
  On 9/10/07, Alex Objelean [EMAIL PROTECTED]
 wrote:
 
 
  Indeed, it is a very big component hierarchy (It contains
 at
   least
3
  levels
  of nested AjaxTabbedPanel components).
  The application is, in fact, a single page and it uses a
 lot
  of
ajax
 to
  perform the updates. The model reflect the component
  hierarchy
  (Appliction
  has a single modelObject which nests another objects
   corresponding
to
  each
  component). I do not have a lot of detaching logic, because
  it
   is
  important
  to have all the data in the model (caching), also because
 the
services
  are
  very costly operations.
 
  If this description is not enough for replication, I will
 be
   glad
to
 help
  by
  giving you another details.
 
  Alex.
 
 
  Martijn Dashorst wrote:
  
   How big is the page? Sounds like a really, really big
   component
   hierarchy. Then it sounds reasonable that the httpsession
   store
is
   much faster: it keeps it in ram, and doesn't use
  serialization
until
   the session is serialized (server shutting down, deciding
  to
   put
   session to disk or replication of session across cluster)
   iirc.
  
   I think we would appreciate some way of replicating your
   results.
I
   assume you can't share the actual code, but could you
 share
  a
 spin-off
   of the page's component structure and a Model that
  replicates
   the
   

Re: Image from DB example

2007-09-10 Thread Igor Vaynberg
google pngfix for explorer

-igor


On 9/10/07, Anthony J Webster [EMAIL PROTECTED] wrote:

 Along these lines I haven't managed to get images with transparency to
 display properly. My PNGs all display black instead of transparent pixels
 :(.
 Anthony

 - Original Message -
 From: Igor Vaynberg [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Sent: Monday, September 10, 2007 4:32 PM
 Subject: Re: Image from DB example


  see sourcecode of the pastebin, i think its on belios. also there is an
  article on the wiki about it.
 
  -igor
 
 
  On 9/9/07, Doug Leeper [EMAIL PROTECTED] wrote:
 
 
  I am looking for an example that obtains an image from the db and
  displays
  it.  Can anyone point me in the right direction?  I couldn't find the
  cdApp
  in wicket-contrib-examples
 
  I know that I need to use a Resource or some derivative of one, but I
  want
  to make sure that the Image is not stored in session.  I am converting
 an
  existing JSP/Pageflow project to Wicket and have used a specific
 servlet
  to
  stream the image but not sure how to do in Wicket.
 
 
  Thanks in advance,
  - Doug
  --
  View this message in context:
  http://www.nabble.com/Image-from-DB-example-tf4410796.html#a12582968
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Image from DB example

2007-09-10 Thread Anthony J Webster
If I remember correctly (this was a while back) it doesn't work over firefox 
either...

I'll check up on the link.
Thanks

Anthony

- Original Message - 
From: Igor Vaynberg [EMAIL PROTECTED]

To: users@wicket.apache.org
Sent: Monday, September 10, 2007 4:58 PM
Subject: Re: Image from DB example



google pngfix for explorer

-igor


On 9/10/07, Anthony J Webster [EMAIL PROTECTED] wrote:


Along these lines I haven't managed to get images with transparency to
display properly. My PNGs all display black instead of transparent pixels
:(.
Anthony

- Original Message -
From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Monday, September 10, 2007 4:32 PM
Subject: Re: Image from DB example


 see sourcecode of the pastebin, i think its on belios. also there is an
 article on the wiki about it.

 -igor


 On 9/9/07, Doug Leeper [EMAIL PROTECTED] wrote:


 I am looking for an example that obtains an image from the db and
 displays
 it.  Can anyone point me in the right direction?  I couldn't find the
 cdApp
 in wicket-contrib-examples

 I know that I need to use a Resource or some derivative of one, but I
 want
 to make sure that the Image is not stored in session.  I am converting
an
 existing JSP/Pageflow project to Wicket and have used a specific
servlet
 to
 stream the image but not sure how to do in Wicket.


 Thanks in advance,
 - Doug
 --
 View this message in context:
 http://www.nabble.com/Image-from-DB-example-tf4410796.html#a12582968
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form.updateFormComponentModels bug?

2007-09-10 Thread Johan Compagner

 The extra memory for the ClickListener is negligible and does give you
 more flexibility because now you can have more than one interested party
 for the link click. My use case (fetch nested component, add listener)
 was already answered sufficiently by Martijn (bad OO, components should
 publish own events that make sense in the problem domain), but I still
 an eventlistener-based design could have merit (see the move towards
 Delegation Event Model in AWT:
 http://java.sun.com/j2se/1.3/docs/guide/awt/designspec/events.html).
 While wicket is not swing or awt, it's an interesting read.



with the link abstract class you don't have any extra memory overhead
but with the listener interface you have quite a lot because you need
and extra reference in link itself, that holds an extra List (that again has
its own stuff)
and then you have an extra instance of the listener itself which by itself
has its internal representation
Don't underestimate this. especially because we also can use them in
tableviews with a lot of cells.

But as i said, if you want a listener interface then you can build it quite
easily

johan


Re: Disable the SecondLevelPageCache?

2007-09-10 Thread Johan Compagner

 and also keep the ui state down to a minimum - which will make your app
 clusterable and thus scalable for the future.



the app is clusterable it could serialize it just fine ;)
32MB and everything is serializeable thats an accomplishment!


johan


Re: Wicket validation flaw?

2007-09-10 Thread Johan Compagner
convertvalue() isn't called for a datefield i think...
because i think the type is set (to Date) and then the converter is called:
convertedInput = converter.convertToObject(getInput(), getLocale());

so i don't think it will be trimmed...

johan


On 9/7/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 actually we do trim them.

 convertinput() calls convertvalue() which does trim. so if you override
 convertvalue() itself you need to trim yourself. however i do not see it
 being overwritten anywhere. is this datetextfield from extensions or
 wicket-datetime?

 -igor


 On 9/6/07, Matej Knopp [EMAIL PROTECTED] wrote:
 
  I thought we were trimming textfield strings, but now i see it's no
  longer the case. Is it a regression or a feature?
 
  Also the missing message doesn't make much sense, can you please
  report a JIRA issue and attach a quick start project?
 
  -Matej
 
  On 9/6/07, Alex Objelean [EMAIL PROTECTED] wrote:
  
   I've discovered the following issue:
   When using a DateTextField in a form (with the format: dd/MM/),
 user
  by
   mistake add an extra space (for instance: 06/09/2007 ) and submit
 the
   form. The are two problems:
  
   1) I would expect the convertor to convert this value correct, but the
   AbstractConverter.parse method throws a ConversionException because:
   (position.getIndex() != stringValue.length())
  
   2) The above exception is not reported anywhere, because validate
 method
   does not check if the input is valid after converting its value:
  
  
  
  public final void validate()
  {
  validateRequired();
  if (isValid())
  {
  convertInput();
   
  if (isValid()  isRequired() 
  getConvertedInput() == null 
isInputNullable())
  {
  reportRequiredError();
  }
/*isn't something like this missing here?*/
 if
(!isValid()) { /*report Conversion error*/ }
  if (isValid())
  {
  validateValidators();
  }
  }
  }
   
  
   Any thoughts?
  
   Thank you!
   Alex.
   --
   View this message in context:
  http://www.nabble.com/Wicket-validation-flaw--tf4390183.html#a12517215
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: Form.updateFormComponentModels bug?

2007-09-10 Thread Matthijs Wensveen

Johan Compagner wrote:

The extra memory for the ClickListener is negligible and does give you
more flexibility because now you can have more than one interested party
for the link click. My use case (fetch nested component, add listener)
was already answered sufficiently by Martijn (bad OO, components should
publish own events that make sense in the problem domain), but I still
an eventlistener-based design could have merit (see the move towards
Delegation Event Model in AWT:
http://java.sun.com/j2se/1.3/docs/guide/awt/designspec/events.html).
While wicket is not swing or awt, it's an interesting read.





with the link abstract class you don't have any extra memory overhead
but with the listener interface you have quite a lot because you need
and extra reference in link itself, that holds an extra List (that again has
its own stuff)
  
The trick in awt is to only hold one reference to a listener that 
recursively fires the event on registered listeners (see 
AWTEventMultiCaster)

and then you have an extra instance of the listener itself which by itself
has its internal representation
Don't underestimate this. especially because we also can use them in
tableviews with a lot of cells.

But as i said, if you want a listener interface then you can build it quite
easily
  
True, but of course my goal is not to create a fork, but to discuss 
different views on the used event model.
I'm not an expert on memory or profiling, so I'll believe you. I do 
think that such a choice should not only be made on the basis of memory 
usage. But since the choice is already made, I'll go with it until I can 
find a more convincing argument (although the link I supplied has some 
quite convincing ones).


Matthijs

--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 423
F +31 20 4223500 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Locating CSS under WEB-INF, please help

2007-09-10 Thread Jason Mihalick

Thanks Rüdiger.  I'm trying the wicket:remove method now.  Very clever. 

Do you know of any links to documentation or examples on how to use the
live method for css, js, and image resources?

--
Jason


Rüdiger_Schulz wrote:
 
 Another tipp on this topic:
 
 You could provide the CSS twice. Once within a wicket:remove for offline
 preview and editing, and again outside that pointing to an url which works
 only on your live environment. Or you can add the live CSS with a header
 contributor in your base page.
 
 I use the latter one, but I have my CSS located along with my java
 files...
 
 2007/9/10, Jason Mihalick [EMAIL PROTECTED]:


 Thanks for the reply.

 Where are your css resources located under this configuration?  I have a
 similar setup.  I have a BasePage.html that refers to the css:

 head
 meta http-equiv=Content-Type content=text/html;
 charset=UTF-8
 /

 !--  Stylesheets --
 link href=css/styles.cssrel=stylesheet
 type=text/css
 /
 ...
 /head

 But since my BasePage.html is located with my Java classes (at
 src/main/java/com///ui/web/page/BasePage.html) and my css
 resources
 are located at src/main/webapp/css , if I try to load the
 BasePage.htmlfile
 in an HTML editor, it will be unable to resolve the css resources.

 --
 Jason


 Johan Maasing-2 wrote:
 
  Perhaps template inheritance can help you here. I have a 'base' page
  that contains the HTML head tag that all my pages use. For example I
  have a Basepage.html:
 
  html xmlns=http://www.w3.org/1999/xhtml;
  xmlns:wicket=http://wicket.apache.org/;
  head
link rel=stylesheet type=text/css
 href=css/main.css/
link rel=stylesheet type=text/css
 href=css/header.css/
  /head
  body
wicket:child /
  ...
 
  and a Basepage.java (which does some stuff common to all pages, like
  setting a feedbackpanel or whatever you like to have for all pages)
 
  Then in my real pages I do like this
 
  RealPage.java
  public class Index extends BasePage {
public Index() {
  ...
 
  but the real funny stuff goes on in the template for the real page:
  html xmlns=http://www.w3.org/1999/xhtml;
  xmlns:wicket=http://wicket.apache.org/;
  head
  link rel=stylesheet type=text/css
  href=../../../../../../WebContent/css/main.css/
  link rel=stylesheet type=text/css
  href=../../../../../../WebContent/css/header.css/
  /head
  body
  wicket:extend
 
  Real content here
 
  /wicket:extend
  /body
  ...
 
  In this way the template can be edited as a static HTML and include
  the right CSS relative to the sources in the filesystem. In runtime
  wicket will discard anythiong outside the wicket:extend in the
  template and use the HTML from the 'base' page.
 
  Hope this can help you somewhat.
 
  Cheers,
  Johan M
 
  On 9/10/07, Jason Mihalick [EMAIL PROTECTED] wrote:
 
  sigh  Ok, thanks for the help on this.  My objective was to be able
 to
  have
  a structure of HTML and resource dependencies (css, js, img, etc) that
  could
  be easily edited in an HTML editor such that the editor doesn't have
  problems resolving the resources and such that Wicket doesn't have
  problems
  resolving the resources.  From reading your comments and those of
 others,
  however, this doesn't seem to be an easy task at all.  So, I've gone
 back
  to
  the standard Wicket approach where I have placed all HTML files along
  side
  my Java classes and have located my resources (css, js, img, etc) at
 the
  root of my web context (in the maven world, this is under the webapp
 dir,
  as
  a sibling to WEB-INF).  This keeps Wicket very happy at runtime, but
  makes
  it difficult for me to edit my site using a HTML editor.  Maybe this
  won't
  be that big of a deal in practice.  I guess I will find out in time.
 
  Thanks again guys!
 
 
  igor.vaynberg wrote:
  
   oi. the basic problem is that WEB-INF is inaccessible via direct
 urls.
   this
   is because it houses stuff like classes and you dont want the user
 to
  have
   access to those.
  
   so there is a way to make it work, but it will involve wicket or
  another
   servlet streaming those static resources, which is a lot of
 overhead.
  
   my suggestion is to move all the css/js/foo out of WEB-INF
  
   -igor
  
  
   On 9/8/07, Jason Mihalick [EMAIL PROTECTED] wrote:
  
  
   I've been searching the forums and wiki on this half the night and
 I
  just
   can't figure out what I'm doing wrong here, so please bear with me
 if
   there
   is an obvious answer to this.
  
   Wicket is not finding my css or js resources when the application
 is
   deployed.
  
   I followed the wiki instructions for Wicket 1.3 on how to Control
  where
   HTML files are loaded from
   (
  
 
 http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3
   ).
   I have the following structure under WEB-INF:
  
   WEB-INF/
   +--- content/
  +--- css/
  

Re: palette problem

2007-09-10 Thread Al Maw

wheleph wrote:

Hello everyone!

I've got a problem using component Palette from Wicket-Extensions-1.2.6. The
code I use to add Palette on a Form is cited below:
---
final Form pupilForm = new PupilForm(pupilForm);

ListString available = new ArrayListString();
available.add(third);
available.add(fourth);

ListString selected = new ArrayListString();
selected.add(first);
selected.add(second);

final Palette pupilPalette = new Palette(pupilPalette, new
Model((Serializable) selected), new Model((Serializable)available), new
ChoiceRenderer(), 10, false);
pupilForm.add(pupilPalette);

add(pupilForm);
---
Instead of 
 availableselected

| third |-| first |
| fourth   |-| second |
I get
||-| third|
||-|   |

I guess this is one of those stupid mistakes you'll never find in your own
code. What's wrong with it?

wheleph



See http://issues.apache.org/jira/browse/WICKET-459.

Regards,

Al
--
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxSubmitLink does nothing in IE

2007-09-10 Thread Anthony J Webster
The quickstart (http://www.transcendenz.co.uk/quickstart.zip) that I built 
works fine in IE so that's not it.

However I noticed the following in the Ajax Debug window :

There seem to be 2 references to component id=feedback8

.
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (8138 characters)
INFO:
ajax-response
   component id=feedback8![CDATA[
   span id=feedback8
   ul
   li class=feedbackPanelERROR
   span class=feedbackPanelERRORLe formulaire comporte 
des erreurs/span

   /li
   /ul
   /span
   ]]/component

and then again after a header-contribution chunk in the form chunk which 
encloses most of the code (it's a medium sized form so lots of 
label/field/feedback chunks). Feedback8 happens to be the general 
feedbaclPanel which shows errors occuring during submission.


component id=formu![CDATA[
   form id=formu 
action=?wicket:interface=:1:patientpanel:patientform::IFormSubmitListener:: 
method=post

   div style=display:none
   input type=hidden name=formu_hf_0 id=formu_hf_0/
   /div
   fieldset
   p class=error
   span id=feedback8
   ul
   li class=feedbackPanelERROR
   span class=feedbackPanelERRORLe 
formulaire comporte des erreurs/span

   /li
   /ul
   /span
   /p
.

Could this be the cause?

Thanks

Anthony

- Original Message - 
From: Matej Knopp [EMAIL PROTECTED]

To: users@wicket.apache.org
Sent: Friday, September 07, 2007 4:16 PM
Subject: Re: AjaxSubmitLink does nothing in IE



Could be related to markup, or parsing the response. Jira issue and
quickstart would help here.

-Matej

On 9/7/07, Anthony J Webster [EMAIL PROTECTED] wrote:

That works fine. Thanks
However I've just noticed that this AjaxSubmitLink doesn't do anything in 
IE

whereas in Firefox it works.
I check the Ajax debug window and the server *is* contacted and 
everything

however after recieving the response I get an ERROR: Error while parsing
response: Unknown runtime error in IE.

Any Ideas?

Many Thanks

Anthony

- Original Message -
From: Matej Knopp [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Thursday, September 06, 2007 11:35 PM
Subject: Re: Creating a disableable AjaxSubmitLink


 Something like the following should work:

 decorateScript:
 this.onclick_=this.onclick; this.onclick=function() { return false;
 }; + script;

 onSuccess,onFailureScript:
 this.onclick=this.onclick_; + script;

 -Matej

 On 9/6/07, Anthony J Webster [EMAIL PROTECTED] wrote:
 Hi,

 I'm trying to create a disableable AjaxSubmitLink. When a user clicks 
 on

 the link further clicks must not result in anything until the
 'submission' is complete. This call be achieved by adding return 
 false;
 in a call decorator. However I'm stuggling with the re-enabling. I 
 need

 to strip the return false and put the original destination back.

 form.add(new AjaxSubmitLink(randomise, form) {

 protected void onSubmit(AjaxRequestTarget target, Form 
 form)

 {
somethingLong();
 }
 protected IAjaxCallDecorator getAjaxCallDecorator() {
 return new AjaxCallDecorator() {

 public CharSequence decorateScript(CharSequence
 script) {
 return return false; + script;
 }
 public CharSequence
 decorateOnSuccessScript(CharSequence script) {
 // NEED TO RESET TO PREVIOUS STATE
 }
 public CharSequence
 decorateOnFailureScript(CharSequence script) {
 // NEED TO RESET TO PREVIOUS STATE
 }
 };
 }
 });

 Any help would be most appreciated.

 Thanks in advance

 Anthony

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Wicket] Vs [HTTP 404 - File not found]

2007-09-10 Thread Andrew Klochkov

Hi,

I don't know the best way but we just created error404.html which 
forwards to the home page. Notice that several lines of dots - they make 
the response bigger than 512Kb, so IE doesn't show it's friendly 404 
page. Please share your expirience if you have a better way to handle it :-)


html
head
   meta http-equiv=Refresh content=0; url=/main
/head
body
p style=display:none
   

   

   

   

   

   


/p
/body
/html


chickabee wrote:
Hi Guys, 


What is the preferred strategy for  customization of error page under HTTP
404 - File not found  situations, any helpful pointer will be appreciated.

At present i have used error directive in web.xml and I wonder how should i
go about it, if i want to handle this from within wicket.

Thanks


  



--
Andrew Klochkov


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Flash object still visible underneath a ModalWindow

2007-09-10 Thread bebetu

The issue is present in both IE and Firefox (flash visible at all times), the
difference is that on IE the flash object is clickable the whole time
whereas in Firefox becomes clickable only when I move the popup away from
the flash content.
I'll try the invisibility solution if nothing else is available...

Thanks,
florin



Al Maw wrote:
 
 bebetu wrote:
 Hi,
 I am experiencing a strange issue with a ModalWindow behavior (I'm using
 wicket 1.3 beta3). The main page content contains a flash object (I'm
 using
 a SWFObject to render it) and when a ModalWindow pops-up over this
 content,
 the flash object is still visible below. in Firefox the flash content
 becomes clickable once I drag the ModalWindow clear from the flash object
 rendered below. In IE the flash object is visible and clickable the whole
 time after the ModalWindow is displayed.
 
 Has anyone experienced this issue? Any advice is appreciated.
 
 Yeah. :-(
 
 It's a bug in Internet Explorer. You could probably work around it by 
 hiding the whole of the Flash object while the window is popped up. We 
 already have JS code that does this for drop-down select boxes (which 
 exhibit the same problem in IE). You might be able to crib the code from 
 that. Patches are welcome. ;)
 
 Regards,
 
 Al
 
 -- 
 Alastair Maw
 Wicket-biased blog at http://herebebeasties.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Flash-object-still-visible-underneath-a-ModalWindow-tf4409822.html#a12595683
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Wicket] Vs [HTTP 404 - File not found]

2007-09-10 Thread Martijn Dashorst
On 9/10/07, Andrew Klochkov [EMAIL PROTECTED] wrote:
 the response bigger than 512Kb, so IE doesn't show it's friendly 404

I hope I don't have to download half a meg to find out my original
request couldn't be found ;)

But yes, you need to do some special processing to make the page
bigger than N bytes (512?) before IE thinks it can do better than you.

Martijn


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to handle these nested table tags

2007-09-10 Thread Igor Vaynberg
this is already fixed in trunk

-igor


On 9/10/07, Kent Tong [EMAIL PROTECTED] wrote:



 Kevin Liu-4 wrote:
 
Unable to find component with id 'userName' in [MarkupContainer
  [Component id = _relative_path_prefix_14, page =
  com.cmip.web.pages.TopFrame, path =
 
 3:topForm:_relative_path_prefix_13:_relative_path_prefix_14.WebMarkupContainer,
  isVisible = true, isVersioned = true]]. This means that you declared
  wicket:id=userName in your markup, but that you either did not add the
  component to your page at all, or that the hierarchy does not match.
 

 Please file a bug report at http://issues.apache.org/jira/browse/WICKET.
 The
 bug is,
 RelativePathPrefixHandler creates auto-components but are not marking them
 as
 transparent resolver:

 public boolean resolve(MarkupContainer container, MarkupStream
 markupStream, ComponentTag tag)
 {
 if (WICKET_RELATIVE_PATH_PREFIX_CONTAINER_ID.equals(
 tag.getId()))
 {
 final Component wc;
 String id =
 WICKET_RELATIVE_PATH_PREFIX_CONTAINER_ID +
 container.getPage
 ().getAutoIndex();
 if (tag.isOpenClose())
 {
 wc = new WebComponent(id);
 }
 else
 {
 //problem:
 wc = new WebMarkupContainer(id);
 //I think it should be:
 //wc = new
 TransparentWebMarkupContainer(id);
 }
 container.autoAdd(wc, markupStream);
 return true;
 }
 return false;
 }


 --
 View this message in context:
 http://www.nabble.com/How-to-handle-these-nested-%3Ctable%3E-tags-tf4412208.html#a12595047
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: [Wicket] Vs [HTTP 404 - File not found]

2007-09-10 Thread Igor Vaynberg
http://herebebeasties.com/2006-12-20/using-a-servlet-filter-for-404-error-page/

-igor


On 9/9/07, chickabee [EMAIL PROTECTED] wrote:


 Hi Guys,

 What is the preferred strategy for  customization of error page under HTTP
 404 - File not found  situations, any helpful pointer will be appreciated.

 At present i have used error directive in web.xml and I wonder how should
 i
 go about it, if i want to handle this from within wicket.

 Thanks


 --
 View this message in context:
 http://www.nabble.com/-Wicket--Vs---HTTP-404---File-not-found--tf4409883.html#a12580317
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Kronos-cms installation

2007-09-10 Thread Tauren Mills
Thanks for the reply!   When I have some extra time, I'll mess around
with it more.

Tauren


On 9/10/07, Ted Roeloffzen [EMAIL PROTECTED] wrote:
 I was one of two people who built kronos, but i have to say that i haven't
 worked on it for quite a while, because of time issues, so the dependency is
 most likely out of date.

 Ted


 2007/9/8, Maurice Marrink [EMAIL PROTECTED]:
 
  Ted, who build kronos, is on vacation and I'm not sure if he is
  monitoring the mailing list during this time. I do believe the 1.2
  branch to be the latest version. As for your other questions i have no
  idea :) A couple of months ago there also some questions on this
  mailing list (well the old sourceforge one actually) have you tried
  those?
 
  Maurice
 
  On 9/8/07, Tauren Mills [EMAIL PROTECTED] wrote:
   I just checked out kronos-cms to take a look at it.  I could only find
   it under the wicket-1.2 branch in wicketstuff.  Is that correct, or is
   there a 1.3 release?
  
   During mvn install, I got a build error that it was missing
   javax.jcr:jcr:jar:1.0.1.  It suggested the following:
  
 Try downloading the file manually from:
  
  http://www.day.com/site/en/index/related/downloads/RI_download.html
  
 Then, install it using the command:
 mvn install:install-file -DgroupId=javax.jcr -DartifactId=jcr \
 -Dversion=1.0.1 -Dpackaging=jar -Dfile=/path/to/file
  
   When I went to that download page, and filled out the form to get the
   download, I downloaded a file called jcr-ri-1.0.zip.  There isn't a
   jar file included in it.  Upon looking at the sources, it includes
   some org.apache.jackrabbit packages.
  
   Is that really the file I should be using, or is the kronos dependency
   out of date?  On the apache jackrabbit site, there are downloads
   available as well.  Would those work instead of the day.com download?
  
   I don't want to waste  a bunch of time trying to get this working.  If
   anyone else has messed with kronos-cms and has some tips, I'm all
   ears.
  
   If someone could share their jcr-1.0.1.jar, that would work too!
  
   Thanks!
   Tauren
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



stay logged in/session expiration time

2007-09-10 Thread Zsolt Süli

Hi!

I'd like to write a signIn page, that let me STAY LOGGED IN (/always
signed in/etc.). This way the session won't be closed when I close the
browser. The only way to invalidate the session is to log out (or many
days have to pass). I think I should use session cookies, and I should
set the expiration time somehow. And that's the question ... how?

Thx in advance,
ZsZso


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: stay logged in/session expiration time

2007-09-10 Thread Igor Vaynberg
in web.xml

-igor


On 9/10/07, Zsolt Süli [EMAIL PROTECTED] wrote:

 Hi!

 I'd like to write a signIn page, that let me STAY LOGGED IN (/always
 signed in/etc.). This way the session won't be closed when I close the
 browser. The only way to invalidate the session is to log out (or many
 days have to pass). I think I should use session cookies, and I should
 set the expiration time somehow. And that's the question ... how?

 Thx in advance,
 ZsZso


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: FileUpload with AjaxSubmit not working

2007-09-10 Thread Carlos Pita
Maybe you want to try this.

Regards,
Carlos

On 8/30/07, Carlos Pita [EMAIL PROTECTED] wrote:
 Hi all,

 here is a hopefully functional example showing how to use an iframe to
 upload a file and afterwards call a behavior on a component belonging to the
 top frame, so that an ajax action could be carried on in consequence (maybe
 to get rid of the iframe, or to show an informative message, or whatever).
 This is along the same venue as other examples that are around the web, like
 http://www.air4web.com/files/upload/. I don't have the time
 to write a proper wiki page just right now, so I simply attach the example
 here. Hope it helps.

 Regards,
 Carlos



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileUpload with AjaxSubmit not working

2007-09-10 Thread Carlos Pita
With the attachment, of course :).

On 9/10/07, Carlos Pita [EMAIL PROTECTED] wrote:
 Maybe you want to try this.

 Regards,
 Carlos

 On 8/30/07, Carlos Pita [EMAIL PROTECTED] wrote:
  Hi all,
 
  here is a hopefully functional example showing how to use an iframe to
  upload a file and afterwards call a behavior on a component belonging to the
  top frame, so that an ajax action could be carried on in consequence (maybe
  to get rid of the iframe, or to show an informative message, or whatever).
  This is along the same venue as other examples that are around the web, like
  http://www.air4web.com/files/upload/. I don't have the time
  to write a proper wiki page just right now, so I simply attach the example
  here. Hope it helps.
 
  Regards,
  Carlos
 
 



upload.tgz
Description: GNU Zip compressed data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: BookmarkablePage URL

2007-09-10 Thread V. Jenks

Where is this mounting done?  What about parameter values?

What I've got is really quite simple.  I have a static HTML page on an old
web site that needs to link to a wicket page.  The wicket page pulls up a
list of products based on the category provided in the querystring parameter
in the URL.

?catid=1
?catid=2
etc

It seems like a simple problem but I can't find a good example...


Matej Knopp-2 wrote:
 
 it's simple :)
 
 application.mountBookmarkablePage(/home/page, HomePage.class);
 
 and the url can look like
 http://server.com/context/home/page/cat/4
 
 -Matej
 
 On 8/31/07, V. Jenks [EMAIL PROTECTED] wrote:


 I guess I'm completely confused.  I'm pretty sure I've done it this way
 before and it worked fine...but it's been a while.  I've never mounted a
 URL
 before, I'm not familiar w/ it.

 I've been going through the Reference Library on the wiki and I can't
 find
 an example of how to do this and what the URL actually looks like...can
 you
 maybe point me to some instructions?

 Thanks!


 Eelco Hillenius wrote:
 
  On 8/31/07, V. Jenks [EMAIL PROTECTED] wrote:
 
  I'm sure this has been asked 1000x but I'm unable to find the
  answer...and
  don't have enough time left to keep digging.
 
  I simply want to call a bookmarkable page and pass it a parameter
  value...
 
  I got this far but my guesses have so far been wrong:
 
  ?wicket:bookmarkablePage=:com.myapp.BookmarkedPagecatid=1
 
  I get this error:
 
  ERROR [RequestCycle] Can't instantiate page using constructor public
  com.myapp.BookmarkedPage(wicket.PageParameters) and argument catid =
 1
 
  That looks like there is a problem constructing your page, not so much
  the format. Could you look further in your stack trace? Does
  BookmarkedPage has a public default constructor or one with just a
  page parameters argument?
 
  Btw, if you mount your pages (per package or individually), it is a
  bit easier to test.
 
  Eelco
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/BookmarkablePage-URL-tf4362196.html#a12434374
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/BookmarkablePage-URL-tf4362196.html#a12598227
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: BookmarkablePage URL

2007-09-10 Thread Korbinian Bachl



V. Jenks schrieb:
Where is this mounting done?  


its done in the init() of your WebApplication class e.g:

/**
 * @see org.apache.wicket.examples.WicketExampleApplication#init()
 */
protected void init() {
mount(new HybridUrlCodingStrategy(/index, Index.class));
   }




What about parameter values?


if you have a page, then make sure your constructor has a PageParameters 
params there, and you can access then your param catid by doing 
params.getString(catid) (or getInt(catid) bit then you will get an 
error if not int).


some more info is here: http://www.javalobby.org/java/forums/t68753.html

Regards,

Korbinian



What I've got is really quite simple.  I have a static HTML page on an old
web site that needs to link to a wicket page.  The wicket page pulls up a
list of products based on the category provided in the querystring parameter
in the URL.

?catid=1
?catid=2
etc

It seems like a simple problem but I can't find a good example...


Matej Knopp-2 wrote:

it's simple :)

application.mountBookmarkablePage(/home/page, HomePage.class);

and the url can look like
http://server.com/context/home/page/cat/4

-Matej

On 8/31/07, V. Jenks [EMAIL PROTECTED] wrote:


I guess I'm completely confused.  I'm pretty sure I've done it this way
before and it worked fine...but it's been a while.  I've never mounted a
URL
before, I'm not familiar w/ it.

I've been going through the Reference Library on the wiki and I can't
find
an example of how to do this and what the URL actually looks like...can
you
maybe point me to some instructions?

Thanks!


Eelco Hillenius wrote:

On 8/31/07, V. Jenks [EMAIL PROTECTED] wrote:

I'm sure this has been asked 1000x but I'm unable to find the
answer...and
don't have enough time left to keep digging.

I simply want to call a bookmarkable page and pass it a parameter
value...

I got this far but my guesses have so far been wrong:

?wicket:bookmarkablePage=:com.myapp.BookmarkedPagecatid=1

I get this error:

ERROR [RequestCycle] Can't instantiate page using constructor public
com.myapp.BookmarkedPage(wicket.PageParameters) and argument catid =

1

That looks like there is a problem constructing your page, not so much
the format. Could you look further in your stack trace? Does
BookmarkedPage has a public default constructor or one with just a
page parameters argument?

Btw, if you mount your pages (per package or individually), it is a
bit easier to test.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
View this message in context:
http://www.nabble.com/BookmarkablePage-URL-tf4362196.html#a12434374
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: BookmarkablePage URL

2007-09-10 Thread Eelco Hillenius
 Where is this mounting done?  What about parameter values?

You would typically do this in your application class, and parameters
are converted to part of the path or something else depending on how
you configure things. See for a simple example niceurl of
wicket-examples.

 What I've got is really quite simple.  I have a static HTML page on an old
 web site that needs to link to a wicket page.  The wicket page pulls up a
 list of products based on the category provided in the querystring parameter
 in the URL.

 ?catid=1
 ?catid=2
 etc

/mysite/mymount/catid/1

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: modal window question - opening a modal window on page load

2007-09-10 Thread Ed _

Thanks Ryan,

First pass this has worked well for me. Appreciate your detailed instructions. 
Maybe these can be added to the open issue history itself for other folks till 
the issue gets closed.

I assume you have to be developer to make changes to the change history.

-ed

 From: [EMAIL PROTECTED]
 Subject: Re: modal window question - opening a modal window on page load
 Date: Sun, 9 Sep 2007 22:24:03 -0700
 To: users@wicket.apache.org
 
 There is an open issue about this: http://issues.apache.org/jira/ 
 browse/WICKET-12
 Read the discussion for some background and possible solutions.
 
 I needed to do the same thing on a couple of pages. First, I tried  
 using getWindowOpenJavascript() on the modal window (called via  
 reflection as it's a private method) to get the needed JS, but I  
 think I ran into a few issues which I've now forgotten (private  
 'shown' variable wasn't set?).
 
 What I ended up doing was to use JavaScript to call the onclick()  
 method of a link that opens the modal window from my page's onload  
 function. Since the modal window is a JavaScript construct anyway I  
 don't think using JS for the auto-open behavior is weird.
 
 
 The following model ensures that a component is clicked only one  
 time, when the page is initially loaded (probably a common use case).  
 If you want to open the modal window on every page load, just check  
 out the JavaScript and the basic concept. This is written for Wicket  
 1.2 but a similar approach should work for 1.3.
 
 public class ClickOnceOnLoadModel extends AbstractReadOnlyModel {
private final Component component;
private boolean clicked = false;
 
 public ClickOnceOnLoadModel(Component component) {
  this.component = component;
}
 
@Override
public Object getObject(Component cmp) {
  if ( !this.clicked ) {
this.clicked = true;
return getClickJs();
  }
  return null;
}
 
private String getClickJs() {
  StringBuilder sb = new StringBuilder( 64 );
  sb.append( var e=document.getElementById(' );
  sb.append( this.component.getMarkupId() );
  sb.append( ');e.onclick(); );
  return sb.toString();
}
 }
 
 
 You would use it like this:
 
 // Page constructor
 public MyPage() {
   getBodyContainer().addOnLoadModifier(
new ClickOnceOnLoadModel( modalWindowOpeningLink ), null );
 }
 
 
 This of course requires a link on your page that opens the same modal  
 window you want to open automatically. If you really don't want such  
 a link, you could always hide it with CSS.
 
 If there are more elegant solutions (and I'm sure there are), you'll  
 probably hear about them soon...
 
 -Ryan
 
 On Sep 9, 2007, at 8:04 PM, Ed _ wrote:
 
 
  I want to bring up a modal window when I load a page, ie without  
  clicking a link. I want to use it to prompt the user to enter some  
  data on the home page before he can proceed. So somehow I have to  
  enable the show function, how do I do that.
 
  I tried to do something as follows -
 
  FormPanel form =  new FormPanel(modal.getContentId(),  
  StoreBasePath, strId, title);
  form.setOutputMarkupId(true);
  modal.setContent(form);
  modal.setTitle(This is modal window with panel  
  content.);
  modal.setCookieName(modalform);
  AjaxRequestTarget target = new AjaxRequestTarget();
  modal.show(target);
 
  java.lang.IllegalStateException: No Page found for component  
  [MarkupContainer [Component id = ModalWindow, page = No Page,  
  path = FormPanel:ModalWindow.ModalWindow]]
   at wicket.Component.getPage(Component.java:1037)
   at wicket.RequestCycle.urlFor(RequestCycle.java:655)
   at wicket.Component.urlFor(Component.java:2307)
   at wicket.behavior.AbstractAjaxBehavior.getCallbackUrl 
  (AbstractAjaxBehavior.java:143)
   at wicket.ajax.AbstractDefaultAjaxBehavior.getCallbackScript 
  (AbstractDefaultAjaxBehavior.java:131)
 
 
  is there a way to do this.
 
  thanks
 
  _
  Gear up for Halo® 3 with free downloads and an exclusive offer.  
  It’s our way of saying thanks for using Windows Live™.
  http://gethalo3gear.com?ocid=SeptemberWLHalo3_WLHMTxt_2
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Gear up for Halo® 3 with free downloads and an exclusive offer. It’s our way of 
saying thanks for using Windows Live™.
http://gethalo3gear.com?ocid=SeptemberWLHalo3_WLHMTxt_2

Re: stay logged in/session expiration time

2007-09-10 Thread Igor Vaynberg
webapps arent really designed to do this, you will have to write the
appropriate hooks for your servlet container. eg your own sessionmanager for
tomcat, etc.

-igor


On 9/10/07, Zsolt Süli [EMAIL PROTECTED] wrote:

 Yeah, but I want to change dynamically. Say Joe wants to stay logged in,
 so he set the STAY LOGGED IN checkbox on, but Lilly doesn't like these
 things, so she just let it go, and the checkbox stays off. So web.xml is
 a good solution, and thanks for that. My mistake, I wasn't too precise
 at my last letter. Maybe the more accurate question sounds like this:
 how can I change the sessions expiration time during runtime?

 ZsZso

 Igor Vaynberg wrote:
  in web.xml
 
  -igor
 
 
  On 9/10/07, Zsolt Süli [EMAIL PROTECTED] wrote:
 
  Hi!
 
  I'd like to write a signIn page, that let me STAY LOGGED IN (/always
  signed in/etc.). This way the session won't be closed when I close the
  browser. The only way to invalidate the session is to log out (or many
  days have to pass). I think I should use session cookies, and I should
  set the expiration time somehow. And that's the question ... how?
 
  Thx in advance,
  ZsZso
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: modal window question - opening a modal window on page load

2007-09-10 Thread Gerolf Seitz

 I assume you have to be developer to make changes to the change history.


you mean to the jira issue? you don't have to be a developer to add a
comment.
just sign up and you're ready to go.

  gerolf


-ed

  From: [EMAIL PROTECTED]
  Subject: Re: modal window question - opening a modal window on page load
  Date: Sun, 9 Sep 2007 22:24:03 -0700
  To: users@wicket.apache.org
 
  There is an open issue about this: http://issues.apache.org/jira/
  browse/WICKET-12
  Read the discussion for some background and possible solutions.
 
  I needed to do the same thing on a couple of pages. First, I tried
  using getWindowOpenJavascript() on the modal window (called via
  reflection as it's a private method) to get the needed JS, but I
  think I ran into a few issues which I've now forgotten (private
  'shown' variable wasn't set?).
 
  What I ended up doing was to use JavaScript to call the onclick()
  method of a link that opens the modal window from my page's onload
  function. Since the modal window is a JavaScript construct anyway I
  don't think using JS for the auto-open behavior is weird.
 
 
  The following model ensures that a component is clicked only one
  time, when the page is initially loaded (probably a common use case).
  If you want to open the modal window on every page load, just check
  out the JavaScript and the basic concept. This is written for Wicket
  1.2 but a similar approach should work for 1.3.
 
  public class ClickOnceOnLoadModel extends AbstractReadOnlyModel {
 private final Component component;
 private boolean clicked = false;
 
  public ClickOnceOnLoadModel(Component component) {
   this.component = component;
 }
 
 @Override
 public Object getObject(Component cmp) {
   if ( !this.clicked ) {
 this.clicked = true;
 return getClickJs();
   }
   return null;
 }
 
 private String getClickJs() {
   StringBuilder sb = new StringBuilder( 64 );
   sb.append( var e=document.getElementById(' );
   sb.append( this.component.getMarkupId() );
   sb.append( ');e.onclick(); );
   return sb.toString();
 }
  }
 
 
  You would use it like this:
 
  // Page constructor
  public MyPage() {
getBodyContainer().addOnLoadModifier(
 new ClickOnceOnLoadModel( modalWindowOpeningLink ), null );
  }
 
 
  This of course requires a link on your page that opens the same modal
  window you want to open automatically. If you really don't want such
  a link, you could always hide it with CSS.
 
  If there are more elegant solutions (and I'm sure there are), you'll
  probably hear about them soon...
 
  -Ryan
 
  On Sep 9, 2007, at 8:04 PM, Ed _ wrote:
 
  
   I want to bring up a modal window when I load a page, ie without
   clicking a link. I want to use it to prompt the user to enter some
   data on the home page before he can proceed. So somehow I have to
   enable the show function, how do I do that.
  
   I tried to do something as follows -
  
   FormPanel form =  new FormPanel(modal.getContentId(),
   StoreBasePath, strId, title);
   form.setOutputMarkupId(true);
   modal.setContent(form);
   modal.setTitle(This is modal window with panel
   content.);
   modal.setCookieName(modalform);
   AjaxRequestTarget target = new AjaxRequestTarget();
   modal.show(target);
  
   java.lang.IllegalStateException: No Page found for component
   [MarkupContainer [Component id = ModalWindow, page = No Page,
   path = FormPanel:ModalWindow.ModalWindow]]
at wicket.Component.getPage(Component.java:1037)
at wicket.RequestCycle.urlFor(RequestCycle.java:655)
at wicket.Component.urlFor(Component.java:2307)
at wicket.behavior.AbstractAjaxBehavior.getCallbackUrl
   (AbstractAjaxBehavior.java:143)
at wicket.ajax.AbstractDefaultAjaxBehavior.getCallbackScript
   (AbstractDefaultAjaxBehavior.java:131)
  
  
   is there a way to do this.
  
   thanks
  
   _
   Gear up for Halo(r) 3 with free downloads and an exclusive offer.
   It's our way of saying thanks for using Windows Live™.
   http://gethalo3gear.com?ocid=SeptemberWLHalo3_WLHMTxt_2
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 _
 Gear up for Halo(r) 3 with free downloads and an exclusive offer. It's our
 way of saying thanks for using Windows Live™.
 http://gethalo3gear.com?ocid=SeptemberWLHalo3_WLHMTxt_2


Re: Any interest in a Wicket User Group meeting in The Netherlands?

2007-09-10 Thread Danny van Bruggen
I'm interested. I've only just started, so every topic is helpful to
me :) Amersfoort is fine for me.

Danny

On 9/7/07, Johan Compagner [EMAIL PROTECTED] wrote:
 hi,

 I can organize one if there is enough interest
 Martijn and i will be there then.

 And for example if people are also interested in the wicket security i will
 also drag Maurice to the table.

 johan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: stay logged in/session expiration time

2007-09-10 Thread John Ray

I think what you are looking for are the following steps

1) When a user first comes to the site check if they have a cookie from a
prior visit and automatically log them in.
2) If they don't have a cookie then redirect them to the login page
3) As they log in set a cookie on their browser so the next time they visit
they will be automatically logged in during step 1 above. The cookie will
need to contain the the user name and password to authenticate them. It
would probably be best for added security to do a one way hash (such as SHA)
on the password though and not store the actually password in the cookie. 

To do steps 1 and 2 you need your own AuthorizationStrategy for your
application. Look at the wicket example to do this

http://wicketstuff.org/wicket13/signin/

Don't forget there is a link to view the source code in the top right of the
page. You need to modify the AuthorizationStrategy to something like this

public class MyAuthorizationStrategy implements IAuthorizationStrategy {

  public boolean isInstantiationAuthorized(Class componentClass) {
if (AuthenticatedWebPage.class.isAssignableFrom(componentClass)) {
  // Is user signed in?
  if (((SignInSession)Session.get()).isSignedIn()) {
// okay to proceed
return true;
}

// Look at cookies to determine if the user should be logged in
automatically
Cookie[] cookies = ((WebRequest)
RequestCycle.get().getRequest()).getCookies();
... iterate through each cookie for our magic login cookie
... If a cookie is found then log the user in

// Redirect user to login page if there was no cookie
throw new RestartResponseAtInterceptPageException(SignIn.class);
  }

  ...
}

For step 3 you'll need to modify the onSubmit() method in the login page so
that it sets a cookie on the browser when the user is logged in. 

  Cookie loginCookie = new Cookie(...);
  ... Also set the cookie MaxAge so that the browser will remeber it even if
the browser is closed
  getWebRequestCycle().getWebResponse().addCookie(loginCookie);

The Cookies are just standard J2EE cookies from the servlet API so look at
the J2EE docs for more info on them.
-- 
View this message in context: 
http://www.nabble.com/stay-logged-in-session-expiration-time-tf4416611.html#a12600257
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Google Crawl

2007-09-10 Thread Xavier Hanin
For what it's worth I've had some kind of similar needs for an open source
app I work on, and solved the problem of tabs without actually removing
them, but using bookmarkable links to select the tab.

You can check how I did this here:
http://xoocode.org/wsvn/xoocode/org.xoocode.xooctory/trunk/xooctory/src/main/java/org/xoocode/xooctory/web/pages/job/JobPage.java?op=filerev=0sc=0

Not the best code I ever wrote, but you might find it helpful. The important
part is:

*for* (ListIteratorITab iter = tabs.listIterator();
iter.hasNext();) {
ITab tab = (ITab) iter.next();
*if*
(paramSelected.equals(tab.getTitle().getObject())) {
selected = iter.previousIndex();
}
}
TabbedPanel tabbedPanel = *new* TabbedPanel(*tabs*, tabs) {
*protected* WebMarkupContainer newLink(String
linkId, *final* *int* index)
{
PageParameters parameters = *new*
PageParameters();
parameters.put(*0*, JobPage.*this*.jobKey);
parameters.put(*1*,
((ITab)getTabs().get(index)).getTitle().getObject());
*return* *new*
BookmarkablePageLink(linkId, JobPage.*class*, parameters);
}
};
tabbedPanel.setSelectedTab(selected);


HTH,

Xavier



On 9/9/07, Sam Lewis [EMAIL PROTECTED] wrote:

 Thanks for your responses.

 I should of thought about this issue before I developed the site with
 wicket
 ;-) i just wanted to try something new.

 I will investigate the other url schemes but i think everything should be
 bookmarkable. It should be easy to refactor my tabs into pages and I
 suppose
 I can refactor the the PageableListView to a ListView and use a page
 number
 parameter like the good old days.

 On 09/09/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 
  On 9/9/07, Sam Hough [EMAIL PROTECTED] wrote:
  
   I doubt Google will like the query string part of that URL. Have you
  looked
   at the other URL schemes? I think the answer is that you do need to
 make
 
   your pages bookmarkable so Google has something to put in its index.
 It
  may
   only be seeing the bit before the query string so all your pages look
  the
   same to it.
  
   Anything that it is possible to map from a normal URL to page state
  should
   be bookmarkable so nothing intrinsic to a tabbed panel should stop
 you.
  
   The naming schemes you use for your URLs is worth putting a lot of
  thought
   into as once they are in Google it may take a very long time to
 shift...
 
   Never mind users bookmarks. Keep them as elegant and concise as
 possible
  so
   you don't need to change the plan you adopt now.
 
  Sam is right. I think this is something we should communicate more
  loudly maybe. The thing is, most of the people who work on Wicket work
  on apps where a user logs in and then accesses the rest of the
  application. Bookmark-ability is only for convenience then. However,
  if you are designing a public facing site, you should really be aware
  of bookmarkability, and either shield parts of your site for crawlers
  or make sure everything is bookmarkable. Unfortunately, this has an
  effect on your programming model. Like you said, tabbed panel and
  pageablelist are components that are not bookmarkable by default, so
  you'd have to code such functionality in alternative ways. You're
  basically back to a page based approach.
 
  Regards,
 
  Eelco
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/


Re: Wicket-Stuff Tinymce-Editor: No toolbars in IE6

2007-09-10 Thread Iulian Costan
hey,

sorry for this late response, i've just read this thread.

the reason behind all those tricky imports is the tinymce/ajax
compatibility. tinymce works very well when it is loaded at the same time
with parent page but when you try to load it using ajax then there is a
problem. anyway tinymce/ajax loading is experimental and shouldn't be used,
i'll put some comments in there and clean up little bit.

/iulian

On 9/10/07, Benjamin Ernst [EMAIL PROTECTED] wrote:

 Hi,

 I solved the problem by changing the TinyMceBehavior.renderHead()-method.

 It now looks like this:

 /**
  * @see org.apache.wicket.behavior.AbstractAjaxBehavior#renderHead(
 org.apache.wicket.markup.html.IHeaderResponse)
  */
 public void renderHead(IHeaderResponse response)
 {
 // add wicket-ajax support
 super.renderHead(response);

 // since wicket modifies the src attribute of a pre-loaded script
 tag
 // then we
 // need this workaround to safely import tinymce script

 // import script
 // IS NOT NEEDED ANY LONGER
 //StringBuilder importBuilder = new StringBuilder();
 //importBuilder.append(var script = document.createElement
 ('script');\n);
 //importBuilder.append(script.id='tinyMCEScript';\n);
 //importBuilder.append(script.src=' +
 RequestCycle.get().urlFor(reference)
 + ';\n);
 //importBuilder.append(script.type='text/javascript';\n);
 //importBuilder.append(document.getElementsByTagName
 ('head')[0].appendChild(script);\n);
 //response.renderJavascript(importBuilder.toString(), import);

   // THE NEW LINE
 response.renderJavascriptReference(reference);

 // init script
 StringBuilder initBuilder = new StringBuilder();
 initBuilder.append(tinyMCE.init({ + settings.toJavaScript(ajax)
 +
 \n});\n);
 initBuilder.append(settings.getLoadPluginJavaScript());
 initBuilder.append(settings.getAdditionalPluginJavaScript());
 response.renderJavascript(initBuilder.toString(), init);
 }


 I don´t really know why the script was not imported this way.
 But now it works fine in IE6.


 Benjamin

 2007/9/3, Benjamin Ernst [EMAIL PROTECTED]:
 
  Hi Iulian,
 
  I just want to check if there is any progress with this issue? Did you
  find anything?
 
  Benjamin
 
  2007/8/21, Iulian Costan [EMAIL PROTECTED]:
  
   hey guys,
  
   i am supposed to be the maintainer of tinymce module but lately i
 didnt
   put
   much effort into it.
   let me take a look and see how i can fix that issue.
  
   /iulian
  
   On 8/21/07, Benjamin Ernst  [EMAIL PROTECTED] wrote:
   
Hi Thijs,
Thank you for opening the JIRA. At least there is someone who has
 the
   same
error.
   
So let's hope for the best.
   
Benjamin
   
2007/8/20, Thijs [EMAIL PROTECTED]:

 He Benjamin,

 I have the same problem. I have opened a JIRA issue for it:
 http://wicketstuff.org/jira/browse/WCTINYMCE-2 But no response so
   far. I
 can't help you any further but lets hoop the maintainer of the
   tinymce
 project picks it up...

 Thijs

 Benjamin Ernst wrote:
  Hi,
 
  has nobody an idea? Any help would be great!
 
  Thanks,
  Benjamin
 
  2007/8/16, Benjamin Ernst [EMAIL PROTECTED]:
 
  Hi,
 
  I have a problem with the wicket-stuff Tinymce-Editor in the
  InternetExplorer:
 
  the first time the page is loaded, there are no tool-icons,
 just
   the
  text-area. And IE gives the following Error:
 
  Error: 'tinyMCE is undefined'
 
  It' s an Java-Script-Error and it might be, that the scripts
 are
   not
  loaded the right way. But I don´t know how to fix this. Here
 are
   the
 scripts
  from generated the HTML-Source:
 
  script type=text/javascript
id=import!--/*--![CDATA[/*!--*/
  var script = document.createElement('script');
  script.id='tinyMCEScript ';
 
 

   
  
 script.src='resources/wicket.contrib.tinymce.TinyMCEPanel/tiny_mce/tiny_mce_src.js
  ';
  script.type='text/javascript';
  document.getElementsByTagName ('head')[0].appendChild(script);
 
  /*--]]*//script
 
  script type=text/javascript
   id=init!--/*--![CDATA[/*!--*/
  tinyMCE.init({
  mode : specific_textareas,
  editor_selector : mceEditor,
  theme : advanced,
  language : en,
  plugins : contextmenu, save, paste, searchreplace,
insertdatetime,
  preview, zoom, table, emotions, iespell, flash, print,
directionality,
  fullscreen, spellchecker,
  theme_advanced_buttons1_add_before : save, newdocument,
 separator,
  theme_advanced_buttons1_add : fontselect, fontsizeselect,
  theme_advanced_buttons2_add_before: cut, copy, paste,
   pastetext,
  pasteword, separator, search, replace, separator,
  

Re: Wicket-Stuff Tinymce-Editor: No toolbars in IE6

2007-09-10 Thread Iulian Costan
the fix is committed, let me know if is works as expected.

good to be back to wicket ;)

/iulian

On 9/10/07, Benjamin Ernst [EMAIL PROTECTED] wrote:

 Hi,

 I solved the problem by changing the TinyMceBehavior.renderHead()-method.

 It now looks like this:

 /**
  * @see org.apache.wicket.behavior.AbstractAjaxBehavior#renderHead(
 org.apache.wicket.markup.html.IHeaderResponse)
  */
 public void renderHead(IHeaderResponse response)
 {
 // add wicket-ajax support
 super.renderHead(response);

 // since wicket modifies the src attribute of a pre-loaded script
 tag
 // then we
 // need this workaround to safely import tinymce script

 // import script
 // IS NOT NEEDED ANY LONGER
 //StringBuilder importBuilder = new StringBuilder();
 //importBuilder.append(var script = document.createElement
 ('script');\n);
 //importBuilder.append(script.id='tinyMCEScript';\n);
 //importBuilder.append(script.src=' +
 RequestCycle.get().urlFor(reference)
 + ';\n);
 //importBuilder.append(script.type='text/javascript';\n);
 //importBuilder.append(document.getElementsByTagName
 ('head')[0].appendChild(script);\n);
 //response.renderJavascript(importBuilder.toString(), import);

   // THE NEW LINE
 response.renderJavascriptReference(reference);

 // init script
 StringBuilder initBuilder = new StringBuilder();
 initBuilder.append(tinyMCE.init({ + settings.toJavaScript(ajax)
 +
 \n});\n);
 initBuilder.append(settings.getLoadPluginJavaScript());
 initBuilder.append(settings.getAdditionalPluginJavaScript());
 response.renderJavascript(initBuilder.toString(), init);
 }


 I don´t really know why the script was not imported this way.
 But now it works fine in IE6.


 Benjamin

 2007/9/3, Benjamin Ernst [EMAIL PROTECTED]:
 
  Hi Iulian,
 
  I just want to check if there is any progress with this issue? Did you
  find anything?
 
  Benjamin
 
  2007/8/21, Iulian Costan [EMAIL PROTECTED]:
  
   hey guys,
  
   i am supposed to be the maintainer of tinymce module but lately i
 didnt
   put
   much effort into it.
   let me take a look and see how i can fix that issue.
  
   /iulian
  
   On 8/21/07, Benjamin Ernst  [EMAIL PROTECTED] wrote:
   
Hi Thijs,
Thank you for opening the JIRA. At least there is someone who has
 the
   same
error.
   
So let's hope for the best.
   
Benjamin
   
2007/8/20, Thijs [EMAIL PROTECTED]:

 He Benjamin,

 I have the same problem. I have opened a JIRA issue for it:
 http://wicketstuff.org/jira/browse/WCTINYMCE-2 But no response so
   far. I
 can't help you any further but lets hoop the maintainer of the
   tinymce
 project picks it up...

 Thijs

 Benjamin Ernst wrote:
  Hi,
 
  has nobody an idea? Any help would be great!
 
  Thanks,
  Benjamin
 
  2007/8/16, Benjamin Ernst [EMAIL PROTECTED]:
 
  Hi,
 
  I have a problem with the wicket-stuff Tinymce-Editor in the
  InternetExplorer:
 
  the first time the page is loaded, there are no tool-icons,
 just
   the
  text-area. And IE gives the following Error:
 
  Error: 'tinyMCE is undefined'
 
  It' s an Java-Script-Error and it might be, that the scripts
 are
   not
  loaded the right way. But I don´t know how to fix this. Here
 are
   the
 scripts
  from generated the HTML-Source:
 
  script type=text/javascript
id=import!--/*--![CDATA[/*!--*/
  var script = document.createElement('script');
  script.id='tinyMCEScript ';
 
 

   
  
 script.src='resources/wicket.contrib.tinymce.TinyMCEPanel/tiny_mce/tiny_mce_src.js
  ';
  script.type='text/javascript';
  document.getElementsByTagName ('head')[0].appendChild(script);
 
  /*--]]*//script
 
  script type=text/javascript
   id=init!--/*--![CDATA[/*!--*/
  tinyMCE.init({
  mode : specific_textareas,
  editor_selector : mceEditor,
  theme : advanced,
  language : en,
  plugins : contextmenu, save, paste, searchreplace,
insertdatetime,
  preview, zoom, table, emotions, iespell, flash, print,
directionality,
  fullscreen, spellchecker,
  theme_advanced_buttons1_add_before : save, newdocument,
 separator,
  theme_advanced_buttons1_add : fontselect, fontsizeselect,
  theme_advanced_buttons2_add_before: cut, copy, paste,
   pastetext,
  pasteword, separator, search, replace, separator,
  theme_advanced_buttons2_add : separator, inserttime,
   insertdate,
  separator, preview, zoom, separator, forecolor, backcolor,
  theme_advanced_buttons3_add_before : tablecontrols,
  theme_advanced_buttons3_add : emotions, iespell, flash,
separator,
  print, separator, ltr, rtl, separator, 

Re: First Day Disgust!

2007-09-10 Thread JulianS

Behind chickabee's attempt to provoke the Wicket community (which Eelco has
commendably resisted) lies a real message, namely that there are so many web
frameworks out there, that people only have enough time to kick the tyres
before deciding which one to use, and therefore first impressions are
critical. 

This is one reason that ruby on rails has taken off--the combination of
Instant Rails and Active Record makes it the easiest framework to get a
fully database-enabled application up and running. 

Wicket has done a great job of making it easy to get up and running, but
there is always more to be done. 

Julian

-- 
View this message in context: 
http://www.nabble.com/First-Day-Disgust%21-tf4405663.html#a12601343
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: First Day Disgust!

2007-09-10 Thread Igor Vaynberg
so far i have heard a bunch of bitching but very little in the way of
concrete suggestions.

what are we to provide? a prebuilt project for eclipse? a prebuilt project
for netbeans? a prebuilt project for idea? a prebuilt project for jedit? a
prebuilt project for ant? a prebuilt project for make? a prebuilt project
for buildr? a prebuilt project for foo?

this is why we opted for maven, at least it can generate projects for all
the major ides so we dont have to worry about it ourselves. the barrier to
entry is incredibly low imho as it is - defined on our quickstart page of
the website.

1) install maven2 - 5 minutes
2) run maven command to generate the project: 1 minute
3) run maven command to generate ide setup: 1 minute

seven minutes and you have a project you can run inside your ide, or package
into a war, or run from a command line with mvn jetty:run.

-igor


On 9/10/07, JulianS [EMAIL PROTECTED] wrote:


 Behind chickabee's attempt to provoke the Wicket community (which Eelco
 has
 commendably resisted) lies a real message, namely that there are so many
 web
 frameworks out there, that people only have enough time to kick the tyres
 before deciding which one to use, and therefore first impressions are
 critical.

 This is one reason that ruby on rails has taken off--the combination of
 Instant Rails and Active Record makes it the easiest framework to get a
 fully database-enabled application up and running.

 Wicket has done a great job of making it easy to get up and running, but
 there is always more to be done.

 Julian

 --
 View this message in context:
 http://www.nabble.com/First-Day-Disgust%21-tf4405663.html#a12601343
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: First Day Disgust!

2007-09-10 Thread Eelco Hillenius
 This is one reason that ruby on rails has taken off--the combination of
 Instant Rails and Active Record makes it the easiest framework to get a
 fully database-enabled application up and running.

 Wicket has done a great job of making it easy to get up and running, but
 there is always more to be done.

Definitively. The next steps in making the framework better imho is to
focus more on stacks. It should be optional, and focussed on getting
database apps up and running real quick. Databinder goes in this
direction, and also projects like salve (Igor's baby) can mean a lot
in this context. And what Matej has been working on, a cluster
solution that is optimized for Wicket is another stack improvement
(and the fact that Terracotta has specific Wicket support yet
another).

It wouldn't hurt of more people (other than the core team) would pick
this up though. We are busy enough as it is with writing the book,
supporting this list and fixing bugs etc. I'm definitively interested
to play around with ideas myself once we get the book over with.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: First Day Disgust!

2007-09-10 Thread Martijn Dashorst
Not to mention IDEA 7M2 (or even versions before that) can read a
maven pom, and use that directly. Netbeans also has a maven plugin
that does that (took me 1 minute to discover and less to install the
plugin).

I haven't used an Eclipse plugin for maven since the command line
version works really well and my previous experiences with mevenide
were less than ok (talking about 2 years ago!)

Martijn

-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: BookmarkablePage URL

2007-09-10 Thread V. Jenks

Thanks guys, this has all been really helpful.

I'm having some bizarre results, even though the page is loading now.  Some
of the images aren't loading and I'm getting exceptions that appear to tell
me that the images are being passed as the parameter values, as well?

I mounted the url like so (in app's init() method):

mountBookmarkablePage(/category, CatalogCategory.class);

And I called up the url, w/ parameter, like so:

http://localhost:8080/MyApp/products/category/catid/1

I see the data I should be seeing, save for a few of the images not loading.

Here's my stack trace:


12:54:41,893 ERROR [RequestCycle] Can't instantiate page using constructor
public com.myapp.CatalogCategory(wicket.PageParameters) and argument images
= background.jpg catid = assets
wicket.WicketRuntimeException: Can't instantiate page using constructor
public com.myapp.CatalogCategory(wicket.PageParameters) and argument images
= background.jpg catid = assets
at 
wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:175)
at wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:96)
at
wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:271)
at
wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:286)
at
wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:205)
at
wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:57)
at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:896)
at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:929)
at wicket.RequestCycle.step(RequestCycle.java:1010)
at wicket.RequestCycle.steps(RequestCycle.java:1084)
at wicket.RequestCycle.request(RequestCycle.java:454)
at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:619)
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 
wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:154)
... 33 more
Caused by: java.lang.NumberFormatException: For input string: assets
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.valueOf(Integer.java:553)
at 

Re: First Day Disgust!

2007-09-10 Thread Eelco Hillenius
On 9/10/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 so far i have heard a bunch of bitching but very little in the way of
 concrete suggestions.

 what are we to provide? a prebuilt project for eclipse? a prebuilt project
 for netbeans? a prebuilt project for idea? a prebuilt project for jedit? a
 prebuilt project for ant? a prebuilt project for make? a prebuilt project
 for buildr? a prebuilt project for foo?

 this is why we opted for maven, at least it can generate projects for all
 the major ides so we dont have to worry about it ourselves. the barrier to
 entry is incredibly low imho as it is - defined on our quickstart page of
 the website.

Yeah, I think we facilitate n00bs enough already. There are
definitively a lot of things we can improve on Wicket, but dumbing
things down even more isn't very interesting.

Eelco

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: modal window mask type - is there a way to increase the opacity of the mask

2007-09-10 Thread Matej Knopp
There is no configuration option, you'll have to override css.

-Matej

On 9/10/07, Ed _ [EMAIL PROTECTED] wrote:

 Looking through the java docs - i see two settings for the modal window mask -

 Transparent and Sem-transparent with an opacity of 10% - is there a way to 
 increase the opacity to say 20% - is there a css override options or another 
 config option.

 thanks

 _
 Can you find the hidden words? Take a break and play Seekadoo!
 http://club.live.com/seekadoo.aspx?icid=seek_wlmailtextlink

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: First Day Disgust!

2007-09-10 Thread Craig Tataryn
On 9/10/07, JulianS [EMAIL PROTECTED] wrote:


 snip
 This is one reason that ruby on rails has taken off--the combination of
 Instant Rails and Active Record makes it the easiest framework to get a
 fully database-enabled application up and running.
 snip
 Julian


But the thing is, if someone would have started bitching at DHH why do I
have to install this gems thing to get a Rails app working  he would have
told them where to go. Chickabee was po'd because Wicket uses Maven for a
few things and that's not how he operates.

Because we are using a well established ecosystem such as Java (Ruby was all
greenfield when Rails came out), everyone probably does things 100 different
ways in our neck of the woods.  Unfortunately this may loose some of those
not willing to try a new (and frankly better) way.  Even though you really
only need Maven for the quick starts.  After that, download the jars
manually and Ant away...

Craig.

--
 View this message in context:
 http://www.nabble.com/First-Day-Disgust%21-tf4405663.html#a12601343
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Page state, undo and versioning?

2007-09-10 Thread Doug Leeper



Matej Knopp-2 wrote:
 
 What Wicket version are you using? Because for reliable versioning you
 will need 1.3. Also you problem can be browser caching the initial DOM
 tree (not the modified one). So you should force browser to fire http
 request on back button too - adding CacheControl: no-store to other
 CacheControl flags in Page.configureResponse. Also this might not work
 in Opera, as the browser is quite stubborn and tends to cache things
 anyway.
 
 -Matej
 
 

I thought the cache control flags that you have indicated should already be
called/set if the page in question is a WebPage (see
WebPage.configureResponse() )

Do I need to do anything to ensure that this method is called?

- Doug
-- 
View this message in context: 
http://www.nabble.com/Page-state%2C-undo-and-versioning--tf4390362.html#a12603266
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page state, undo and versioning?

2007-09-10 Thread Matej Knopp
It doesn't set the no-store flag.

protected void configureResponse()
{
super.configureResponse();

if (getWebRequestCycle().getResponse() instanceof WebResponse)
{
final WebResponse response = 
getWebRequestCycle().getWebResponse();
response.setHeader(Pragma, no-cache);
response.setHeader(Cache-Control, no-cache, 
max-age=0,
must-revalidate); // no-store is not set here
}
}

-Matej

On 9/10/07, Doug Leeper [EMAIL PROTECTED] wrote:



 Matej Knopp-2 wrote:
 
  What Wicket version are you using? Because for reliable versioning you
  will need 1.3. Also you problem can be browser caching the initial DOM
  tree (not the modified one). So you should force browser to fire http
  request on back button too - adding CacheControl: no-store to other
  CacheControl flags in Page.configureResponse. Also this might not work
  in Opera, as the browser is quite stubborn and tends to cache things
  anyway.
 
  -Matej
 
 

 I thought the cache control flags that you have indicated should already be
 called/set if the page in question is a WebPage (see
 WebPage.configureResponse() )

 Do I need to do anything to ensure that this method is called?

 - Doug
 --
 View this message in context: 
 http://www.nabble.com/Page-state%2C-undo-and-versioning--tf4390362.html#a12603266
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Component parent null after replace

2007-09-10 Thread Anthony Schexnaildre

Igor,

Thank you for your reply. I did see another message from you recently  
on this same topic but the key the problem was having the private  
Panel panel; field to store the reference.


-Anthony


On Sep 9, 2007, at 5:09 PM, Igor Vaynberg wrote:

heh, seems a lot of people run into it. the short is that you have  
to do

this:

lets say you have a ref to the panel: private Panel panel;

what you do is this:
panel.replaceWith(new Panel());

and then later again
panel.replaceWith(new Panel());

^ the second time will fail beause you have removed panel from  
hierarchy

already - you replaced it with another panel.

the proper way to do it is to keep the reference up to date, so
Panel temp=new Panel();
panel.replaceWith(temp);
panel=temp;

that way when it happens the second time it will properly act on  
the new

panel that is inside the hierarchy now.

-igor




On 9/9/07, Anthony Schexnaildre [EMAIL PROTECTED] wrote:


I am trying to create a link that will replace one panel with another
on the page. This seems as though it should be an easy task but after
many attempts and searching the net for examples I have yet to get it
working so the replacement can happen more than one without the
component becoming orphaned. On the second replace attempt i get the
following exception. Anyone have the solution?

Thank you,

Anthony


java.lang.IllegalStateException: This method can only be called on a
component that has already been added to its parent.
  at org.apache.wicket.Component.replaceWith(Component.java:2266)
  at com.pinwise.pinbase.web.components.links.SecurePanelLink
$4.onClick(SecurePanelLink.java:142)
  at org.apache.wicket.markup.html.link.Link.onLinkClicked
(Link.java:222)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.apache.wicket.RequestListenerInterface.invoke
(RequestListenerInterface.java:186)


=

=

public UserPanel(String id) {
super(id);


UserFormPanel userFormPanel = new
UserFormPanel(userFormPanel);
add( userFormPanel );

ListIColumn columns = new ArrayListIColumn();
final Model m = new Model(userFormPanel);
 columns.add(new PropertyColumn(new Model(Actions), id)
 {
public void populateItem(Item cellItem,  
String

componentId, final
IModel model)
 {
EditActionPanel panel = new
EditActionPanel(componentId, model);
panel.add(
SecurePanelLink.createSecurePanelLink( edit, m,
UserFormPanel.class, model ) );
   cellItem.add( panel );
 }
 });

 columns.add(new PropertyColumn(new Model(Username),
username, username));
 columns.add(new PropertyColumn(new Model(First Name),
firstName, firstName));
 columns.add(new PropertyColumn(new Model(Last Name),
lastName, lastName));

 add(new DefaultDataTable(table, columns, new
SortableUserDataProvider(), 10));
}



SecurePanelLink

public class SecurePanelLink extends Link implements  
ISecureComponent {


/**
 *
 */
private static final long serialVersionUID = 1L;

protected IPanelLink panelLink;

/**
 * @param id
 * @param c
 */
public SecurePanelLink(String id, final Class c)
{
super(id);
// Ensure that c is a subclass of Panel
if (!Panel.class.isAssignableFrom(c))
{
throw new IllegalArgumentException(Class  
 + c +

 is not a
subclass of Panel);
}

this.panelLink = createIPanelLink( id, c );
setSecurityCheck(new LinkSecurityCheck(this, c));
}

public SecurePanelLink(String id, final Class c, Model
existingPanel)
{
super(id);
// Ensure that c is a subclass of Panel
if (!Panel.class.isAssignableFrom(c))
{
throw new IllegalArgumentException(Class  
 + c +

 is not a
subclass of Panel);
}

this.panelLink = createIPanelLink( id, c );
setSecurityCheck(new LinkSecurityCheck(this, c));
}

private IPanelLink createIPanelLink( String id, final  
Class c ) {

return new IPanelLink()
{
private static final long serialVersionUID  
= 1L;


public Panel getPanel( String id )
{
// Create panel using panel factory
return getPanelFactory().newPanel 
(id, c );

}

public Panel getPanel( String id, IModel  

Re: Page state, undo and versioning?

2007-09-10 Thread Johan Compagner
and that shouldn't be done because then backbutton or what ever you do will
always
request the page again, that would fix our back button problem even more :)
but thats
a horrible user experience

johan


On 9/10/07, Matej Knopp [EMAIL PROTECTED] wrote:

 It doesn't set the no-store flag.

 protected void configureResponse()
 {
 super.configureResponse();

 if (getWebRequestCycle().getResponse() instanceof
 WebResponse)
 {
 final WebResponse response =
 getWebRequestCycle().getWebResponse();
 response.setHeader(Pragma, no-cache);
 response.setHeader(Cache-Control, no-cache,
 max-age=0,
 must-revalidate); // no-store is not set here
 }
 }

 -Matej

 On 9/10/07, Doug Leeper [EMAIL PROTECTED] wrote:
 
 
 
  Matej Knopp-2 wrote:
  
   What Wicket version are you using? Because for reliable versioning you
   will need 1.3. Also you problem can be browser caching the initial DOM
   tree (not the modified one). So you should force browser to fire http
   request on back button too - adding CacheControl: no-store to other
   CacheControl flags in Page.configureResponse. Also this might not work
   in Opera, as the browser is quite stubborn and tends to cache things
   anyway.
  
   -Matej
  
  
 
  I thought the cache control flags that you have indicated should already
 be
  called/set if the page in question is a WebPage (see
  WebPage.configureResponse() )
 
  Do I need to do anything to ensure that this method is called?
 
  - Doug
  --
  View this message in context:
 http://www.nabble.com/Page-state%2C-undo-and-versioning--tf4390362.html#a12603266
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: First Day Disgust!

2007-09-10 Thread Johan Compagner

 what are we to provide? a prebuilt project for eclipse? a prebuilt project
 for netbeans? a prebuilt project for idea? a prebuilt project for jedit? a
 prebuilt project for ant? a prebuilt project for make? a prebuilt project
 for buildr? a prebuilt project for foo?


i want Igors Special Build

johan


HTTPS/SSL question

2007-09-10 Thread Doug Leeper

I am converting an existing JSP/BEA PageFlow to Wicket which I am learning a
lot from this exercise.  Some page flows need to be secure, aka via https. 
and when complete, the application flow needs to go back to http.  

What is the best method to tackle this?  
Is this trivial?
Am I missing something?

Thanks in advance,
- Doug
-- 
View this message in context: 
http://www.nabble.com/HTTPS-SSL-question-tf4418925.html#a12604012
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >