Re: Wicket AJAX vs Echo AJAX
wicket's ajax requirements are somewhat unique, thus we have our own ajax implementation. there is a dojo integration in wicket-stuff if you want to use dojo components, but beware it is not supported by the wicket core team. -igor On 10/12/07, Chris Colman [EMAIL PROTECTED] wrote: Short answer : You do not have to write a single line of javascriptcode to use wicket ajax behaviors. This is already done for you. Great! Regarding browser differences, I belive they are handled(by wicket-ajax). AFAIK in beta 4 even safari works:) Another question: How does Dojo fit into Wicket? Is it an optional extra or does Wicket 'employ' it to implement AJAX? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HOWTO - update models in chain (push or pull)
Ahh. Ok. I can set the personpnel its model by calling orderpage extends webpage { public orderpage(IModel order) { add(new personpanel(shipto, new propertymodel(order,shipto)); } } invoicepage extends webpage { public invoicepage(IModel invoice) { add(new personpanel(billto, new propertymodel(invoice,billto)); } } So reusing of person component is save. Lets assume the order contains a person which contains an adress. I can access it with order.getShipTo().getAdress(). I add the model for adesspanel the same way as for personpanel above. My question is if the order will be exchanged, will the subsequent adress-model be refreshed to? Isn't this model referencing the old adress in old order-model? Thanks having so much patience for me Per - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No WebApplicationContext found: no ContextLoaderListener registered?
Then just wait til you want to integrate with jpa / hibernate. Then messages are equally poor. And at 5am nothing makes sense:) Tauren Mills wrote: Disregard this message. It turns out my war was missing some jar files. It was an issue of I'm just stupid because I'm still working at 5am and can't think straight. To bad the error message wasn't more intuitive. Oh well. Tauren On 10/12/07, Tauren Mills [EMAIL PROTECTED] wrote: This may not be specifically wicket related, but I'm stuck and am hoping someone else has dealt with this before. I'm not even sure what these errors mean. I've got a wicket/spring app that runs just fine within Eclipse using Jetty. But I'm attempting to deploy its war to Resin 3.1.0, it doesn't run. I get this exception: java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? - 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: HOWTO - update models in chain (push or pull)
Maybe im a bit swing-oriented. There we don't create always new page and panel instances. Instead we reuse the created view instances and exchange simply the model / models. So if (as an example) i change the order (while navigating thru all orders) the related adress will change to. So i could always create the whole page for the new order again or exchange the model. Thanks Per - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I change the label/text for the wizard buttons?
Thanks :-) Kent Tong wrote: lizz wrote: How do I change the label on the previous, next and finish buttons in the wizard? I would like to change the label of the FinishButton to save. In your .properties file, add: org.apache.wicket.extensions.wizard.next=Proceed org.apache.wicket.extensions.wizard.previous=Go back org.apache.wicket.extensions.wizard.finish=Save -- View this message in context: http://www.nabble.com/How-do-I-change-the-label-text-for-the-wizard-buttons--tf4543907.html#a13187240 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: HOWTO - update models in chain (push or pull)
I tried the code below. Personpanel / model looks similar to orderpanel / model. OrderFactory2 creates another order with other data (quick and dirty). But the display of order is not changing. Why is this not working, if i share the model? public HomePage(final PageParameters parameters) { OrderModel m = OrderModelFactory.create(); IModel model = new CompoundPropertyModel(m); setModel(model); Panel pnlOrder = new OrderPanel(pnlOrder, m.getOrder()); pnlOrder.setOutputMarkupId(true); add(pnlOrder); Panel pnlShipTo = new PersonPanel(pnlShipTo, m.getShipTo()); pnlShipTo.setOutputMarkupId(true); add(pnlShipTo); add(new AjaxLink(lnkNext) { public void onClick(AjaxRequestTarget target) { OrderModel m2 = OrderModelFactory2.create(); HomePage.this.setModelObject(m2); target.addComponent(HomePage.this.get(pnlOrder)); target.addComponent(HomePage.this.get(pnlShipTo)); } }); } public class OrderPanel extends Panel { /** * Constructor of OrderPanel. */ public OrderPanel(String id, Order m) { super(id); add(new Label(orderId, new PropertyModel(m, orderId))); add(new Label(orderDate, new PropertyModel(m, orderDate))); } } public class OrderModel implements Serializable { private Order order = null; public Order getOrder() { return order; } public void setOrder(Order pOrder) { order = pOrder; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Server cannot find /app url after migration to 1.3 filter
Hi , I had a strong suspicion that WicketFilter (from 1.3 b3) not compatible with Resin ( I tried 2.1.17 and latest 3.0.24 ) I can install a very simple filter , just doing this : public void doFilter (...) System.out.println(before doFilter); chain.doFilter(req, res); System.out.println(after doFilter); And mount this test filter to /* , it works. That means it can intercept http://foo.bar.com/servlet/foo.bar.test.TestServlet; , and print the messages. But WicketFilter just cannot work correctly with Resin_with_apache. I have to manually assign to port 8080 to make the filter work. Anybody successfully install WicketFilter with Resin_with_Apache (mod_caucho.so) ? (not standalone resin) 2007/10/3, smallufo [EMAIL PROTECTED]: 2007/10/3, David Bernard [EMAIL PROTECTED]: Have you try: * to set port to 80 instead of 8080 Port 80 is listened by apache httpd. I need apache httpd to serve large amount of static contents. Yes, and resin.conf isn't run as part of Apache? Apache (port 80) - srun(6802) Resin is a module of apache httpd , through this module : /usr/lib/httpd/modules/mod_caucho.so Through this module , resin will try to intercept matched URL and redirect to resin. Sorry , no other idea, except may be create an dummyServlet mapped to /app in web.xml. Have you the same problem with resin 3.x ? That's OK , I can set up a reverse-proxy to solve this problem , won't expose port 8080 ... As to resin 3.x , I have a lot of webapps , and I am afraid there will be some incompatibilities. This will be a big task I'll try it in the future , not sure..
Re: Server cannot find /app url after migration to 1.3 filter
2007/10/13, smallufo [EMAIL PROTECTED]: Hi , I had a strong suspicion that WicketFilter (from 1.3 b3) not compatible with Resin ( I tried 2.1.17 and latest 3.0.24 ) I just grabbed the latest 1.3 b4 , the problem remains. I also found that the following filter-mapping works : filter filter-name=test filter-class=foo.bar.TestFilter/ filter-mapping filter-name=test url-pattern=/* / while the following doesn't work : filter filter-name=wicket filter-class= org.apache.wicket.protocol.http.WicketFilter init-param applicationClassName=foo.bar.MyApplication/ init-param configuration=DEVELOPMENT/ /filter filter-mapping filter-name=wicket url-pattern=/app/*/ When I try to connect to foo.bar.com:8080/app , it throws : java.lang.IllegalArgumentException: Error initializing WicketFilter - you have no filter-mapping element with a url-pattern that uses filter: wicket It seems that WicketFilter cannot parse @filter-name and @url-pattern of filter-mapping tag. (But it can correctly parse @filter-name , @filter-class of filter tag.) I have to change it to : filter-mapping filter-namewicket/filter-name url-pattern/app/*/url-pattern /filter-mapping But 1.3b4 's filter still cannot intercept /app at port 80.
Re: Is Wicket suitable for my CMS?
Nino.Martinez wrote: Hi pierobo I think you need to take a look at listview.. I know you want to let the user just plainly design the page but what if you gave them a more graphical editor. That way you could have a general page that had a listview and added all the components the user selected on his editor page.. Problem really are that theres a one to one mapping between html and wicket components. This also is the case with listview, but in your listview you can have one or more placeholders that will be populated runtime.. If you do this in conjuction with giving the user the posibility for uploading special stylesheets then it should be the same i guess? What do you say? regards Nino Thanks for your reply, Nino, but the main features of my CMS are: 1) A structured content capability, with an editor to define the model 2) The freedom of layout In these times of Ajax and CSS, people love to do their layout. This is the advantages I would provide, else there is no reason to do the (n+1)-th CMS... Surely there are valid reasons for the actual Wicket structure, but I think that a runtime-inspectable html page not bound to a Java counterpart would be very useful. Bye -- View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13188380 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: HOWTO - update models in chain (push or pull)
Sorry for my stupidity. I think i got it now. I have to provide an accessor chain based on the page model assigned. So i don't have to get the objects in the model. Instead i have to specify the path to object'. Code below is working now. public HomePage(final PageParameters parameters) { OrderModel m = OrderModelFactory.create(); IModel model = new CompoundPropertyModel(m); setModel(model); Panel pnlOrder = new OrderPanel(pnlOrder, new PropertyModel(model, order)); pnlOrder.setOutputMarkupId(true); add(pnlOrder); Panel pnlShipTo = new PersonPanel(pnlShipTo, new PropertyModel(model, shipTo)); pnlShipTo.setOutputMarkupId(true); add(pnlShipTo); add(new AjaxLink(lnkNext) { public void onClick(AjaxRequestTarget target) { OrderModel m2 = OrderModelFactory2.create(); HomePage.this.setModelObject(m2); target.addComponent(HomePage.this.get(pnlOrder)); target.addComponent(HomePage.this.get(pnlShipTo)); } }); } public class OrderPanel extends Panel { /** * Constructor of OrderPanel. */ public OrderPanel(String id, IModel m) { super(id); add(new Label(orderId, new PropertyModel(m, orderId))); add(new Label(orderDate, new PropertyModel(m, orderDate))); } } public class OrderModel implements Serializable { private Order order = null; public Order getOrder() { return order; } public void setOrder(Order pOrder) { order = pOrder; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RFE: DataTable colgroup
[https://issues.apache.org/jira/browse/WICKET-1069] Hi! I want to suggest an enhancement for the DataTable extension. Right now it's only possible to style columns (width, alignment, color etc.) via stylesheets. This has some not so nice implications IMHO: - You have to extend the IStyledColumn to return the proper CSS class. - You have to add a bunch of CSS classes to get the proper styles. - You have redundancy in HTML output - which isn't necessary. This is actually what colgroupcol/colgroup is meant to solve. My suggestion: Adding a 'addColGroup( ColGroup cg )'-feature, which actually lets you add x ColGroups with n Cols on which you can use AttributeModifiers to have your styles/classes/width-Attributes added. A quick implementation would be this: ---[ColGroup.java]-- import java.util.List; import org.apache.wicket.behavior.IBehavior; import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractToolbar; import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.repeater.RepeatingView; public class ColGroup extends AbstractToolbar { private static final long serialVersionUID = 1L; private int numCols; private Col[] cols; public ColGroup( DataTable datatable, int numCols ) { super( datatable ); this.numCols = numCols; } public void onBeforeRender() { if( !hasBeenRendered() ) { WebMarkupContainer colgroup = new WebMarkupContainer( colgroup ); for( IBehavior b : (ListIBehavior) getBehaviors() ) colgroup.add( b ); setRenderBodyOnly( true ); removeAll(); add( colgroup ); RepeatingView colgroupCols = new RepeatingView( elements ); colgroup.add( colgroupCols ); for( Col column : getCols() ) { WebMarkupContainer item = new WebMarkupContainer( colgroupCols.newChildId() ); colgroupCols.add( item ); item.add( column ); } } super.onBeforeRender(); } public final Col[] getCols( ) { if( cols == null ) { cols = new Col[numCols]; for( int i = 0; i numCols; i++ ) cols[i] = new Col(); } return(cols); } public final class Col extends WebMarkupContainer { private static final long serialVersionUID = 1L; private Col() { super( col ); } } } ---[/ColGroup.java]-- ---[ColGroup.html]-- wicket:panel colgroup wicket:id=colgroup wicket:container wicket:id=elementscol wicket:id=col//wicket:container /colgroup /wicket:panel ---[/ColGroup.html]-- Usage: ColGroup colgroup = new ColGroup( datatable, 4 ); colgroup.add( new SimpleAttributeModifier( style, border: solid 1px green; ) ); Col[] cols = colgroup.getCols(); cols[0].add( new SimpleAttributeModifier( width, 10% ) ); cols[1].add( new SimpleAttributeModifier( width, 35% ) ); cols[2].add( new SimpleAttributeModifier( width, 45% ) ); cols[3].add( new SimpleAttributeModifier( width, 10% ) ); datatable.addColGroup( colgroup ); Any thoughts? Regards, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is Wicket suitable for my CMS?
Hi, I think u might consider using getVariation()of WebPage class and dynamically generated htmls along with some tricks in the java code :). Hope it helps. Shams - Original Message From: pierobo [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Saturday, October 13, 2007 12:26:11 PM Subject: Re: Is Wicket suitable for my CMS? Nino.Martinez wrote: Hi pierobo I think you need to take a look at listview.. I know you want to let the user just plainly design the page but what if you gave them a more graphical editor. That way you could have a general page that had a listview and added all the components the user selected on his editor page.. Problem really are that theres a one to one mapping between html and wicket components. This also is the case with listview, but in your listview you can have one or more placeholders that will be populated runtime.. If you do this in conjuction with giving the user the posibility for uploading special stylesheets then it should be the same i guess? What do you say? regards Nino Thanks for your reply, Nino, but the main features of my CMS are: 1) A structured content capability, with an editor to define the model 2) The freedom of layout In these times of Ajax and CSS, people love to do their layout. This is the advantages I would provide, else there is no reason to do the (n+1)-th CMS... Surely there are valid reasons for the actual Wicket structure, but I think that a runtime-inspectable html page not bound to a Java counterpart would be very useful. Bye -- View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13188380 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/
Re: Is Wicket suitable for my CMS?
Yes, but I dont see how this is not possible done with the solution I suggest, unless you actually want the user to produce the html file themselves...? -Nino pierobo wrote: Nino.Martinez wrote: Hi pierobo I think you need to take a look at listview.. I know you want to let the user just plainly design the page but what if you gave them a more graphical editor. That way you could have a general page that had a listview and added all the components the user selected on his editor page.. Problem really are that theres a one to one mapping between html and wicket components. This also is the case with listview, but in your listview you can have one or more placeholders that will be populated runtime.. If you do this in conjuction with giving the user the posibility for uploading special stylesheets then it should be the same i guess? What do you say? regards Nino Thanks for your reply, Nino, but the main features of my CMS are: 1) A structured content capability, with an editor to define the model 2) The freedom of layout In these times of Ajax and CSS, people love to do their layout. This is the advantages I would provide, else there is no reason to do the (n+1)-th CMS... Surely there are valid reasons for the actual Wicket structure, but I think that a runtime-inspectable html page not bound to a Java counterpart would be very useful. Bye - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is Wicket suitable for my CMS?
Nino.Martinez wrote: Yes, but I dont see how this is not possible done with the solution I suggest, unless you actually want the user to produce the html file themselves...? -Nino If you mean an editor I could write to manage authoring of user's pages, it is not what I need. There are plenty of CMS that do that, much better then I could... Yes, I would let the users (power users) write the pages themselves. And then put wicket markup when they want to wire the structured data. This is reasonable for an html designer, thanks to Wicket's simple syntax. Yet, I could provide blocks of grouped data. E.g. for a ecommerce page, with a model Order 1--N Product, I could provide a Wicket component that shows the list of Products, wired with actual page's order. For now, it's only brainstormig. I've the working persistence layer, and now I'm evaluating a presentation framework. So, further ideas are welcome :-) This is a possible approach with Wicket that came to my mind, but I'm a newbie of it: HTML written by user take place in a given subdir. When a page from this subdir is requested, the Wicket filter pass it to the parser, that checks and manage the Wicket components found. Don't know if this task is compatible with actual lifecycle of Wicket pages, and/or its API. Just digging... :working: -- View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13189803 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: Is Wicket suitable for my CMS?
Shams Ali-2 wrote: Hi, I think u might consider using getVariation()of WebPage class and dynamically generated htmls along with some tricks in the java code :). Hope it helps. Shams I need the opposite :-), static HTML pages and dynamic management... If you want, give a look to my last reply to Nino. Thanks for your help -- View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13189884 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: Is Wicket suitable for my CMS?
Then you could maintain a java class corresponding each html file the user can create. When the user saves his html you could store meta information for that html file like what all wicket-panels it uses. Then inisde the java class you can process this meta information and add corresponding panels to your page in java :). Shams On 10/13/07, pierobo [EMAIL PROTECTED] wrote: Shams Ali-2 wrote: Hi, I think u might consider using getVariation()of WebPage class and dynamically generated htmls along with some tricks in the java code :). Hope it helps. Shams I need the opposite :-), static HTML pages and dynamic management... If you want, give a look to my last reply to Nino. Thanks for your help -- View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13189884 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Shams Mahmood
Re: Locale change on Image with Resource results in broken images
Jonas-21 wrote: I think LocalizedImageResource.setSrcAttribute(...) shouldn't reset the resource field if locales (and styles) don't match, since Resource doesn't seem to be locale/style specific (unlike ResourceReference) and cannot be reloaded/recomputed as the commentary suggests if the Image(String id, Resource imageResource) constructor was used. This indeed looks like a bug to me. - -- Kent Tong Wicket tutorials freely available at http://www.agileskills2.org/EWDW -- View this message in context: http://www.nabble.com/Locale-change-on-Image-with-Resource-results-in-broken-images-tf4613589.html#a13190540 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: RFE: DataTable colgroup
I was thinking of implementing colgroup support, but I decided not to. Colgroup as far as i can tell has serious styling limitation, which only allows to specify very reduced subset of css to the colgroup. -Matej On 10/13/07, Jan Kriesten [EMAIL PROTECTED] wrote: [https://issues.apache.org/jira/browse/WICKET-1069] Hi! I want to suggest an enhancement for the DataTable extension. Right now it's only possible to style columns (width, alignment, color etc.) via stylesheets. This has some not so nice implications IMHO: - You have to extend the IStyledColumn to return the proper CSS class. - You have to add a bunch of CSS classes to get the proper styles. - You have redundancy in HTML output - which isn't necessary. This is actually what colgroupcol/colgroup is meant to solve. My suggestion: Adding a 'addColGroup( ColGroup cg )'-feature, which actually lets you add x ColGroups with n Cols on which you can use AttributeModifiers to have your styles/classes/width-Attributes added. A quick implementation would be this: ---[ColGroup.java]-- import java.util.List; import org.apache.wicket.behavior.IBehavior; import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractToolbar; import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.repeater.RepeatingView; public class ColGroup extends AbstractToolbar { private static final long serialVersionUID = 1L; private int numCols; private Col[] cols; public ColGroup( DataTable datatable, int numCols ) { super( datatable ); this.numCols = numCols; } public void onBeforeRender() { if( !hasBeenRendered() ) { WebMarkupContainer colgroup = new WebMarkupContainer( colgroup ); for( IBehavior b : (ListIBehavior) getBehaviors() ) colgroup.add( b ); setRenderBodyOnly( true ); removeAll(); add( colgroup ); RepeatingView colgroupCols = new RepeatingView( elements ); colgroup.add( colgroupCols ); for( Col column : getCols() ) { WebMarkupContainer item = new WebMarkupContainer( colgroupCols.newChildId() ); colgroupCols.add( item ); item.add( column ); } } super.onBeforeRender(); } public final Col[] getCols( ) { if( cols == null ) { cols = new Col[numCols]; for( int i = 0; i numCols; i++ ) cols[i] = new Col(); } return(cols); } public final class Col extends WebMarkupContainer { private static final long serialVersionUID = 1L; private Col() { super( col ); } } } ---[/ColGroup.java]-- ---[ColGroup.html]-- wicket:panel colgroup wicket:id=colgroup wicket:container wicket:id=elementscol wicket:id=col//wicket:container /colgroup /wicket:panel ---[/ColGroup.html]-- Usage: ColGroup colgroup = new ColGroup( datatable, 4 ); colgroup.add( new SimpleAttributeModifier( style, border: solid 1px green; ) ); Col[] cols = colgroup.getCols(); cols[0].add( new SimpleAttributeModifier( width, 10% ) ); cols[1].add( new SimpleAttributeModifier( width, 35% ) ); cols[2].add( new SimpleAttributeModifier( width, 45% ) ); cols[3].add( new SimpleAttributeModifier( width, 10% ) ); datatable.addColGroup( colgroup ); Any thoughts? Regards, --- Jan. - 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: RFE: DataTable colgroup
hi matej, I was thinking of implementing colgroup support, but I decided not to. Colgroup as far as i can tell has serious styling limitation, which only allows to specify very reduced subset of css to the colgroup. might be, but it's a nice feature for just styling col-width and col-alignment. actually, this would be an optional add-on, no replacement for IStyledColumn. since it is pretty easy to implement, what are the pitfalls when have it added? best regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is Wicket suitable for my CMS?
for what it is worth i will be creating a cms in the near future using wicket. my idea is simple. the cms is a single wicket page. the users have a special tag they use to define dynamic components like cms:component type=foo param1=param2/. the page itself has a single repeater, prior to rendering it takes the markup and splits it into chunks of static and component definitions. for a static piece the repeater gets a label, for a component definition the repeater gets a new component instantiated. no need for getvariation/java classes per page/ and all that funky stuff that is made for regular applications. -igor On 10/13/07, pierobo [EMAIL PROTECTED] wrote: Nino.Martinez wrote: Hi pierobo I think you need to take a look at listview.. I know you want to let the user just plainly design the page but what if you gave them a more graphical editor. That way you could have a general page that had a listview and added all the components the user selected on his editor page.. Problem really are that theres a one to one mapping between html and wicket components. This also is the case with listview, but in your listview you can have one or more placeholders that will be populated runtime.. If you do this in conjuction with giving the user the posibility for uploading special stylesheets then it should be the same i guess? What do you say? regards Nino Thanks for your reply, Nino, but the main features of my CMS are: 1) A structured content capability, with an editor to define the model 2) The freedom of layout In these times of Ajax and CSS, people love to do their layout. This is the advantages I would provide, else there is no reason to do the (n+1)-th CMS... Surely there are valid reasons for the actual Wicket structure, but I think that a runtime-inspectable html page not bound to a Java counterpart would be very useful. Bye -- View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13188380 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: Is Wicket suitable for my CMS?
igor.vaynberg wrote: for what it is worth i will be creating a cms in the near future using wicket. my idea is simple. the cms is a single wicket page. the users have a special tag they use to define dynamic components like cms:component type=foo param1=param2/. the page itself has a single repeater, prior to rendering it takes the markup and splits it into chunks of static and component definitions. for a static piece the repeater gets a label, for a component definition the repeater gets a new component instantiated. no need for getvariation/java classes per page/ and all that funky stuff that is made for regular applications. -igor So you can have multiple html pages managed only by one Java class? That's could be what I need. I all the examples I looked on Wicket site, I never found an example like this. Should I look to components to do this? -- View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13191210 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: Is Wicket suitable for my CMS?
Shams Imam wrote: Then you could maintain a java class corresponding each html file the user can create. When the user saves his html you could store meta information for that html file like what all wicket-panels it uses. Then inisde the java class you can process this meta information and add corresponding panels to your page in java :). Shams -- Shams Mahmood Do you mean that I could inspect the pages at runtime and store all custom tag as a metadata? This is interesting, but since that pages have not a bound Java class, how could I manage these? Sorry if these questions seem silly to you Wicket users :blush: -- View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13191270 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: HOWTO - update models in chain (push or pull)
I'm attempting to accomplish the same thing, and am actually maintaining the model in the user's session. When I need to have two panels on the page which show a different piece of the same model, I actually pass in the same model. To handle Ajax updating of both panels, I call a method on the model and pass in the component that initiated the change, and then walk the page hierarchy looking for anyone who cares that the model changed so they can add themselves to the AjaxRequestTarget. See: http://www.nabble.com/Updating-distant-%28unrelated%29-components-via-Ajax-when-a-shared-model-changes-tf4610276.html The resulting programming model feels a lot like Swing, in that I can set something in a high level at the model and have all related components repaint, but it's still using the pull model of Wicket. The code I posted in the referenced thread basically accomplishes what is handled for you in Swing, which is having the framework repaint the widgets for you without having to explicitly look them up and say 'repaint yourself'. Does anyone have any thoughts on whether this will work long-term in Wicket? Thanks, Matt Newgro wrote: Maybe im a bit swing-oriented. There we don't create always new page and panel instances. Instead we reuse the created view instances and exchange simply the model / models. So if (as an example) i change the order (while navigating thru all orders) the related adress will change to. So i could always create the whole page for the new order again or exchange the model. Thanks Per - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/HOWTO---update-models-in-chain-%28push-or-pull%29-tf4612233.html#a13191539 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: Is Wicket suitable for my CMS?
at its core all a cms does is display some user generated content. that can be accomplished by simply doing this: class cmspage extends webpage { public cmspage(pageparameters params) { long pageid=params.getpageid(); string html=database.loadpage(pageid); add(new label(content, html).setescapemarkupstrings(true)); } } htmlbody wicket:id=content/body/html now that one page can display any html out of database -igor On 10/13/07, pierobo [EMAIL PROTECTED] wrote: igor.vaynberg wrote: for what it is worth i will be creating a cms in the near future using wicket. my idea is simple. the cms is a single wicket page. the users have a special tag they use to define dynamic components like cms:component type=foo param1=param2/. the page itself has a single repeater, prior to rendering it takes the markup and splits it into chunks of static and component definitions. for a static piece the repeater gets a label, for a component definition the repeater gets a new component instantiated. no need for getvariation/java classes per page/ and all that funky stuff that is made for regular applications. -igor So you can have multiple html pages managed only by one Java class? That's could be what I need. I all the examples I looked on Wicket site, I never found an example like this. Should I look to components to do this? -- View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13191210 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: Updating distant (unrelated) components via Ajax when a shared model changes
FWIW, I had to make an update to AjaxAwareModel and AjaxModelAware. AjaxModelAware now returns a boolean, which signifies whether the AjaxAwareModel should continue to traverse deeper in the hierarchy. If the parent component intends to re-render or replace its children (such as in the case where it contains a refreshingview which will recreate all children), and therefore does not want its children to add themselves to the ajaxrequesttarget, then it should return false to stop deeper traversal. New visitor in AjaxAwareModel: page.visitChildren(new IVisitor(){ public Object component(Component component) { if( component instanceof AjaxModelAware ){ log.debug(...Notifying: + component.getClassRelativePath() ); if( ((AjaxModelAware)component).notifyModelChanged(target, AjaxAwareModel.this) ) return CONTINUE_TRAVERSAL; } return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER; } }); New method signature in AjaxModelAware: public boolean notifyModelChanged(AjaxRequestTarget target, AjaxAwareModel model); -- View this message in context: http://www.nabble.com/Updating-distant-%28unrelated%29-components-via-Ajax-when-a-shared-model-changes-tf4610276.html#a13192400 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Custom Content
I'm attempting to load the markup for a page based on values that are available when the page is constructed. For example, I want to be able to pass a parameter into a page and then lookup the name of the content file in my database based on this parameter and then have the page load and display the appropriate content. I've tried looking at the custom resource loading example in the examples package but that seems to work by loading content based on the class name and I didn't see a way to extend it. I've tried overwriting the newMarkupResourceStream method, but it seems to be called before the constructor is called as well as before the session is available. Any suggestions? j
Re: Custom Content
stick a content into a label and call label.setescapemodelstrings(false) -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: I'm attempting to load the markup for a page based on values that are available when the page is constructed. For example, I want to be able to pass a parameter into a page and then lookup the name of the content file in my database based on this parameter and then have the page load and display the appropriate content. I've tried looking at the custom resource loading example in the examples package but that seems to work by loading content based on the class name and I didn't see a way to extend it. I've tried overwriting the newMarkupResourceStream method, but it seems to be called before the constructor is called as well as before the session is available. Any suggestions? j
Re: Custom Content
Jeremy Levy-2 wrote: I want to be able to pass a parameter into a page and then lookup the name of the content file in my database based on this parameter and then have the page load and display the appropriate content. What is the content file you want to display? Is it just HTML? If so, try: String html = myBusinessMethodToGetContent(someParam); add( new Label(customContent,html).setEscapeModelStrings(false) ); -- View this message in context: http://www.nabble.com/Custom-Content-tf4619447.html#a13192982 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: Is Wicket suitable for my CMS?
Igor has already given a reply which is probably the best way to do it in wicket. I agree it is much simpler solution to what I was thinking. The reason I fell in love, and still am, with wicket was the ability to separate html and java. So i do not want to be generating html from inside java aka raw servlet programming. However if you still need to be able to support dynamic components (which will be created by the user), here is what I was thinking: Say I have a model called Customer { firstName, lastName, emailAddress} which I am able to get a reference of in my page/panel/component. Now if I am giving a user to determine the way he wants to display the information of this customer, she could choose many ways. Two for example would be: View-1 Name: lastName, firstName Contact: emailAddress View-2 a href=mailto:emailAddress;firstName/a Now what I was suggesting is allow the user to input her html in, some manner and store meta information of the hierarchy of java contents, database could be a contender. The I could have a mechanism in the java code to understand this meta info and add components appropriately in the java class. I agree this could be a complicated way of doing things, but I am only stating what I was thinking. Shams - Original Message From: pierobo [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Saturday, October 13, 2007 6:32:35 PM Subject: Re: Is Wicket suitable for my CMS? Shams Imam wrote: Then you could maintain a java class corresponding each html file the user can create. When the user saves his html you could store meta information for that html file like what all wicket-panels it uses. Then inisde the java class you can process this meta information and add corresponding panels to your page in java :). Shams -- Shams Mahmood Do you mean that I could inspect the pages at runtime and store all custom tag as a metadata? This is interesting, but since that pages have not a bound Java class, how could I manage these? Sorry if these questions seem silly to you Wicket users :blush: -- View this message in context: http://www.nabble.com/Is-Wicket-suitable-for-my-CMS--tf4536847.html#a13191270 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/
Re: Custom Content
Will that work if the content includes a form? I would like to be able to have a page which includes a form but have a couple of different versions of the HTML and be able to select the one I want based on the param... In otherwords the HTML will contain form elements with wicket:id attributes which I want to be associated with elements I've added in the form class. The reason is I want to have radically different layouts for a page/form which I don't want to have to update any java code to enable, only add the new HTML file and update my database. Swapping in different style sheets which would seem to make the most sense isn't going to work in this case.. j On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: stick a content into a label and call label.setescapemodelstrings(false) -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: I'm attempting to load the markup for a page based on values that are available when the page is constructed. For example, I want to be able to pass a parameter into a page and then lookup the name of the content file in my database based on this parameter and then have the page load and display the appropriate content. I've tried looking at the custom resource loading example in the examples package but that seems to work by loading content based on the class name and I didn't see a way to extend it. I've tried overwriting the newMarkupResourceStream method, but it seems to be called before the constructor is called as well as before the session is available. Any suggestions? j
Re: Custom Content
see IMarkupResourceStreamProvider and IMarkupCacheKeyProvider. make that page implement both and suck the markup in from the db. -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: Will that work if the content includes a form? I would like to be able to have a page which includes a form but have a couple of different versions of the HTML and be able to select the one I want based on the param... In otherwords the HTML will contain form elements with wicket:id attributes which I want to be associated with elements I've added in the form class. The reason is I want to have radically different layouts for a page/form which I don't want to have to update any java code to enable, only add the new HTML file and update my database. Swapping in different style sheets which would seem to make the most sense isn't going to work in this case.. j On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: stick a content into a label and call label.setescapemodelstrings(false) -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: I'm attempting to load the markup for a page based on values that are available when the page is constructed. For example, I want to be able to pass a parameter into a page and then lookup the name of the content file in my database based on this parameter and then have the page load and display the appropriate content. I've tried looking at the custom resource loading example in the examples package but that seems to work by loading content based on the class name and I didn't see a way to extend it. I've tried overwriting the newMarkupResourceStream method, but it seems to be called before the constructor is called as well as before the session is available. Any suggestions? j
Re: Custom Content
Igor, I was afraid you were going to say that, we are still on 1.2.5 and I think those are 1.3 features :(. We aren't planning to upgrade until it's released. Can you think of any alternatives? I've divided the entry page and the form page into two separate pages, the first page figures out which html file to use, stores it in a static hastable somewhere else, using the sessionid as the key and forwards to the page that loads the HTML file. ( I know thats very unwickety, not to mention hacky). I then load the value out of the hashtable in newMarkupResourceStream and that works. Only issue is that newMarkupResourceStream is only called on the first time the page loads when it's compiled with the HTML i suppose. Is there any way to prevent that for one class / page? J On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: see IMarkupResourceStreamProvider and IMarkupCacheKeyProvider. make that page implement both and suck the markup in from the db. -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: Will that work if the content includes a form? I would like to be able to have a page which includes a form but have a couple of different versions of the HTML and be able to select the one I want based on the param... In otherwords the HTML will contain form elements with wicket:id attributes which I want to be associated with elements I've added in the form class. The reason is I want to have radically different layouts for a page/form which I don't want to have to update any java code to enable, only add the new HTML file and update my database. Swapping in different style sheets which would seem to make the most sense isn't going to work in this case.. j On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: stick a content into a label and call label.setescapemodelstrings (false) -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: I'm attempting to load the markup for a page based on values that are available when the page is constructed. For example, I want to be able to pass a parameter into a page and then lookup the name of the content file in my database based on this parameter and then have the page load and display the appropriate content. I've tried looking at the custom resource loading example in the examples package but that seems to work by loading content based on the class name and I didn't see a way to extend it. I've tried overwriting the newMarkupResourceStream method, but it seems to be called before the constructor is called as well as before the session is available. Any suggestions? j
Re: No Page found for component in AjaxRequestTarget.detach()
Please create a jira issue, looks like a wicket bug to me. -Matej On 10/13/07, MattClark [EMAIL PROTECTED] wrote: Hi all, I'm running into an issue, and have described the problem below. Am I doing something invalid? * Assume the following hierarchy: Page - Panel - RefreshingView - ComponentA * ComponentA receives an Ajax event (onClick(AjaxRequestTarget)) * ComponentA eventually adds Panel to the AjaxRequestTarget * Refreshing view is re-rendered as a part of the ajax request cycle, generating a ComponentA(prime). Original ComponentA is now no longer a part of the page hierarchy. * During the detach phase, the following code in AjaxRequestTarget is called: // detach the page if it was updated if (markupIdToComponent.size() 0) { final Component component = (Component)markupIdToComponent.values().iterator().next(); component.getPage().detach(); } * The object which comes out of the list (iterator().next()) appears to be ComponentA, which is no longer in the page hierarchy. Therefore component.getPage() fails with No page found for component QUESTION: I can't find anywhere where I explicitly add ComponentA to the request target. Is it implicitly added somewhere in the ajax request cycle because it was the component which received the event? QUESTION: Is what I'm doing invalid? Thanks, Matt -- View this message in context: http://www.nabble.com/No-Page-found-for-component-in-AjaxRequestTarget.detach%28%29-tf4618999.html#a13191716 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: Custom Content
On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: newMarkupResourceStream is only called on the first time the page loads when it's compiled with the HTML i suppose. Is there any way to prevent that for one class / page? not as far as i know, this is why we added IMarkupCacheKeyProvider what you can do is use your own markupresourcestreamprovider, but use it in conjunection with getvariation(). so when you pull out that database id return it from getvariation() and that way you will get one call to your markupresourcestreamprovider for every database id instead of just a single one. -igor J On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: see IMarkupResourceStreamProvider and IMarkupCacheKeyProvider. make that page implement both and suck the markup in from the db. -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: Will that work if the content includes a form? I would like to be able to have a page which includes a form but have a couple of different versions of the HTML and be able to select the one I want based on the param... In otherwords the HTML will contain form elements with wicket:id attributes which I want to be associated with elements I've added in the form class. The reason is I want to have radically different layouts for a page/form which I don't want to have to update any java code to enable, only add the new HTML file and update my database. Swapping in different style sheets which would seem to make the most sense isn't going to work in this case.. j On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: stick a content into a label and call label.setescapemodelstrings (false) -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: I'm attempting to load the markup for a page based on values that are available when the page is constructed. For example, I want to be able to pass a parameter into a page and then lookup the name of the content file in my database based on this parameter and then have the page load and display the appropriate content. I've tried looking at the custom resource loading example in the examples package but that seems to work by loading content based on the class name and I didn't see a way to extend it. I've tried overwriting the newMarkupResourceStream method, but it seems to be called before the constructor is called as well as before the session is available. Any suggestions? j
Re: Stateless page creating session
There is now: https://issues.apache.org/jira/browse/WICKET-1072 On 12 Oct 2007, at 11:28, John Patterson wrote: Is there a JIRA issue for the broken stateless support so I know when to update my application? Cheers, John. On 11 Oct 2007, at 00:57, Matej Knopp wrote: Yeah, it's a bug introduced by me recently. Will look at it ASAP. -Matej On 10/11/07, John Patterson [EMAIL PROTECTED] wrote: Also, the example application stateless is doing the same. When I go to this page http://localhost:8080/wicket-examples/stateless/public/Index/ after restarting my browser I get this a session exists for this client, with session id z4zov2z9j024 go to another stateless page go to a stateful page (triggers session creation if not already done so) Something is going on here. On 10 Oct 2007, at 18:24, John Patterson wrote: Hi, I have created a page and setStatelessHint(true) and made sure all the child components are stateless but an http session is still being created. The method isPageStateless() returns true. Here is the trace where the SEssion is created: com.citikey.site.SessionListener.sessionCreated (SessionListener.java:29) at org.mortbay.jetty.servlet.AbstractSessionManager.addSession (AbstractSessionManager.java:569) at org.mortbay.jetty.servlet.AbstractSessionManager.newHttpSession (AbstractSessionManager.java:414) at org.mortbay.jetty.Request.getSession(Request.java:1005) at org.apache.wicket.protocol.http.AbstractHttpSessionStore.getSession Id( AbstractHttpSessionStore.java:188) at org.apache.wicket.Session.bind(Session.java:415) at org.apache.wicket.Component.beforeRender(Component.java: 855) This code in Component.beforeRenderlooks suspicious: // If any of the components on page is not stateless, we need to bind the session // before we start rendering components, as then jsessionid won't be appended // for links rendered before first stateful component if (isStateless() getSession().isTemporary()) { getSession().bind(); } Cheers, John - 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: Custom Content
Thanks. I see, so if I were to return a random value with getVariation, that would effectively defeat reusing the complied version. Could you give me more details on markupresourcestreamprovider I couldn't find anything like that in the api, what should I extend / implement and how do I use it? j On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: newMarkupResourceStream is only called on the first time the page loads when it's compiled with the HTML i suppose. Is there any way to prevent that for one class / page? not as far as i know, this is why we added IMarkupCacheKeyProvider what you can do is use your own markupresourcestreamprovider, but use it in conjunection with getvariation(). so when you pull out that database id return it from getvariation() and that way you will get one call to your markupresourcestreamprovider for every database id instead of just a single one. -igor J On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: see IMarkupResourceStreamProvider and IMarkupCacheKeyProvider. make that page implement both and suck the markup in from the db. -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: Will that work if the content includes a form? I would like to be able to have a page which includes a form but have a couple of different versions of the HTML and be able to select the one I want based on the param... In otherwords the HTML will contain form elements with wicket:id attributes which I want to be associated with elements I've added in the form class. The reason is I want to have radically different layouts for a page/form which I don't want to have to update any java code to enable, only add the new HTML file and update my database. Swapping in different style sheets which would seem to make the most sense isn't going to work in this case.. j On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: stick a content into a label and call label.setescapemodelstrings (false) -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: I'm attempting to load the markup for a page based on values that are available when the page is constructed. For example, I want to be able to pass a parameter into a page and then lookup the name of the content file in my database based on this parameter and then have the page load and display the appropriate content. I've tried looking at the custom resource loading example in the examples package but that seems to work by loading content based on the class name and I didn't see a way to extend it. I've tried overwriting the newMarkupResourceStream method, but it seems to be called before the constructor is called as well as before the session is available. Any suggestions? j
Re: Custom Content
Okay, I think i figured it out. Using AbstractResourceStream which gets content based on the ids. Thank you. On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: Thanks. I see, so if I were to return a random value with getVariation, that would effectively defeat reusing the complied version. Could you give me more details on markupresourcestreamprovider I couldn't find anything like that in the api, what should I extend / implement and how do I use it? j On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: newMarkupResourceStream is only called on the first time the page loads when it's compiled with the HTML i suppose. Is there any way to prevent that for one class / page? not as far as i know, this is why we added IMarkupCacheKeyProvider what you can do is use your own markupresourcestreamprovider, but use it in conjunection with getvariation(). so when you pull out that database id return it from getvariation() and that way you will get one call to your markupresourcestreamprovider for every database id instead of just a single one. -igor J On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: see IMarkupResourceStreamProvider and IMarkupCacheKeyProvider. make that page implement both and suck the markup in from the db. -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: Will that work if the content includes a form? I would like to be able to have a page which includes a form but have a couple of different versions of the HTML and be able to select the one I want based on the param... In otherwords the HTML will contain form elements with wicket:id attributes which I want to be associated with elements I've added in the form class. The reason is I want to have radically different layouts for a page/form which I don't want to have to update any java code to enable, only add the new HTML file and update my database. Swapping in different style sheets which would seem to make the most sense isn't going to work in this case.. j On 10/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: stick a content into a label and call label.setescapemodelstrings (false) -igor On 10/13/07, Jeremy Levy [EMAIL PROTECTED] wrote: I'm attempting to load the markup for a page based on values that are available when the page is constructed. For example, I want to be able to pass a parameter into a page and then lookup the name of the content file in my database based on this parameter and then have the page load and display the appropriate content. I've tried looking at the custom resource loading example in the examples package but that seems to work by loading content based on the class name and I didn't see a way to extend it. I've tried overwriting the newMarkupResourceStream method, but it seems to be called before the constructor is called as well as before the session is available. Any suggestions? j
Re: Ajax paging navigation link exception
kent lai wrote: Anyway I am using AjaxPagingNavigator, and wheneven i do a double click(or however many times, my mouse *is* kinda faulty in that it triggers multiple clicks sometimes), i get the following, WicketMessage: Unable to find AjaxPagingNavigator component in hierarchy starting from [MarkupContainer [Component id = pageLink, page = No Page, path = 0:pageLink.AjaxPagingNavigationLink]] Are you using the latest v1.3? - -- Kent Tong Wicket tutorials freely available at http://www.agileskills2.org/EWDW -- View this message in context: http://www.nabble.com/Ajax-paging-navigation-link-exception-tf4612911.html#a13195781 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: Configuring DatePicker
Christopher Gardner-2 wrote: Does anyone have any examples of configuring DatePicker? I'd like to limit the minimal date, for example. I subclassed it and overrode configure() to set what I thought the Yahoo documentation said to to specify the minimal date, but to no avail. The code below works fine for me: TextField d = new TextField(d); d.add(new DatePicker() { protected void configure(Map widgetProperties) { widgetProperties.put(mindate, 10/3/2007); super.configure(widgetProperties); } }); - -- Kent Tong Wicket tutorials freely available at http://www.agileskills2.org/EWDW -- View this message in context: http://www.nabble.com/Configuring-DatePicker-tf4616962.html#a13195942 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: RFE: DataTable colgroup
Jan Kriesten wrote: might be, but it's a nice feature for just styling col-width and col-alignment. actually, this would be an optional add-on, no replacement for IStyledColumn. since it is pretty easy to implement, what are the pitfalls when have it added? All mozilla-based browsers don't support it due to an alleged contradiction between HTML4 and CSS (see https://bugzilla.mozilla.org/show_bug.cgi?id=915#c27). - -- Kent Tong Wicket tutorials freely available at http://www.agileskills2.org/EWDW -- View this message in context: http://www.nabble.com/RFE%3A-DataTablecolgroup-tf4618089.html#a13196020 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]