How to make a WebPage Application aware?

2007-12-15 Thread chickabee

Hi Guys, 

I have a tomcat webapp with two Wicket Applications, say A and B.

Now, if I create a bookmarkable link in application A for a WebPage which
actually belongs to application B then it balks out for obvious reasons.

I wonder if there is a way to make a WebPage application aware, so that it
resolves it's owner application automatically.

Thanks in advance for any insight you have to share.

-Jay
-- 
View this message in context: 
http://www.nabble.com/How-to-make-a-WebPage-Application-aware--tp14354922p14354922.html
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: GWT + Wicket

2007-12-15 Thread chickabee

Yes, you are right Dan, comparing GWT and Wicket is like comparing apples and
oranges.

In theory you can have complete website using GWT, but here are the
pitfalls:

1. With GWT your site will not be indexed in search engines because you have
only one page for the whole website and the contents will not be visible to
search engines.

2. Back Button Issue - Even though GWT has the tokens which can tell
application about it's state, but they are not yet ready for the prime time,
their behavior is just too erratic specially in IE because IE will download
the whole application again and again for each back button click and IE
stores only a few token in the browser history.

The easiest way to get best of both worlds is to create one RPC service to
provide data to GWT apps, then just embed the GWT apps on any page in the
Wicket you like, it's fairly simple.

-Jay



Dan Kaplan-3 wrote:
 
 I've scoured the internet to figure out how to integrate a GWT app inside
 a
 Wicket App.  I'm not getting very good results.  I also checked the
 mailing
 archives and didn't really find any technical advice on how to do this.
 
  
 
 First, I noticed a lot of the attitude towards GWT/Wicket is that you
 usually want to choose one or the other.  I disagree.  In fact, I think
 comparing GWT to Wicket is comparing apples and oranges.  GWT is a
 Toolkit,
 and Wicket is a Framework.  They both do different things and they're both
 very good at what they do.  Therefore, it's worthwhile to have GWT
 integration in wicket.  
 
  
 
 The reason I personally want GWT support is because I'm making a game.
 It's
 mostly a traditional webapp, but I also want to have an AJAX app that
 works
 similar to Google Maps that allows users to visualize the world.  Most of
 my
 website will be Wicket, but from what I've seen of Wicket's AJAX support,
 making this Map app would be much easier to do in GWT (no offense).  
 
  
 
 That being said, I've also inferred from most of the Wicket + GWT
 conversations that the Wicket developers are trying to add some huge
 functionality to Wicket to allow you to place the a GWT app from your
 WebPage classes.  That may come in handy, but I'm not so sure that it's
 necessary.  I think the client side code that GWT requires could easily be
 added by hardcoding it in the markup and that would be good enough for
 most
 (myself included).  The part that's tricky to me is this section:
 http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.Developer
 Guide.RemoteProcedureCalls.html
 
  
 
 Specifically, if you scroll down a little to the image, how do you get the
 right side to integrate with Wicket?  As you can see, GWT uses a
 RemoteServiceServlet if you want your GWT app to communicate with the
 server.  But the wicket philosophy seems like it tries to hide Servlets
 from
 the user.  So, in short, can anyone advise me on how to integrate a GWT
 app
 with Wicket?
 
  
 
 Thanks,
 
 Dan
 
 
 

-- 
View this message in context: 
http://www.nabble.com/GWT-%2B-Wicket-tp14284738p14355045.html
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 make a WebPage Application aware?

2007-12-15 Thread chickabee

Hi Gabor, 

Thanks for your sincere reply, I can certainly understand the concept you
suggested.

At present I am using the property file instead as a work around and showing
the cross application urls by using the plane o Labels, it's working well.
However, still I wondered that this might very well be a hidden core wicket
functionality where a webpage knows by itself about the application it
belongs to. I believe this functionality will be very useful if incorporated
in case it is not present presently.

Cheers, 

-J





Gabor Szokoli wrote:
 
 On Dec 15, 2007 9:41 PM, chickabee [EMAIL PROTECTED] wrote:
 I have a tomcat webapp with two Wicket Applications, say A and B.

 Now, if I create a bookmarkable link in application A for a WebPage which
 actually belongs to application B then it balks out for obvious reasons.
 
 I'm not sure I understand 100%, but maybe this helps:
 Register the bookmarkable page in application B, and use a
 configuration parameter in applicaton A-s web.xml with B-s base URL.
 Try to remember you did this the next time you deploy application B to
 a different context root, or set up a reverse proxy.
 
 Or the two servlets could talk to each other and share the registered
 bookmarkable URLs dynamically
 
 I wonder if there is a way to make a WebPage application aware, so that
 it
 resolves it's owner application automatically.
 
 Application.get() ?
 
 
 Gabor Szokoli, guessing
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-make-a-WebPage-Application-aware--tp14354922p14356035.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Dot ( . ) in the URL !

