Re: More extend points
Yes sockets and plugs is the idea I was thinking of, but I thought that i will have 2 html files SubWebPage.html and some Panel.html. Now I see that only one is needed for Panel, because the template for SubWebPage will be from SuperWebPage. I gonna try it. Thanks! n8han wrote: fero wrote: Hi, is it possible to have more than one wicket:extend on one page. I use a convention of adding components at the extension point from an overridable method. The base class just returns an empty component; subclasess return a Panel. I don't know if that's more templates than you want, but keep in mind that the subclass doesn't need a template for itself, just one for each Panel that it creates. More here: http://technically.us/code/x/plugging-source-lists-into-sockets (scroll down to Sockets and plugs) Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/More-extend-points-tf4442899.html#a12688525 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: More extend points
So I tried it and it works fine. My subpage does not even have a html file. Only Panel with Form has. Fero fero wrote: Yes sockets and plugs is the idea I was thinking of, but I thought that i will have 2 html files SubWebPage.html and some Panel.html. Now I see that only one is needed for Panel, because the template for SubWebPage will be from SuperWebPage. I gonna try it. Thanks! n8han wrote: fero wrote: Hi, is it possible to have more than one wicket:extend on one page. I use a convention of adding components at the extension point from an overridable method. The base class just returns an empty component; subclasess return a Panel. I don't know if that's more templates than you want, but keep in mind that the subclass doesn't need a template for itself, just one for each Panel that it creates. More here: http://technically.us/code/x/plugging-source-lists-into-sockets (scroll down to Sockets and plugs) Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/More-extend-points-tf4442899.html#a12692830 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Palette header
Hi, simple question: How to set model Palette header (Avaiable, Selected) ? I have a locale combo and I want to use ResourceModel, to change headers, when locale is changed. Thanks Fero -- View this message in context: http://www.nabble.com/Palette-header-tf4442063.html#a12673870 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
More extend points
Hi, is it possible to have more than one wicket:extend on one page. I want to make an universal page with form. This form has some common features, but I want to extend it. I want to extend the page as well (to put some panels under the form) but not always. I don't want to code a Form as a Panel and extend this form, because then I will have too many html files. Thanks Fero -- View this message in context: http://www.nabble.com/More-extend-points-tf4442899.html#a12676475 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Disable loading image from browser cache
Hi, I have a Panel with some images (charts generated with jfreechart) and a datatable. This Panel is in AjaxTabbedPanel and every time it is accessed data table is evaluated and charts renewed. But only table is updated and charts stay the same (they are loaded from cache), they are reloaded only by pressing CTRL-F5. How to make them update automatically? Code: ***Panel with charts and table*** public CelkoveEmisiePanel(String id, Collection celkoveEmisie) { super(id); add(emisieTable(celkoveEmisie)); JFreeChartImage poplatkyChart = new JFreeChartImage(chart1, pieChart(createDatasetPoplatky(celkoveEmisie),Poplatky), 300, 300); poplatkyChart.setOutputMarkupId(true); add(poplatkyChart); JFreeChartImage mnozstvoChart = new JFreeChartImage(chart2, pieChart(createDatasetMnozstvo(celkoveEmisie),Vypúšťané množstvo), 300, 300); mnozstvoChart.setOutputMarkupId(true); add(mnozstvoChart); } ***JFreeChartImage from http://cwiki.apache.org/WICKET/jfreechart-and-wicket-example.html* public class JFreeChartImage extends Image { private int width; private int height; public JFreeChartImage(String id, JFreeChart chart, int width, int height){ super(id, new Model(chart)); this.width = width; this.height = height; } protected Resource getImageResource() { return new DynamicImageResource(){ protected byte[] getImageData() { JFreeChart chart = (JFreeChart)getModelObject(); return toImageData(chart.createBufferedImage(width, height)); } protected void setHeaders(WebResponse response) { if (isCacheable()) { super.setHeaders(response); } else { response.setHeader(Pragma, no-cache); response.setHeader(Cache-Control, no-cache); response.setDateHeader(Expires, 0); } } }; } } -- View this message in context: http://www.nabble.com/Disable-loading-image-from-browser-cache-tf4402977.html#a12560615 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disable loading image from browser cache
Thanks Igor. It is working! Fero igor.vaynberg wrote: extend NonCachingImage instead -igor On 9/7/07, fero [EMAIL PROTECTED] wrote: Hi, I have a Panel with some images (charts generated with jfreechart) and a datatable. This Panel is in AjaxTabbedPanel and every time it is accessed data table is evaluated and charts renewed. But only table is updated and charts stay the same (they are loaded from cache), they are reloaded only by pressing CTRL-F5. How to make them update automatically? Code: ***Panel with charts and table*** public CelkoveEmisiePanel(String id, Collection celkoveEmisie) { super(id); add(emisieTable(celkoveEmisie)); JFreeChartImage poplatkyChart = new JFreeChartImage(chart1, pieChart(createDatasetPoplatky(celkoveEmisie),Poplatky), 300, 300); poplatkyChart.setOutputMarkupId(true); add(poplatkyChart); JFreeChartImage mnozstvoChart = new JFreeChartImage(chart2, pieChart(createDatasetMnozstvo(celkoveEmisie),Vypúšťané množstvo), 300, 300); mnozstvoChart.setOutputMarkupId(true); add(mnozstvoChart); } ***JFreeChartImage from http://cwiki.apache.org/WICKET/jfreechart-and-wicket-example.html* public class JFreeChartImage extends Image { private int width; private int height; public JFreeChartImage(String id, JFreeChart chart, int width, int height){ super(id, new Model(chart)); this.width = width; this.height = height; } protected Resource getImageResource() { return new DynamicImageResource(){ protected byte[] getImageData() { JFreeChart chart = (JFreeChart)getModelObject(); return toImageData(chart.createBufferedImage(width, height)); } protected void setHeaders(WebResponse response) { if (isCacheable()) { super.setHeaders(response); } else { response.setHeader(Pragma, no-cache); response.setHeader(Cache-Control, no-cache); response.setDateHeader(Expires, 0); } } }; } } -- View this message in context: http://www.nabble.com/Disable-loading-image-from-browser-cache-tf4402977.html#a12560615 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Disable-loading-image-from-browser-cache-tf4402977.html#a12560815 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FeedbackPanel + Link problem
Hi, I have a page with feedback panel. As s button I use my own Panel - LabelLink (Link+Label) but I don't get an error message in feedback, when operation in onClick() get wrong. When I use another Panel LabelSubmitButton I get this error. I also tried to change Link to AjaxLing in LabelLink and added feedback panel to target but it did not help. Thanks for your help, I am desperate. Here is code for both buttons *LabelSubmitButton.java* public class LabelSubmitButton extends Panel{ private static final String ID = id; Button button; public LabelSubmitButton(String id, IModel model) { super(id); button = new Button(ID){ protected void onSubmit() { LabelSubmitButton.this.onSubmit(); } }; button.add(new Label(ID, model)); this.add(button); } public Form getForm() { return button.getForm(); } protected void onSubmit(){}; } ***LabelLink.java** public abstract class LabelLink extends Panel{ private static final String ID = id; public LabelLink(String id, IModel model) { super(id); Link link = new Link(ID){ public void onClick() { LabelLink.this.onClick(); } }; link.add(new Label(ID, model)); this.add(link); } abstract public void onClick(); } -- View this message in context: http://www.nabble.com/FeedbackPanel-%2B-Link-problem-tf4380134.html#a12486040 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: FeedbackPanel + Link problem
I found what was wrong but I can not explain it In markup of LabelLink I had wicket:panel button wicket:id=id id=idlabel wicket:id=id/label/button /wicket:panel When I changed button tags to a it was working, but I want my links to look like buttons wicket:panel label wicket:id=id/label /wicket:panel -- View this message in context: http://www.nabble.com/FeedbackPanel-%2B-Link-problem-tf4380134.html#a12486197 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: Presentation and application logic separation
Thanks Gabor. I had the same idea. I'll try it soon and leave here a message how it works. Btw I think many people would appreciate an article about wicket application architecture. Fero Gabor Szokoli wrote: On 8/28/07, Igor Vaynberg [EMAIL PROTECTED] wrote: well, what wicket does is version the state if you keep it inside its model, so it all Just Works. But because you are keeping your state outside of wicket you have to build your own versioning mechanism, or remove your state machine and use wicket. Assuming the SM state is not too big, you could keep it in your base page object. Then it would get replicated along with the page in the cache, wouldn't it? Make sure it is serialisable. Or to get bookmarkable pages, keep it in the PageParameters. Except for the variables which truly belong to the session, like logged in user, of course. More experienced people please correct me if I'm wrong. Gabor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Presentation-and-application-logic-separation-tf4341077.html#a12392226 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: AW: How to make link that open a new window
Thanks Stefan, it works. I am using ResourceLink. Stefan Lindner wrote: Wich type of Link? A pure Link has a opupSettings getPopupSettings() mthod to set the behavior. -Ursprüngliche Nachricht- Von: fero [mailto:[EMAIL PROTECTED] Gesendet: Montag, 27. August 2007 15:37 An: users@wicket.apache.org Betreff: How to make link that open a new window How to make a link to open in a new window/tab? I tried target=_blank and onclick=window.open('index.html'); return false in xhmlt but is not working. I would like to open ResourceLink (but if you kno ho to do it with another kind of link it will help as well) in a new window. Thank for your asnwers Fero -- View this message in context: http://www.nabble.com/How-to-make-link-that-open-a-new-window-tf4335325.html#a12347053 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-make-link-that-open-a-new-window-tf4335325.html#a12347314 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: Listview / input components repaint via ajax?
Of course they are cleared, because data form textfield is transfered to model only if submited with submit button. If u repaint the panel, model is blank. Use AjaxEditableLabel instead of TextField. It will transfer dat to model immediately after editing. Hope it helps, i was solving this issue a week ago. Fero Nino Saturnino Martinez Vazquez Wael wrote: Hold for a minute, it might be something internal. I'll get back if it turns out not to be. Nino Saturnino Martinez Vazquez Wael wrote: Hi I have a listview in a panel. I have a ajax link to add items to the list. When I click the link the listview are repainted, because I have it in the markupcontainer just as it should. In the listview there are some textfields, these are cleared when the markupcontainer are repainted, I dont understand why? I have set the setReuseItems(true). And have tried to call the removeAll() method on the listview. What am I forgetting? regards Nino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Listview---input-components-repaint-via-ajax--tf4335260.html#a12347341 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: DataTable span tag
I dont know. Why do u need to do that? Tim Lantry wrote: Is there a way to remove the span tags from the table cells in a DataTable? Example td wicket:id=cells row0_col1 /td I tried to call visitChildren on the DataTable but I don't ever get to the Item. I also tried to override newCellItem adding setRenderBodyOnly but to no avail. Any help would be appreciated. Thanks, Tim -- View this message in context: http://www.nabble.com/DataTable-span-tag-tf4338293.html#a12358819 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DatePicker
Which components work with DatePicker except the TextField? I would like to use Label. Is it possible? Thx Fero -- View this message in context: http://www.nabble.com/DatePicker-tf4338699.html#a12358843 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: Editable DataTeble
Thanks, I think I will use AjaxEditableLabel more often;) Fero Eelco Hillenius wrote: On 8/19/07, fero [EMAIL PROTECTED] wrote: I see, but I don't know how to do editable labels. I could not find it among wicket/wicket-extensions classes. Plz tell me how to do them. See org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel. You could use it like: item.add(new AjaxEditableLabel(componentId,new PropertyModel(rowModel, propertyExpression) )); Up to you what you like best though :) Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Editable-DataTableSOLVED-tf4293939.html#a12231482 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AjaxEditableLabel
Hi, I use AjaxEditableLabel like this add(new AjaxEditableLabel(code, new PropertyModel(unit, typ.ecode))); But it doesn't show the value form PropertyModel, even, if the value in the model is set (i make sure with debugger). And of course I never get an input field. I used AjaxEditableLabel in a table recently and it was working perfectly there. Plz help Fero -- View this message in context: http://www.nabble.com/AjaxEditableLabel-tf4298011.html#a12233505 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: AjaxEditableLabel
It is ok now, I only misspelled wicket:id and could not find it for a long time:) Thanks Fero Martijn Dashorst wrote: Is the property expression correct? shouldn't that be type.code ? Martijn On 8/20/07, fero [EMAIL PROTECTED] wrote: Hi, I use AjaxEditableLabel like this add(new AjaxEditableLabel(code, new PropertyModel(unit, typ.ecode))); But it doesn't show the value form PropertyModel, even, if the value in the model is set (i make sure with debugger). And of course I never get an input field. I used AjaxEditableLabel in a table recently and it was working perfectly there. Plz help Fero -- View this message in context: http://www.nabble.com/AjaxEditableLabel-tf4298011.html#a12233505 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 joins the Apache Software Foundation as Apache Wicket Apache Wicket 1.3.0-beta2 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/AjaxEditableLabel-tf4298011.html#a12236394 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: Editable DataTeble
Thanks gumnaam! Without the tree I would be exactly what I need. I gonna try it. Fero gumnaam wrote: well, there's the editable tree table, http://wicketstuff.org/wicket13/nested/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.ajax.builtin.tree.EditableTreeTablePage Else, you can add AjaxEditInPlace Label component, to your cells. fero wrote: Hi, is it possible to make an editable DataTable? I want that user can change or add an information into the table and it will be transfered through PropertyModel to my object behind the row in the table. I am trying everything and googling for it, but still nothing. Thanks a lot Fero - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Editable-DataTeble-tf4293939.html#a12224069 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: Editable DataTeble
I got it working:) I coded a new PropertyEditableColumn, which I use instead of column. There is used my Panel EditablePanel, it is only wraper for TextField, because DataTable is trying to put TextField into the instead of input and it causes an exception. So I wrap TextFiels into the Panel, which can be in tag. *PropertyEditableColumn.java*** public class PropertyEditableColumn extends AbstractColumn { private String propertyExpression; private int size = 100; public PropertyEditableColumn(IModel displayModel, String propertyExpression, int size) { super(displayModel); this.size = size; this.propertyExpression = propertyExpression; } public PropertyEditableColumn(IModel displayModel, String sortProperty, String propertyExpression, int size) { super(displayModel,sortProperty); this.size = size; this.propertyExpression = propertyExpression; } public int getSize() { return size; } public void setSize(int size) { this.size = size; } public void populateItem(Item item, String componentId, IModel rowModel) { item.add(new EditablePanel(componentId,new PropertyModel(rowModel, propertyExpression) )); item.add(new SimpleAttributeModifier(style, width: + size + px)); } } EditablePanel.java** public class EditablePanel extends Panel { public EditablePanel(String id, IModel model) { super(id); add(new TextField(textfield,model)); } } *EditablePanel.html*** wicket:panel input type=text wicket:id=textfield/ /wicket:panel Eelco Hillenius wrote: Thanks gumnaam! Without the tree I would be exactly what I need. I gonna try it. Try adding columns to your datatable with EditableLabel components. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Editable-DataTeble-tf4293939.html#a12225811 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: Editable DataTeble
I see, but I don't know how to do editable labels. I could not find it among wicket/wicket-extensions classes. Plz tell me how to do them. Thanx Fero Eelco Hillenius wrote: On 8/19/07, fero [EMAIL PROTECTED] wrote: I got it working:) The only thing to consider still is that if you make them all text fields, your browsers may have problems displaying them if they are too many. A whole bunch of text fields may also clutter the display quite a bit. If you use editable labels, you'll have more space at your disposal and you can keep a cleaner interface. My 2c, Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Editable-DataTableSOLVED-tf4293939.html#a12226124 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]