static pages & dynamic pages. How to have the same layout
Hi, I am completely new to Wicket and trying to decide if this is something I would want to use for my project. My website has some static and some dynamic pages that have to share the same look. Currently I am using SiteMesh to achieve this. Can I accomplish this with Wicket without having to write a dummy java class for every html page ? thank you in advance Vicky -- View this message in context: http://www.nabble.com/static-pages---dynamic--pages.-How-to-have-the-same-layout-tp21840098p21840098.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: static pages & dynamic pages. How to have the same layout
Im actually using that exact approach..I think it's somewhat ok, because it brings continuity to the architecture... Vika wrote: Hi, I am completely new to Wicket and trying to decide if this is something I would want to use for my project. My website has some static and some dynamic pages that have to share the same look. Currently I am using SiteMesh to achieve this. Can I accomplish this with Wicket without having to write a dummy java class for every static html page ? thank you in advance Vicky - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: static pages & dynamic pages. How to have the same layout
You would use page inheritance so that each page inherited its look and feel from all the others. There are many different ways to show different content without creating a ton of pages. Can you elaborate on your current architecture so we can let you know how Wicket can achieve this? On Feb 4, 2009, at 1:34 PM, Vika wrote: Hi, I am completely new to Wicket and trying to decide if this is something I would want to use for my project. My website has some static and some dynamic pages that have to share the same look. Currently I am using SiteMesh to achieve this. Can I accomplish this with Wicket without having to write a dummy java class for every static html page ? thank you in advance Vicky -- View this message in context: http://www.nabble.com/static-pages---dynamic--pages.-How-to-have-the-same-layout-tp21840098p21840098.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org To our success! Mystic Coders, LLC | Code Magic | www.mysticcoders.com ANDREW LOMBARDI | and...@mysticcoders.com 2321 E 4th St. Ste C-128, Santa Ana CA 92705 ofc: 949-528-6480 fax: 714-782-6024 cell: 714-697-8046 Eco-Tip: Printing e-mails is usually a waste. This message is for the named person's use only. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
Re: static pages & dynamic pages. How to have the same layout
kinabalu wrote: > > Can you elaborate > on your current architecture so we can let you know how Wicket can > achieve this? > There are two categories pages on the site. 1) dynamic content - jsp/servlet 2) static content - html Both categories of pages only display the "content". Navigation bar, header and footer are added to both categories of pages using sitemesh (servlet filter). So what should happen to the static html pages if i want to switch from using jsp/servlet to wicket ? Static content html pages are edited by someone who is not a programmer and I would not want to put them together with java classes. It sounds like i could keep using sitemesh and it should still work. However is there a better way of doing it ? thanks Vicky -- View this message in context: http://www.nabble.com/static-pages---dynamic--pages.-How-to-have-the-same-layout-tp21840098p21854201.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: static pages & dynamic pages. How to have the same layout
simply have a generic StaticContentPage that can load static content from anywhere. -igor On Thu, Feb 5, 2009 at 7:53 AM, Vika wrote: > > > kinabalu wrote: >> >> Can you elaborate >> on your current architecture so we can let you know how Wicket can >> achieve this? >> > > There are two categories pages on the site. > 1) dynamic content - jsp/servlet > 2) static content - html > > Both categories of pages only display the "content". Navigation bar, header > and footer are added to both categories of pages using sitemesh (servlet > filter). So what should happen to the static html pages if i want to switch > from using jsp/servlet to wicket ? Static content html pages are edited by > someone who is not a programmer and I would not want to put them together > with java classes. It sounds like i could keep using sitemesh and it should > still work. However is there a better way of doing it ? > > thanks > > Vicky > > > > -- > View this message in context: > http://www.nabble.com/static-pages---dynamic--pages.-How-to-have-the-same-layout-tp21840098p21854201.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: static pages & dynamic pages. How to have the same layout
Vicky, Take a look at http://www.wicket-library.com/wicket-examples/staticpages/ too. Regards - Cemal http://www.jWeekend.co.uk jWeekend Vika wrote: > > > kinabalu wrote: >> >> Can you elaborate >> on your current architecture so we can let you know how Wicket can >> achieve this? >> > > There are two categories pages on the site. > 1) dynamic content - jsp/servlet > 2) static content - html > > Both categories of pages only display the "content". Navigation bar, > header and footer are added to both categories of pages using sitemesh > (servlet filter). So what should happen to the static html pages if i > want to switch from using jsp/servlet to wicket ? Static content html > pages are edited by someone who is not a programmer and I would not want > to put them together with java classes. It sounds like i could keep using > sitemesh and it should still work. However is there a better way of doing > it ? > > thanks > > Vicky > > > > -- View this message in context: http://www.nabble.com/static-pages---dynamic--pages.-How-to-have-the-same-layout-tp21840098p21858146.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: static pages & dynamic pages. How to have the same layout
For my static pages, I use markup inheritance (as I do with all the other pages) so that I have zero replication of layouts... This makes it very simple.. Of course theres a little performance overhead but for me it does not matter.. Application mainentaince are whats most important in my case. regards Nino Nino Martinez wrote: Im actually using that exact approach..I think it's somewhat ok, because it brings continuity to the architecture... Vika wrote: Hi, I am completely new to Wicket and trying to decide if this is something I would want to use for my project. My website has some static and some dynamic pages that have to share the same look. Currently I am using SiteMesh to achieve this. Can I accomplish this with Wicket without having to write a dummy java class for every static html page ? thank you in advance Vicky - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: static pages & dynamic pages. How to have the same layout
Thank you for the responses! I am trying to add a static link (equivalent to "Hello World as a Static Page" in the example) to my test page but running into problems. Is there a way for me to get a complete .war file for this example? If not, could anyone clarify where on the file system docs/hello.html should be located ? My link points to http://poema2.gsfc.nasa.gov/quickstart/app/docs/hello.html i tried these variations 1) ~tomcat/webapps/quickstart/docs/hello.html 2) ~tomcat/webapps/quickstart/classes/docs/hello.html 3) ~tomcat/webapps/quickstart/WEB-INF/docs/hello.html but I keep getting 404 error. servlet mapping in my web.hml: quickstart /app/* thanks Vicky jWeekend wrote: > > Vicky, > > Take a look at http://www.wicket-library.com/wicket-examples/staticpages/ > too. > > Regards - Cemal > http://www.jWeekend.co.uk jWeekend > > > Vika wrote: >> >> >> kinabalu wrote: >>> >>> Can you elaborate >>> on your current architecture so we can let you know how Wicket can >>> achieve this? >>> >> >> There are two categories pages on the site. >> 1) dynamic content - jsp/servlet >> 2) static content - html >> >> Both categories of pages only display the "content". Navigation bar, >> header and footer are added to both categories of pages using sitemesh >> (servlet filter). So what should happen to the static html pages if i >> want to switch from using jsp/servlet to wicket ? Static content html >> pages are edited by someone who is not a programmer and I would not want >> to put them together with java classes. It sounds like i could keep using >> sitemesh and it should still work. However is there a better way of doing >> it ? >> >> thanks >> >> Vicky >> >> >> >> > > -- View this message in context: http://www.nabble.com/static-pages---dynamic--pages.-How-to-have-the-same-layout-tp21840098p21919005.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: static pages & dynamic pages. How to have the same layout
Thank you for the responses. I am still struggling with this and could use more help. Here is where i stand right now. in Aplication.java init() mount(new URIRequestTargetUrlCodingStrategy("/docs") { @Override public IRequestTarget decode(RequestParameters requestParameters) { String path = "/app/" + getURI(requestParameters); return new PageRequestTarget(new StaticPage(new WebExternalResourceRequestTarget(path))); } }); in StaicPage.java public StaticPage(WebExternalResourceRequestTarget staticResource) { String staticResourceContent = ""; try { staticResourceContent = convertStreamToString(staticResource.getResourceStream().getInputStream()); } catch (ResourceStreamNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } add(new MultiLineLabel("staticContent", staticResourceContent)); } --- Here is what i get in the browser when click on static link: http://www.w3.org/TR/html4/loose.dtd";> Insert title here this is a test This is in the footer -- What I would really want is to be able to extract some html tags from the static page (title, body and meta) and add them to my StaticPage separately rather then add raw html. Any suggestions on how to do that ? thanks Vicky jWeekend wrote: > > Vicky, > > Take a look at http://www.wicket-library.com/wicket-examples/staticpages/ > too. > > Regards - Cemal > http://www.jWeekend.co.uk jWeekend > > > Vika wrote: >> >> >> kinabalu wrote: >>> >>> Can you elaborate >>> on your current architecture so we can let you know how Wicket can >>> achieve this? >>> >> >> There are two categories pages on the site. >> 1) dynamic content - jsp/servlet >> 2) static content - html >> >> Both categories of pages only display the "content". Navigation bar, >> header and footer are added to both categories of pages using sitemesh >> (servlet filter). So what should happen to the static html pages if i >> want to switch from using jsp/servlet to wicket ? Static content html >> pages are edited by someone who is not a programmer and I would not want >> to put them together with java classes. It sounds like i could keep using >> sitemesh and it should still work. However is there a better way of doing >> it ? >> >> thanks >> >> Vicky >> >> >> >> > > -- View this message in context: http://www.nabble.com/static-pages---dynamic--pages.-How-to-have-the-same-layout-tp21840098p21938889.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org