2007-10-14 Thread chickabee

Hi Guys, It seems that wicket has the special meaning of a dot ( . ) in the
URL. Wicket expects anything after a dot to be a number and throws Number
format exception if it is not, Is there is a way to use dots in the url??

Here is the example of the url where it is failing:

https://lilo:8443/whisky/plist/c/Computers%3EComputer_Systems%3ELaptops/ps/1.00_-_1.99_GHz/

Thanks in advance..
-- 
View this message in context: 
http://www.nabble.com/Dot-%28-.-%29-in-the-URL-%21-tf4624550.html#a13206993
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Dynamic Page Titles !

2007-09-22 Thread chickabee

Hi, I am looking for some insight on how to render page title dynamically in
wicket. I tried:
html
head
title/title
/head
body
/body
/html

But, apparently wicket tags are not recognized under head,  How can I
achieve this functionality?? Thanks.
-- 
View this message in context: 
http://www.nabble.com/Dynamic-Page-Titles-%21-tf4502381.html#a12840683
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Dynamic Page Titles !

2007-09-22 Thread chickabee

-Posting agagin so that span tag is visible--

Hi, I am looking for some insight on how to render page title dynamically in
wicket. I tried:
html
head
titles-p-a-n wicket:id=catPageTitle//title
/head
body
/body
/html

Note : s-p-s-n = span

But, apparently wicket tags are not recognized under head,  How can I
achieve this functionality?? Thanks.
-- 
View this message in context: 
http://www.nabble.com/Dynamic-Page-Titles-%21-tf4502385.html#a12840697
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: Dynamic Page Titles !

2007-09-22 Thread chickabee

Thanks, A little better but not quite there yet.
Now I have my tag as:
 head
 titles-p-a-n wicket:id=catPageTitle/s-p-a-n/title
 /head

And page title shows as:
s-p-a-n wicket:id=catPageTitleMy Dynamic Page Title/s-p-a-n

Expected page title is:
My Dynamic Page Title

It is rendering the wicket tag itself in the page title which is kinda
funny...

Any more clues??  Thanks !!






Gwyn wrote:
 
 On Saturday, September 22, 2007, 10:48:50 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 -Posting agagin so that span tag is visible--
 
 Hi, I am looking for some insight on how to render page title dynamically
 in
 wicket. I tried:
 html
 head
 titles-p-a-n wicket:id=catPageTitle//title
 /head
 body
 /body
 /html
 
 Note : s-p-s-n = span
 
 But, apparently wicket tags are not recognized under head,  How can I
 achieve this functionality?? Thanks.
 
 http://cwiki.apache.org/WICKET/faqs.html#FAQs-Myspantagdoesn%2527tgetrendered
 
 /Gwyn
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Dynamic-Page-Titles-%21-tf4502385.html#a12840970
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: Dynamic Page Titles !

2007-09-22 Thread chickabee

This worked well eventually:

 head
 title wicket:id=catPageTitle /title
 /head 

Thanks for the pointer..




chickabee wrote:
 
 Thanks, A little better but not quite there yet.
 Now I have my tag as:
  head
  titles-p-a-n wicket:id=catPageTitle/s-p-a-n/title
  /head
 
 And page title shows as:
 s-p-a-n wicket:id=catPageTitleMy Dynamic Page Title/s-p-a-n
 
 Expected page title is:
 My Dynamic Page Title
 
 It is rendering the wicket tag itself in the page title which is kinda
 funny...
 
 Any more clues??  Thanks !!
 
 
 
 
 
 
 Gwyn wrote:
 
 On Saturday, September 22, 2007, 10:48:50 PM, chickabee
 [EMAIL PROTECTED] wrote:
 
 -Posting agagin so that span tag is visible--
 
 Hi, I am looking for some insight on how to render page title
 dynamically in
 wicket. I tried:
 html
 head
 titles-p-a-n wicket:id=catPageTitle//title
 /head
 body
 /body
 /html
 
 Note : s-p-s-n = span
 
 But, apparently wicket tags are not recognized under head,  How can I
 achieve this functionality?? Thanks.
 
 http://cwiki.apache.org/WICKET/faqs.html#FAQs-Myspantagdoesn%2527tgetrendered
 
 /Gwyn
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Dynamic-Page-Titles-%21-tf4502385.html#a12841066
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Image Scaling Feature !

2007-09-20 Thread chickabee

Hi, 

I like to know if wicket has any built-in feature for scaling images while
maintaining aspect ratios, Thanks !

-- 
View this message in context: 
http://www.nabble.com/Image-Scaling-Feature-%21-tf4485782.html#a12792030
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: Images Example Question!

2007-09-20 Thread chickabee

Internal Image URL worked fine but the third party Image URLs still have
problems, 

Here is the sample third party url:
http://images.overstock.com/f/102/3117/8h/www.overstock.com/images/products/T10577058.jpg

If I use Image:
image = new Image(prodImg,   'url  );

then I get this:
WARN  - PackageResource- Unable to find package resource [path =
com/ezfizz/whisky/http:/images.overstock.com/f/102/3117/8h/www.overstock.com/images/products/T10577058.jpg

If I use Context Image:
image = new ContextImage(prodImg,  new Model( url ) );

Then it shows broken Image and the image property says:
https://lilo:8443/whisky/http://images.overstock.com/f/102/3117/8h/www.overstock.com/images/products/T10577058.jpg

Either way Wicket fails to understand the absoluteness of URLs and prepends
something to make it unusable, 

What are my options now? thanks in advance.





Eelco Hillenius wrote:
 
 It's working well now, Thanks for pushing me through.
 
 No problem. And remember: don't panic ;-)
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12802592
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: Images Example Question!

2007-09-20 Thread chickabee

Very interesting!  That was easy, all good again, thanks for the help !!





Eelco Hillenius wrote:
 
 com/ezfizz/whisky/http:/images.overstock.com/f/102/3117/8h/www.overstock.com/images/products/T10577058.jpg

 If I use Context Image:
 image = new ContextImage(prodImg,  new Model( url ) );

 Then it shows broken Image and the image property says:
 https://lilo:8443/whisky/http://images.overstock.com/f/102/3117/8h/www.overstock.com/images/products/T10577058.jpg
 
 
 That is because that is not a context image you're trying to display
 there! Context refers to context path == part of your war.
 
 What you need to do is write your own class that handles both:
 
 public class ContextImage extends WebComponent {
 
   public ContextImage(String id) {
   super(id);
   }
 
   public ContextImage(String id, IModel model) {
   super(id, model);
   }
 
   protected void onComponentTag(final ComponentTag tag) {
   checkComponentTag(tag, img);
   super.onComponentTag(tag);
   String url = getModelObjectAsString();
   if (url.startsWith(http)) {
   tag.put(src, url);
   } else {
   tag.put(src, 
 getRequest().getRelativePathPrefixToContextRoot()
 + getModelObjectAsString());
   }
   }
 }
 
 Something like that. Try to look at the source code more. Writing your
 own components often isn't that difficult.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12803139
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: Passing Parameters to Bookmarkable Page

2007-09-19 Thread chickabee

It seems like in:
parameters.put(filter, filter);

the filter object is the instance of com.foo.bar.Filter class, I guess if
you implement toString() correctly within this object that might help, also
instead of com.foo.bar.Filter object,  try supplying a String as an
alternate,

Good luck.




Flavius wrote:
 
 I have two pages, a list page and a detail.  The list page
 can take a filter parameter, or has a default one if one
 is not passed (making it bookmarkable).  When the user
 clicks to go to the detail page, I want to pass that
 filter along, so that when an edit is complete, the
 page can redirect back to the list page with the same
 filter intact.  I also want the detail page to be bookmarkable.
 
 If the detail page gets the filter, it simply passes it back.  If
 not, that's fine too.
 
 I can accomplish this easily by creating a PageParameters:
 
 PageParameters parameters = new PageParameters();
 parameters.put(filter, filter);
 
 BookmarkablePageLink link = new BookmarkablePageLink(name,
 MyDetailPage.class, parameters);
 
 And this works fine.  But I don't like the way
 the URL is created like this:
 
 http://localhost/pages/MyDetailPage/item/20/filter/com.foo.bar.Filter%401ae6456/
 
 If the page is bookmarked, the Filter obj doesn't matter anyway.
 I understand why it's there, I'm just trying to figure out a prettier URL,
 like
 when I pass a parameter on the requestCycle, setting the response page
 and passing the parameters obj in there.
 
 I've thought of overriding the onClick event for BookmarkablePageLink, but
 it's final.  Another option was to pass it on the request or the session. 
 That
 would be the last option.
 
 Any insight would be appreciated.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Passing-Parameters-to-Bookmarkable-Page-tf4478593.html#a12780685
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Images Example Question!

2007-09-19 Thread chickabee

Referring to Imge examples if I drop a few images into  folder:
src\main\webapp\images

e.g.
src\main\webapp\images\cat.gif
src\main\webapp\images\dog.gif
src\main\webapp\images\snake.gif

Then how do I show these imges into the: 
src\main\java\org\apache\wicket\examples\images\HomePge.java  
src\main\java\org\apache\wicket\examples\images\HomePage.html

Image example serves the image from the same package, which is:

src\main\java\org\apache\wicket\examples\images\Image2.gif

and i like to know how to serve the external image into the webpage if you
know the url e.g. ( images\cat.gif, images\dog.gif  etc).

Thanks.
 


-- 
View this message in context: 
http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12789363
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: Images Example Question!

2007-09-19 Thread chickabee

Thanks Eelco for the prompt response, here is what I have.

Image url woring fine in the browser:
https://lilo:8443/whisky/images/mlogo/Merchant.gif

Then in my class this is what i have:
item.add( new Image(merchantLogo,
https://lilo:8443/whisky/images/mlogo/Merchant.gif;) );

And my html looks like:
td width=20%i-m-g wicket:id=merchantLogo//td
Note: i-m-g actually is img, i added dashes so that the browser does not
interpret it when u see the email.

And this is the error I am getting:
WARN  - PackageResource- Unable to find package resource [path =
com/ezfizz/whisky/https:/lilo:8443/whisky/images/mlogo/Merchant.gif, style =
null, locale = en_US]

I am trying to figure out what is wrong here, please take a look and let me
know what is missing, I tried relative paths as well, but same problem. It
looks like Wicket expects the Image to be in the same package where the
class is located.

Thanks, 



Eelco Hillenius wrote:
 
 Referring to Imge examples if I drop a few images into  folder:
 src\main\webapp\images

 e.g.
 src\main\webapp\images\cat.gif
 src\main\webapp\images\dog.gif
 src\main\webapp\images\snake.gif

 Then how do I show these imges into the:
 src\main\java\org\apache\wicket\examples\images\HomePge.java
 src\main\java\org\apache\wicket\examples\images\HomePage.html
 
 Just like you would normally do:  images/cat.gif  etc.
 Like image1 in that example.
 
 Image example serves the image from the same package, which is:

 src\main\java\org\apache\wicket\examples\images\Image2.gif
 
 Not all, again see Image1.
 
 and i like to know how to serve the external image into the webpage if
 you
 know the url e.g. ( images\cat.gif, images\dog.gif  etc).
 
 Relative paths will be prepended by Wicket with the context path (and
 that's what you want), and absolute URLs are left just like that.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12790116
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: Images Example Question!

2007-09-19 Thread chickabee

Thanks Eelco, This is working now with ContextImage, as you suggested, Now
how do I use this image to create one external link, I tried:

td width=20% /td 

but it fails miserably after complaining about hierarchy, i can't really
find any method like:

ExternalLink(java.lang.String id, java.lang.String href,
java.lang.ContextImage image), 

any idea how can i achieve this, 

Thanks!!



Eelco Hillenius wrote:
 
 Image url woring fine in the browser:
 https://lilo:8443/whisky/images/mlogo/Merchant.gif

 Then in my class this is what i have:
 item.add( new Image(merchantLogo,
 https://lilo:8443/whisky/images/mlogo/Merchant.gif;) );

 And my html looks like:
 td width=20%i-m-g wicket:id=merchantLogo//td
 Note: i-m-g actually is img, i added dashes so that the browser does not
 interpret it when u see the email.

 And this is the error I am getting:
 WARN  - PackageResource- Unable to find package resource
 [path =
 com/ezfizz/whisky/https:/lilo:8443/whisky/images/mlogo/Merchant.gif,
 style =
 null, locale = en_US]

 I am trying to figure out what is wrong here, please take a look and let
 me
 know what is missing, I tried relative paths as well, but same problem.
 It
 looks like Wicket expects the Image to be in the same package where the
 class is located.
 
 Yes, the image component is meant for dynamic images and packaged
 images. You typically don't need a Wicket component to display images
 from the web app dir or outside the app. But if you do (e.g. because
 you determine this image dynamically) you can use ContextImage. Take a
 look at the source too, a component like that is very easy to do
 yourself.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12790440
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: Images Example Question!

2007-09-19 Thread chickabee

Sorry, Posting again with image tag, and anchor hack---

Thanks Eelco, This is working now with ContextImage, as you suggested, Now
how do I use this image to create one external link, I tried:

td width=20%-a- wicket:id=merchantLink i-m-g
wicket:id=merchantLogo/  /td 

but it fails miserably after complaining about hierarchy, i can't really
find any method like:

ExternalLink(java.lang.String id, java.lang.String href,
java.lang.ContextImage image), 

any idea how can i achieve this, 

Thanks!!



Eelco Hillenius wrote:
 
 Image url woring fine in the browser:
 https://lilo:8443/whisky/images/mlogo/Merchant.gif

 Then in my class this is what i have:
 item.add( new Image(merchantLogo,
 https://lilo:8443/whisky/images/mlogo/Merchant.gif;) );

 And my html looks like:
 td width=20%i-m-g wicket:id=merchantLogo//td
 Note: i-m-g actually is img, i added dashes so that the browser does not
 interpret it when u see the email.

 And this is the error I am getting:
 WARN  - PackageResource- Unable to find package resource
 [path =
 com/ezfizz/whisky/https:/lilo:8443/whisky/images/mlogo/Merchant.gif,
 style =
 null, locale = en_US]

 I am trying to figure out what is wrong here, please take a look and let
 me
 know what is missing, I tried relative paths as well, but same problem.
 It
 looks like Wicket expects the Image to be in the same package where the
 class is located.
 
 Yes, the image component is meant for dynamic images and packaged
 images. You typically don't need a Wicket component to display images
 from the web app dir or outside the app. But if you do (e.g. because
 you determine this image dynamically) you can use ContextImage. Take a
 look at the source too, a component like that is very easy to do
 yourself.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12790443
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: Encoding the Nice URL Parameters !

2007-09-17 Thread chickabee

Bookmarkable urls are doing correct encoding, the problem is only with the
the setResponsePage call.



chickabee wrote:
 
 Hi, 
 
 I am using:
 setResponsePage(SearchPage.class, params);
 
 Now if any of the params value has a space then the url fails miserably
 because it replaces the space with a + sign, e.g.
 
 param value foo bar  becomes foo+bar, instead of foo%20bar if it was
 encoded correctly, 
 
 Is there a way to tell the Application to encode all the mounted url
 parameters correctly?
 
 Thanks !! 
 

-- 
View this message in context: 
http://www.nabble.com/Encoding-the-Nice-URL-Parameters-%21-tf4470697.html#a12747677
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Capturing Form Data into Nice URL !

2007-09-16 Thread chickabee

I have simple form:
=
private class SearchForm extends Form {
private final ValueMap properties = new ValueMap();
private TextField querystring;

public SearchForm(String id){
super(id);
add(querystring = new TextField(querystring, new
PropertyModel(properties, q)));
}

public final void onSubmit(){
setResponsePage(SearchPage.class);
}
}
===
When I enter the text 'keyword' into the text field and press Submit it
happily forwards to:
https://lilo:8443/whisky/app/search

How do i embed the form data into the forwarded url like this:
https://lilo:8443/whisky/app/search/q/keyword

Any pointer in right direction is appreciated, thanks..






-- 
View this message in context: 
http://www.nabble.com/Capturing-Form-Data-into-Nice-URL-%21-tf4461968.html#a12723634
Sent from the Wicket - User mailing list archive at Nabble.com.


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



DropDownChoice.setSelected(Object object)

2007-09-16 Thread chickabee

Hi, 

I am looking for an equivalent to:
DropDownChoice.setSelected(Object object)

I looked into API docs but can't figure it out.  I have drop down with 18
different choices and I want to select one from either on the available
values based on a PageParameter received.

Help please! Thanks!!
-- 
View this message in context: 
http://www.nabble.com/DropDownChoice.setSelected%28Object-object%29-tf4462708.html#a12725679
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: PageNavigator Vs Nice Url

2007-09-11 Thread chickabee

I think it will be easily achievable by adding one more constructor to
PageNavigator which can take the starting page param:

Exising:
add(new PagingNavigator(navigator, gridView));

Proposed:
add(new PagingNavigator(navigator, gridView, startPage));

This startPage can be extracted from PageParameters. If the startPage is
null then start form the beginning otherwise set the start page to this
values in the PageNavigator.

Above,  in conjuction with a new PageNavigatorUrlCodingStrategy which can
convert session page ids  into to universally bookmarkable page ids will
provide the desired solution. 

Anyone more thoughts??



Johan Karlberg wrote:
 
 The page versions will not be bookmarkable since they rely on serverside 
 state that obviosuly cannot be retained forever, nor shared with another 
 session. To make a basepage boomarkable, make our navigation links 
 bookmarkable. (there is a BookmarkableLink in the API), if you want 
 pages with state to be bookmarkable, the relevant state needs to be 
 encoded in the URL and passed with PageParameters I believe.
 
 Johan
 
 chickabee wrote:
 Yes, Now the urls are like:
 https://lilo:8443/whisky/app/plist/.1.2
 https://lilo:8443/whisky/app/plist/.1.3  ...etc...these are much better
 than
 earlier. thx.
 
 However, they are not bookmarkable, if I start the new browser and point
 the
 folloing url:
 https://lilo:8443/whisky/app/plist/.1.3
 
 It always takes me to the first page, How do i make these navigated urls 
 bookmarkable as well?
 
 thanks,  
 
 
 
 Johan Karlberg wrote:
 In your application class's init method, mount the page with an 
 appropriate URL strategy. I have mounts like these in my current code.

 mount(new HybridUrlCodingStrategy(/plist, PlistPage.class));

 Johan

 chickabee wrote:
 I have the nice url:
 https://lilo:8443/whisky/app/plist/

 When I go to the next page using the page navigator then the url
 becomes:
 https://lilo:8443/whisky/app/?wicket:interface=:16:1:::

 When I go to next page again  then the url becomes:
 https://lilo:8443/whisky/app/?wicket:interface=:16:2:::

 How do I make these Page Navigated Urls Nicer, for example:
 https://lilo:8443/whisky/app/plist/page/1
 https://lilo:8443/whisky/app/plist/page/2

 Any pointer in right direction is appreciated, Thanks in advance. 

 -
 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/PageNavigator-Vs-Nice-Url-tf4421682.html#a12613697
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: PageNavigator Vs Nice Url

2007-09-11 Thread chickabee

Hi Sebastiaan, Can't wait to see what you come-up with after the weekend full
of grunt work, i have just posted  a few design pointers, in case they make
any sense to you. I have not yet opened the PageNavigation.java file but I
will shortly if an acceptable solution does not surface timely, I don't see
a technical challenge here, it is just a matter of putting in some sweat.  

Thanks.. 



Sebastiaan van Erk wrote:
 
 I have exactly the same issue, and was thinking of writing a special 
 PageNavigation to do the job for me. Many times the only relevant state 
 is the page number (and possibly the filter used).
 
 The use case (which I think occurs very often) is a list of comments in 
 a guestbook or blog, or the list of products in shop, etc... The list 
 will change only very infrequently (item added or removed, in the case 
 of blogs, possibly only at the end). Users however want to paste links 
 to each other via IM, and they certainly don't want the page to expire 
 on them (prev on a guestbook page suddenly says Page Expired? - users 
 won't understand, and personally I'd think it's a poor implementation if 
 that happened to me).
 
 The current PageNavigation does not seem very easy to modify 
 unfortunately. Overriding it to return other links is a possible, but I 
 saw lots of logic in the default links (PagingNavigationLink and 
 PaginagNavigationIncrementLink) it returns (which are subclasses of 
 Link). If you want to make them subclasses of BookMarkablePageLink then 
 you have to copy paste a lot of functionality. :-(
 
 Anyway, I'll be looking into this probably this weekend, and if I get 
 something working I'll post it to the list. Any suggestions as to the 
 best approach are welcome though. :-)
 
 Regards,
 Sebastiaan
 
 Johan Karlberg wrote:
 The page versions will not be bookmarkable since they rely on serverside 
 state that obviosuly cannot be retained forever, nor shared with another 
 session. To make a basepage boomarkable, make our navigation links 
 bookmarkable. (there is a BookmarkableLink in the API), if you want 
 pages with state to be bookmarkable, the relevant state needs to be 
 encoded in the URL and passed with PageParameters I believe.
 
 Johan
 
 chickabee wrote:
 Yes, Now the urls are like:
 https://lilo:8443/whisky/app/plist/.1.2
 https://lilo:8443/whisky/app/plist/.1.3  ...etc...these are much 
 better than
 earlier. thx.

 However, they are not bookmarkable, if I start the new browser and 
 point the
 folloing url:
 https://lilo:8443/whisky/app/plist/.1.3

 It always takes me to the first page, How do i make these navigated 
 urls bookmarkable as well?

 thanks, 


 Johan Karlberg wrote:
 In your application class's init method, mount the page with an 
 appropriate URL strategy. I have mounts like these in my current code.

 mount(new HybridUrlCodingStrategy(/plist, PlistPage.class));

 Johan

 chickabee wrote:
 I have the nice url:
 https://lilo:8443/whisky/app/plist/

 When I go to the next page using the page navigator then the url 
 becomes:
 https://lilo:8443/whisky/app/?wicket:interface=:16:1:::

 When I go to next page again  then the url becomes:
 https://lilo:8443/whisky/app/?wicket:interface=:16:2:::

 How do I make these Page Navigated Urls Nicer, for example:
 https://lilo:8443/whisky/app/plist/page/1
 https://lilo:8443/whisky/app/plist/page/2

 Any pointer in right direction is appreciated, Thanks in advance.
 -
 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/PageNavigator-Vs-Nice-Url-tf4421682.html#a12613803
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 create Dynamic ListView

2007-09-11 Thread chickabee

You can follow the GridView code in the examples, it is the easiest way to
learn how effortlessly wicket can provide data grids in a webpage. As far as
the tablename etc is there, I believe this is your very own business logic
situation, so deal with it. Good luck wicketing!! 



Edi wrote:
 
 How to display the dynamic Listview.
 
 for e.g, I have a dynamic query like select * from tablename, I want to
 display the table values into ListView.
 Is it possible. Please remember, table name is dynamic. I don't have
 setter and getter method for table name/class name.
 
 All suggestions welcome.
 
 Thank you for Reading.
 

-- 
View this message in context: 
http://www.nabble.com/How-to-create-Dynamic-ListView-tf4422298.html#a12614113
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: PageNavigator Vs Nice Url

2007-09-11 Thread chickabee

I like the simple just set the start page idea. However why would need
a special coding strategy? You have to already retrieve the page number
manually from the params in your example, so why not just modify
PagingNavigator to make bookmarkable page links. 

Yes,  I agree on that, You are right that the PageNavigator can itself
create the navigable urls.
Thanks



Sebastiaan van Erk wrote:
 
 Hi,
 
 chickabee wrote:
 I think it will be easily achievable by adding one more constructor to
 PageNavigator which can take the starting page param:
 
 Exising:
 add(new PagingNavigator(navigator, gridView));
 
 Proposed:
 add(new PagingNavigator(navigator, gridView, startPage));
 
 This startPage can be extracted from PageParameters. If the startPage is
 null then start form the beginning otherwise set the start page to this
 values in the PageNavigator.
 
 Above,  in conjuction with a new PageNavigatorUrlCodingStrategy which can
 convert session page ids  into to universally bookmarkable page ids will
 provide the desired solution. 
 
 Anyone more thoughts??
 
 I like the simple just set the start page idea. However why would need 
 a special coding strategy? You have to already retrieve the page number 
 manually from the params in your example, so why not just modify 
 PagingNavigator to make bookmarkable page links.
 
 Then you just use the standard bookmarkable page if you want pretty 
 urls, though I'd personally use the HybridUrlCodingStrategy to use the 
 session page if it can be found, and otherwise reconstruct the page to a 
 good approximation using the page parameters...
 
 Regards,
 Sebastiaan
 
 
 
 Johan Karlberg wrote:
 The page versions will not be bookmarkable since they rely on serverside 
 state that obviosuly cannot be retained forever, nor shared with another 
 session. To make a basepage boomarkable, make our navigation links 
 bookmarkable. (there is a BookmarkableLink in the API), if you want 
 pages with state to be bookmarkable, the relevant state needs to be 
 encoded in the URL and passed with PageParameters I believe.

 Johan

 chickabee wrote:
 Yes, Now the urls are like:
 https://lilo:8443/whisky/app/plist/.1.2
 https://lilo:8443/whisky/app/plist/.1.3  ...etc...these are much better
 than
 earlier. thx.

 However, they are not bookmarkable, if I start the new browser and
 point
 the
 folloing url:
 https://lilo:8443/whisky/app/plist/.1.3

 It always takes me to the first page, How do i make these navigated
 urls 
 bookmarkable as well?

 thanks,  



 Johan Karlberg wrote:
 In your application class's init method, mount the page with an 
 appropriate URL strategy. I have mounts like these in my current code.

 mount(new HybridUrlCodingStrategy(/plist, PlistPage.class));

 Johan

 chickabee wrote:
 I have the nice url:
 https://lilo:8443/whisky/app/plist/

 When I go to the next page using the page navigator then the url
 becomes:
 https://lilo:8443/whisky/app/?wicket:interface=:16:1:::

 When I go to next page again  then the url becomes:
 https://lilo:8443/whisky/app/?wicket:interface=:16:2:::

 How do I make these Page Navigated Urls Nicer, for example:
 https://lilo:8443/whisky/app/plist/page/1
 https://lilo:8443/whisky/app/plist/page/2

 Any pointer in right direction is appreciated, Thanks in advance. 

 -
 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/PageNavigator-Vs-Nice-Url-tf4421682.html#a12614975
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 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]



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 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: 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: 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: 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: 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: 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: 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: First Day Disgust!

2007-09-09 Thread chickabee

Hi Wicketers, 

No doubt you guys are a vibrant community. It was nice listening to all the
rant and raves and jitters and it is even more exciting to see some positive 
action on this small but important issue.

I am for Wicket, so I criticized it to make it even more widely adaptable,
because wicket is a well thought out web framework.

I looked into Maven and did all the Quick-Start exercise, I have the
application up and running using Maven. Quick Start has following obvious
flaws:

1. It is based on Maven. (I am not apache community with 25 projects running
in parallel, I just want to make a small app using wicket. Maven is
overkill).
2. It favors Jetty. ( Why even say Jetty, pom.xml has jetty dependencies
defined. )
3. It depends on log4j. (Newer JDK have all the logging features needed. )
4. Advises the user to follow test driven development. (I want to be a bad
developer, is that okay?).

All above default integrations and suggestions are unnecessary and undermine
Wicket and make it less appealing to Non-Wicketers and possible adopters of
this great phenomenon. This is not the responsibility of the Wicket
community to tell people what they should use or should not use. It is the
decision of wicket end user if they want to integrate wicket with a
double-cheese-burger :-) then let them do it on their own, but certainly
Quick Start rather be as rudimentary as possible, take it as a marketing
trick to entice the people to use wicket and make them fall in love with
wicket at first sight.

Thank you all for listening.

===


Craig Tataryn wrote:
 
 FYI Chickabee, if you are using Netbeans and use the Wicket plugin it is
 bundled with some helpful sample apps.
 
 Craig.
 
 On 9/8/07, chickabee [EMAIL PROTECTED] wrote:


 Thanks for the great idea.

 It believe it will be good to put a few of the  examples application in
 their own folders and war files so that they can be studied independently
 without the clutter of 20 projects.

 Another thing I notice is that maven is  the default build tool used for
 wicket, I guess it will be good to provide the ant build.xml, just in
 case
 someone does not want full maven features.

 ---


 David Bernard-2 wrote:
 
  Welcome,
 
  If you want to start a blank project, try:
 
  $ mvn archetype:create -DarchetypeGroupId=org.apache.wicket
 -DarchetypeArtifactId=wicket-archetype-quickstart
 -DarchetypeVersion=1.3.0-beta3
 -DgroupId=com.mycompany
 -DartifactId=myproject
  $ cd myproject
  $ more pom.xml
 
  then in this project try (copy/paste) the samples from the website.
 
  /david
 
  chickabee wrote:
  Hi Wicketers,
 
  I tried wicket today and the example application was up and running on
  tomcat in no time, so that was the good part, after that if I like to
  create
  a sample application on my own then I found no easy way to start.
 
  Examples are good to browse through and tell about wicket
 capabilities,
  however,  not so good from learning point of view, All of the examples
  are
  glued together in one big jar file and it is just not quick enough to
  create
  a bare-bone application quickly and easily,
 
  I tried Quicket as mentioned in the readme file, however, Quickets is
  nothing but waste of time, because it is glued with Hibernate and
 Spring
  and
  both should not be there to start with.
 
  Not a good experience trying wicket so far, I guess it's the time to
 try
  out
  some more simpler app frameworks,
 
  -Thumbs Down to Wicket!
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/First-Day-Disgust%21-tf4405663.html#a12569195
 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/First-Day-Disgust%21-tf4405663.html#a12576738
Sent from the Wicket - User mailing list archive at Nabble.com.


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



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

2007-09-09 Thread chickabee

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]



First Day Disgust!

2007-09-08 Thread chickabee

Hi Wicketers, 

I tried wicket today and the example application was up and running on
tomcat in no time, so that was the good part, after that if I like to create
a sample application on my own then I found no easy way to start. 

Examples are good to browse through and tell about wicket capabilities,
however,  not so good from learning point of view, All of the examples are
glued together in one big jar file and it is just not quick enough to create
a bare-bone application quickly and easily,

I tried Quicket as mentioned in the readme file, however, Quickets is
nothing but waste of time, because it is glued with Hibernate and Spring and
both should not be there to start with. 

Not a good experience trying wicket so far, I guess it's the time to try out
some more simpler app frameworks, 

-Thumbs Down to Wicket!

-- 
View this message in context: 
http://www.nabble.com/First-Day-Disgust%21-tf4405663.html#a12568938
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-08 Thread chickabee

Thanks for providing me the primer on web applications and Ant and for not
trying to understand what point I am trying to make here.

Yes, we are not dealing with nuclear science here and Yes again wicket is
just another web application, Did someone disagree with that. I hope not.

Once you are out in the market to try the new webapps then it always makes
sense to have people be able to get up and running on the basics w/o efforts
and not to have to deal with tricks necessary to get basic app to work.

A common expectation is a simple standalone app without
Maven/Spring/Hibernate etc unnecessary stuff. Run 'ant' on the command line
and here u have the war file, now,  make a few changes to experiment and
then run 'ant' again to have modified war. Simple.

Obviously the current example is for the comfort of wicket creators and not 
for the comfort of prospective users and that is the problem here.

Any one with basic common sense will get this up and running after a day's
tinkering around,  but that can be avoided by adding simple things here in
the examples, that is the point I am trying to sell here only if there are
buyers out there with open mind.




Al Maw wrote:
 
 chickabee wrote:
 Thanks for the great idea. 
 
 Note that this is displayed fairly prominently on the web site at 
 http://wicket.apache.org under QuickStart.
 
 It believe it will be good to put a few of the  examples application in
 their own folders and war files so that they can be studied independently
 without the clutter of 20 projects.
 
 We used to have this, however, grouping all the examples into one 
 project has several big advantages:
 
   - Getting all the examples running in your IDE is much easier.
   - We don't have ten extra projects to manage the build files for.
   - We can easily link to all the examples from a single page.
 
 Another thing I notice is that maven is  the default build tool used for
 wicket, I guess it will be good to provide the ant build.xml, just in
 case
 someone does not want full maven features.
 
 I think we need to write a page on this on the web site that we can send 
 people to. ;-)
 
 An Ant build for Wicket isn't special. If you don't know how to use Ant, 
 it's not our job to show you. There are no magic custom Ant tasks we 
 provide, or JSP pre-compilation steps, or anything like that. All you 
 need is to compile your app with the necessary dependencies, just like 
 any other Java app. You'll also need your web.xml, etc. just like any 
 other Java web app. Nothing special here.
 
 Regards,
 
 Al
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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


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