Re: Brazilian Portuguese localization question
Hi, that should work. Put a breakpoint on Session#locale and check whether the locale is picked up correctly. Sven On 07/18/2013 07:13 AM, Maxim Solodovnik wrote: Hello All, I'm trying to provide Brazilian Portuguese localization for our wicket based application by appending _pt_BR to the names of html template files like this: CongratulationsPanel_pt_BR.html surprisingly after adding portuguese (Brazil) as browser primary language the localized template files are not used. Same time CongratulationsPanel_pt.html works as expected What am I doing wrong? Wicket 6.9.1 Thanks in advance! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Gmap3 custom Icon
Hi, Joachims solution worked for me! Thanks to all helpers! Tom -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Gmap3-custom-Icon-tp4660309p4660334.html Sent from the Users forum 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: Brazilian Portuguese localization question
Thanks for the quick response Sven, The locale is detected as pt_BR On Thu, Jul 18, 2013 at 2:25 PM, Sven Meier s...@meiers.net wrote: Hi, that should work. Put a breakpoint on Session#locale and check whether the locale is picked up correctly. Sven On 07/18/2013 07:13 AM, Maxim Solodovnik wrote: Hello All, I'm trying to provide Brazilian Portuguese localization for our wicket based application by appending _pt_BR to the names of html template files like this: CongratulationsPanel_pt_BR.**html surprisingly after adding portuguese (Brazil) as browser primary language the localized template files are not used. Same time CongratulationsPanel_pt.html works as expected What am I doing wrong? Wicket 6.9.1 Thanks in advance! --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- WBR Maxim aka solomax
Re: Brazilian Portuguese localization question
Not sure if it is important information or not. The only component displayed on page is Wizard Wizard buttons are in Portuguese Brazil and panels are in English :( On Thu, Jul 18, 2013 at 2:40 PM, Maxim Solodovnik solomax...@gmail.comwrote: Thanks for the quick response Sven, The locale is detected as pt_BR On Thu, Jul 18, 2013 at 2:25 PM, Sven Meier s...@meiers.net wrote: Hi, that should work. Put a breakpoint on Session#locale and check whether the locale is picked up correctly. Sven On 07/18/2013 07:13 AM, Maxim Solodovnik wrote: Hello All, I'm trying to provide Brazilian Portuguese localization for our wicket based application by appending _pt_BR to the names of html template files like this: CongratulationsPanel_pt_BR.**html surprisingly after adding portuguese (Brazil) as browser primary language the localized template files are not used. Same time CongratulationsPanel_pt.html works as expected What am I doing wrong? Wicket 6.9.1 Thanks in advance! --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- WBR Maxim aka solomax -- WBR Maxim aka solomax
Re: Brazilian Portuguese localization question
Sorry Sven, Template files are named incorrectly, sorry for disturbing you On Thu, Jul 18, 2013 at 2:42 PM, Maxim Solodovnik solomax...@gmail.comwrote: Not sure if it is important information or not. The only component displayed on page is Wizard Wizard buttons are in Portuguese Brazil and panels are in English :( On Thu, Jul 18, 2013 at 2:40 PM, Maxim Solodovnik solomax...@gmail.comwrote: Thanks for the quick response Sven, The locale is detected as pt_BR On Thu, Jul 18, 2013 at 2:25 PM, Sven Meier s...@meiers.net wrote: Hi, that should work. Put a breakpoint on Session#locale and check whether the locale is picked up correctly. Sven On 07/18/2013 07:13 AM, Maxim Solodovnik wrote: Hello All, I'm trying to provide Brazilian Portuguese localization for our wicket based application by appending _pt_BR to the names of html template files like this: CongratulationsPanel_pt_BR.**html surprisingly after adding portuguese (Brazil) as browser primary language the localized template files are not used. Same time CongratulationsPanel_pt.html works as expected What am I doing wrong? Wicket 6.9.1 Thanks in advance! --**--** - To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- WBR Maxim aka solomax -- WBR Maxim aka solomax -- WBR Maxim aka solomax
Re: Problem with wiQuery Dialog after upgrade to Wicket 6.9
Hi, To anybody interested, I've found a workaround that worked. I've added an invisible link into the dialog and simulated clicking on it: HTML code for the link: a wicket:id=submitFormInvisibleButton style=visibility: collapse; / Java code for the link: submitLink = new AjaxSubmitLink( submitFormInvisibleButton, form ) { private static final long serialVersionUID = 1L; @Override protected void onSubmit( AjaxRequestTarget target, Form? form ) { super.onSubmit( target, form ); form.onFormSubmitted(); if( form.hasError() ) { logger.debug( AjaxSubmitLink.respond() error ); } else { logger.debug( AjaxSubmitLink.respond() onOK ); onOk(target); } } }; submitLink.setOutputMarkupId( true ); form.add( submitLink ); JavaScript to be added to the OK button: sb.append( $('a# ).append( submitLink.getMarkupId() ) .append( ').triggerHandler('click'); ); That worked - good enough for me. I hope that wiQuery will have a more general solution for that, but that's something to be handled in wiQuery. Regards, Andrew -- Andrew Schetinin On Wed, Jul 17, 2013 at 6:41 PM, Andrew Schetinin ascheti...@gmail.comwrote: Hi Sebastien, I've tried it - used getCallbackFunction() - but it generated a function inside function, and broke JS syntax. I've tried a couple of other ideas, but none worked. Regards, Andrew -- Andrew Schetinin On Wed, Jul 17, 2013 at 1:54 AM, Sebastien seb...@gmail.com wrote: Hi, I think the idea is more to replace wicketSubmitFormById('form',' +formAjaxBehavior.getCallbackUrl() +', null, null, null, null,null);))); by formAjaxBehavior.getCallbackFunction() With the override mentioned bellow. #getCallbackFunction() will get you the ready-to-use javascript function. I am not a wiQuery expert so I don't know where exactly you have to use this statement... (something like new JsScope(statement)?) Maybe Ernesto or Hielke may help you more on this... Best regards, Sebastien. On Tue, Jul 16, 2013 at 6:06 PM, Andrew Schetinin ascheti...@gmail.com wrote: Hi Sebastien, Thank you for the suggestion, but the trouble with the sample (and wiQuery) is that DialogButton is not a wicket component - it is a very simple object. There is no updateAjaxAttributes() to change. As I explained, the form submit there works by a plain call from JavaScript, and that call does not work anymore because of the missing wicketSubmitFormById() function. It seems to me that the only way to extend Dialog in wiQuery is through JavaScript - at least everything related to reaction on the button clicks. Regards, Andrew -- Andrew Schetinin On Tue, Jul 16, 2013 at 6:33 PM, Sebastien seb...@gmail.com wrote: Hi Andrew, You have to override your ajaxbehavior#updateAjaxAttributes() protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); attributes.setMethod(Method.POST); //if you wish to post attributes.setFormId(yourFormId); } Best regards, Sebastien. On Tue, Jul 16, 2013 at 5:21 PM, Andrew Schetinin ascheti...@gmail.com wrote: Hi, I've just upgraded from Wicket 1.4 to 6.9, and (among lots of other problems) I have a trouble with porting the code that submitted a form from within a wiQuery dialog. My code is based on the sample that can be found here: http://code.google.com/p/wiquery/source/browse/examples/wiquery-examples/src/main/resources/org/odlabs/wiquery/examples/dialog/DialogPage.java?r=407 The trick here was that the Dialog contains a form which has to be submitted when OK button is clicked, and that was done with the following code: buttonsAdv.add(new DialogButton(Save, JsScope.quickScope(wicketSubmitFormById('form',' + formAjaxBehavior.getCallbackUrl() + ', null, null, null, null, null);))); Unfortunately, in Wicket 6.9 this code fails to find the function wicketSubmitFormById() I also have a feeling that in my previous attempt to port this code to Wicket 6.6 the same functionality worked fine. The question is - how is it possible to submit a form from JS? Regards, Andrew -- Andrew Schetinin
Re: how to set width for DataTable (column) header.
Hi, I've just added an AttributeModifier to wicket-example's DataTablePage and it works: @Override public void populateItem(ItemICellPopulatorContact item, String componentId, IModelContact rowModel) { super.populateItem(item, componentId, rowModel); item.add(new AttributeModifier(style, new ModelString(width:20px;))); } Regards Sven On 07/17/2013 04:56 PM, wicket_user_100 wrote: Hi All, I'm trying to set a width for a DataTable column: ListIColumnlt;Corpus, String ret = Lists.newArrayList(); ret.add(new AbstractColumnCorpus, String(new Model()) { @Override public void populateItem(ItemICellPopulatorlt;Corpus cellItem, String componentId, IModelCorpus rowModel) { CheckBoxPanel checkBoxPanel = new CheckBoxPanel(componentId); cellItem.add(checkBoxPanel); cellItem.add(new AttributeModifier(style, new ModelString(width:20px;))); selected.put(checkBoxPanel.getField(), rowModel.getObject()); } @Override public Component getHeader(String componentId) { Component header = super.getHeader(componentId); header.setRenderBodyOnly(true); header.add(new AttributeModifier(style, new ModelString(width:20px;))); return header; } }); It doesn't work. I can see in result code: My cell title div wicket:id=cell wicket:panel xmlns:wicket=http://wicket.apache.org; input wicket:id=checkBox name=table:body:rows:1:cells:1:cell:checkBox type=checkbox /wicket:panel /div div wicket:id=cellMy cell content/div I've tried also to add new AttributeModifier(style, new ModelString(width:20px;)) to the header in DataTable, see my code: public class AjaxFallbackDataTableT, S extends DataTableT, S { private static final long serialVersionUID = 1L; public AjaxFallbackDataTable(String id, ListIColumnlt;T, S columns, ISortableDataProviderT, S dataProvider, int rowsPerPage) { super(id, columns, dataProvider, rowsPerPage); setOutputMarkupId(true); setVersioned(false); addTopToolbar(newAjaxNavigationToolbar()); addTopToolbar(newAjaxFallbackHeadersToolbar(dataProvider)); addBottomToolbar(new NoRecordsToolbar(this)); } protected AjaxFallbackHeadersToolbar newAjaxFallbackHeadersToolbar(ISortableDataProviderT, S dataProvider) { AjaxFallbackHeadersToolbar fb = new AjaxFallbackHeadersToolbar(this, dataProvider); fb.add(new AttributeModifier(style, new ModelString(width:20px;))); return fb; } protected AjaxNavigationToolbar newAjaxNavigationToolbar() { AjaxNavigationToolbar fb = new AjaxNavigationToolbar(this); fb.add(new AttributeModifier(style, new ModelString(width:20px;))); return fb; } @Override protected ItemT newRowItem(final String id, final int index, final IModelT model) { return new OddEvenItemT(id, index, model); } } It doesn't work either. Can anybody write me - how can I set the style=width:20px for a Datatable column? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-set-width-for-DataTable-column-header-tp4660310.html Sent from the Users forum 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: conditional component / as singleton on page
ModalX allows you to create set of 'generic' modal windows waiting in the wings ready for display. Any specific modal that you want simply needs to derive from a generic modal class and you can then open it at will. See here for info and demo: http://www.visualclassworks.com/list/modalx-for-wicket/modalx All open source Wicket and it's part of WicketStuff https://github.com/wicketstuff/core/wiki/ModalX I'm not sure it's exactly what you're after when when you said you want to avoid having 20 invisible dialogs already rendered and opened on request that reminded me of the very reason we created ModalX in the first place. Regards, Chris -Original Message- From: Patrick Davids [mailto:patrick.dav...@nuboit.de] Sent: Friday, 5 July 2013 7:16 PM To: users@wicket.apache.org Subject: conditional component / as singleton on page Hi all, does anyone have a best practice putting a component on a page (as singleton) independendly how many other components on that page needs it? e.g. a global dialog, which can be used from different components. Not to have 20 invisible dialogs aleady rendered and opened on request. In out special to achieve this we do not want use page inheritence. This component shouldn't be on page, if no other component needs it. thanx for help... kind regards Patrick - 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: Wicket 1.4.7 request listener
1) Many of those suggestions appear to be 1.5 or greater. I am in 1.4.7. 2) A simple filter does indeed get me the events, but at that point, how am I to know what page is being worked with? My objective is to set some properties that our database code picks up for the audit log. We want this to happen uniformly for all pages/requests, but would prefer not having to modify every page. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4-7-request-listener-tp4660248p4660341.html Sent from the Users forum 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
Wicket Atmosphere - Encoding and MultiTab issues
Hi, I'm using wicket atmosphere on multiple pages to push some messages, like when a report is ready. The first problem is that the html updated by the wicket-atmosphere response arrives with broken enconding. Everything is fine until the respose reaches the jquery.atmosphere javascript. Already tried to do this on the javascript resources, but without success: @Override public JavaScriptPackageResource getResource() { JavaScriptPackageResource resource = super.getResource(); resource.setTextEncoding(UTF-8); return resource; } The second one is that when the user keep opening tabs, after 6 tabs, pages got locked and wait until you close another tab. Is there a parameter or something about this? Both problems are reproducibles at http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/ For the first just try to send a message with á For the second, keep opening tabs with this address, the sixth tab don't finish and the seventh still waiting. Thanks, Felipe Taboada. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Atmosphere-Encoding-and-MultiTab-issues-tp4660342.html Sent from the Users forum 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
CSV-Export change Datepattern
Hello, in my application I have a table which includes a column timestamp. I have created this column with the help of a Panel which includes a DateLabel. columns.add(new PropertyColumnProtocolRecord, String(new ResourceModel(protocolRecord.eventTimestamp).wrapOnAssignment(getPage()),eventTimestamp,eventTimestamp){ @Override public void populateItem(ItemICellPopulatorProtocolRecord cellItem, String componentId, IModelProtocolRecord model) { cellItem.add(new DatePanelProtocolRecord(componentId, model,eventTimestamp)); } }); Here is the declaration of the DateLabel: public class DatePanelT extends Panel { public DatePanel(String id, final IModelT model, String column) { super(id, model); DateLabel datelabel = new DateLabel(date,new PropertyModelDate(model, column),new PatternDateConverter(dd.MM. HH:mm:ss,true)); add(datelabel); } } So the table shows the date like this 18.07.2013 15:23:53. Furthermore the table has an Exporttoolbar for csv. When I click the link for exporting the csv, it includes the timestamp like this 2013/07/18. This is wrong. I need the full timestamp as it would be shown in the table. Could anybody help me please? Mit freundlichen Grüßen Christoph Manig email: christoph.ma...@t-systems.com
RE: how to add select/deselect all checkbox to wicket DataTable
The code is not on any repo outside of myco's SVN repo. As I mentioned, it's based on a LabeledAjaxLinkPanel which is nothing but a AjaxLink with a label so you'd have to refactor some of it. Anyhow, here's the Java code: package com.mycom.console.platform.components.markup.html.repeater.data.table; import java.util.Collection; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.AbstractReadOnlyModel; import org.apache.wicket.model.CompoundPropertyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.ResourceModel; import org.apache.wicket.model.StringResourceModel; import org.apache.wicket.util.io.IClusterable; import com.mycom.console.platform.components.ajax.markup.html.basic.LabeledAjaxLinkPanel; /** * Panel holding on to the label indicator and action links to select all or clear all items filtered in a data table. * * @param T Type of elements in the collection used with this panel. */ public abstract class SelectAllPanelT extends Panel { private static final long serialVersionUID = 1L; private DataTable?, ? dataTable; private CollectionT selections; private SelectAll selectAll = new SelectAll(); /** * Constructs a new panel holding on to the label indicator and action links to select all or clear all items filtered in a data table. * brbr * The visibility of this panel is controlled by the user's selection as defined in the provided codeselections/code collection. * * @param id{@link Panel} id. * @param dataTable {@link DataTable} associated with this panel. * @param selections{@link Collection} of elements based on which the indicators and action links operate. */ public SelectAllPanel(String id, DataTable?, ? dataTable, CollectionT selections) { super(id); this.dataTable = dataTable; this.selections = selections; selectAll.setSelected(selections.size()); selectAll.setTotal(dataTable.getDataProvider().size()); setOutputMarkupPlaceholderTag(true); } @Override protected void onInitialize() { super.onInitialize(); final IModelSelectAll selectAllModel = new CompoundPropertyModelSelectAll(selectAll); IModelString labelModel = new AbstractReadOnlyModelString() { private static final long serialVersionUID = 1L; @Override public String getObject() { if(selectAll.isAllSelected()) { return new StringResourceModel( SelectAllPanel.selection.all, selectAllModel, All ${total} items selected. ).getObject(); } else { return new StringResourceModel( SelectAllPanel.selection, selectAllModel, ${selected} items selected. ).getObject(); } } }; add(new Label(selection, labelModel)); IModelString selectLinkModel = new StringResourceModel( SelectAllPanel.select, selectAllModel, Select all ${total} items. ); add(new LabeledAjaxLinkPanelVoid(selectLink, selectLinkModel) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { selectAll(target); } @Override protected void manipulateLink(LinkVoid link) { link.setVisible(!selectAll.isAllSelected()); } }); add(new LabeledAjaxLinkPanelVoid(clearLink, new ResourceModel(SelectAllPanel.clear)) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { clearAll(target); } }); } @Override protected void onConfigure() { super.onConfigure(); selectAll.setSelected(selections.size()); selectAll.setTotal(dataTable.getDataProvider().size()); setVisible(!selections.isEmpty()); } /** * Callback for when the user has selected the codeSelect all 12345 items./code link. * * @param target {@link AjaxRequestTarget} to use for Ajax refresh. */ abstract public void selectAll(AjaxRequestTarget target); /** * Callback for when the user has selected the codeClear selection./code link. * * @param target {@link AjaxRequestTarget} to use for Ajax refresh. */ abstract public void clearAll(AjaxRequestTarget target); /** * POJO used as the model object for the labels on the {@link SelectAllPanel} parent
Wicket/JQuery internals advanced problem / LazyLoadedPanel with AjaxLink / AjaxLink on click not executed
Hi all, I have a very special problem with ajax lazy loaded panels, which contains ajax links. Problem: AjaxLink does not execute onclick. Does not reach server / no client-side execution in browser occurs. What I investigated until now: - client-side script evaluation of lazy loading panel works. I can see script like this: {Wicket.Ajax.ajax({u:./page?6-8.IBehaviorListener.VERY_LONG_ID,e:click,c:edtc5});})(); - I stepped into the evaluated javascript code Wicket.Ajax.ajax(attrb) with firebug. - inside a jquerys each() iterates over all elements, and adds onclick event handling to the particular element/a-link (c:edtc5 of script above). see: wicket-ajax-jquery-ver-xyz.js line: 1800 jQuery.each(attrs.e, function (idx, evt) { Wicket.Event.add(attrs.c, evt, function (jqEvent, data) { var call = new Wicket.Ajax.Call(); var attributes = jQuery.extend({}, attrs); attributes.event = Wicket.Event.fix(jqEvent); ... So far so good... At this point it gets to deep for me. :-/ Can any wicket pro please help, why the onclick (I think its binded correctly) of my link does not get fired to let execute the ajax request? I already made a quickstart with different lazyloaded panels, and all ajaxlinks are working fine. kind regards Patrick - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket/JQuery internals advanced problem / LazyLoadedPanel with AjaxLink / AjaxLink on click not executed
What's the markup of the component you're binding the AjaxLink to? Sven On 07/18/2013 03:53 PM, Patrick Davids wrote: Hi all, I have a very special problem with ajax lazy loaded panels, which contains ajax links. Problem: AjaxLink does not execute onclick. Does not reach server / no client-side execution in browser occurs. What I investigated until now: - client-side script evaluation of lazy loading panel works. I can see script like this: {Wicket.Ajax.ajax({u:./page?6-8.IBehaviorListener.VERY_LONG_ID,e:click,c:edtc5});})(); - I stepped into the evaluated javascript code Wicket.Ajax.ajax(attrb) with firebug. - inside a jquerys each() iterates over all elements, and adds onclick event handling to the particular element/a-link (c:edtc5 of script above). see: wicket-ajax-jquery-ver-xyz.js line: 1800 jQuery.each(attrs.e, function (idx, evt) { Wicket.Event.add(attrs.c, evt, function (jqEvent, data) { var call = new Wicket.Ajax.Call(); var attributes = jQuery.extend({}, attrs); attributes.event = Wicket.Event.fix(jqEvent); ... So far so good... At this point it gets to deep for me. :-/ Can any wicket pro please help, why the onclick (I think its binded correctly) of my link does not get fired to let execute the ajax request? I already made a quickstart with different lazyloaded panels, and all ajaxlinks are working fine. kind regards Patrick - 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: CSV-Export change Datepattern
Could be interresting : http://stackoverflow.com/search?q=excel+date+format http://dailydoseofexcel.com/archives/2010/10/06/excel-converts-to-date-when-opening-csv/ François - François Meillet Formation Wicket - Développement Wicket -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CSV-Export-change-Datepattern-tp4660343p4660347.html Sent from the Users forum 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: CSV-Export change Datepattern
CSVDataExporter uses the Application's converters: IConverter converter = Application.get().getConverterLocator().getConverter(c); So register a suitable converter in your application. Alternatively create a new Jira issue to allow passing an IConverterLocator into CSVDataExporter. Sven On 07/18/2013 03:29 PM, christoph.ma...@t-systems.com wrote: Hello, in my application I have a table which includes a column timestamp. I have created this column with the help of a Panel which includes a DateLabel. columns.add(new PropertyColumnProtocolRecord, String(new ResourceModel(protocolRecord.eventTimestamp).wrapOnAssignment(getPage()),eventTimestamp,eventTimestamp){ @Override public void populateItem(ItemICellPopulatorProtocolRecord cellItem, String componentId, IModelProtocolRecord model) { cellItem.add(new DatePanelProtocolRecord(componentId, model,eventTimestamp)); } }); Here is the declaration of the DateLabel: public class DatePanelT extends Panel { public DatePanel(String id, final IModelT model, String column) { super(id, model); DateLabel datelabel = new DateLabel(date,new PropertyModelDate(model, column),new PatternDateConverter(dd.MM. HH:mm:ss,true)); add(datelabel); } } So the table shows the date like this 18.07.2013 15:23:53. Furthermore the table has an Exporttoolbar for csv. When I click the link for exporting the csv, it includes the timestamp like this 2013/07/18. This is wrong. I need the full timestamp as it would be shown in the table. Could anybody help me please? Mit freundlichen Grüßen Christoph Manig email: christoph.ma...@t-systems.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket/JQuery internals advanced problem / LazyLoadedPanel with AjaxLink / AjaxLink on click not executed
Hi Sven, it's a simple a. Patrick Am 18.07.2013 16:08, schrieb Sven Meier: What's the markup of the component you're binding the AjaxLink to? Sven On 07/18/2013 03:53 PM, Patrick Davids wrote: Hi all, I have a very special problem with ajax lazy loaded panels, which contains ajax links. Problem: AjaxLink does not execute onclick. Does not reach server / no client-side execution in browser occurs. What I investigated until now: - client-side script evaluation of lazy loading panel works. I can see script like this: {Wicket.Ajax.ajax({u:./page?6-8.IBehaviorListener.VERY_LONG_ID,e:click,c:edtc5});})(); - I stepped into the evaluated javascript code Wicket.Ajax.ajax(attrb) with firebug. - inside a jquerys each() iterates over all elements, and adds onclick event handling to the particular element/a-link (c:edtc5 of script above). see: wicket-ajax-jquery-ver-xyz.js line: 1800 jQuery.each(attrs.e, function (idx, evt) { Wicket.Event.add(attrs.c, evt, function (jqEvent, data) { var call = new Wicket.Ajax.Call(); var attributes = jQuery.extend({}, attrs); attributes.event = Wicket.Event.fix(jqEvent); ... So far so good... At this point it gets to deep for me. :-/ Can any wicket pro please help, why the onclick (I think its binded correctly) of my link does not get fired to let execute the ajax request? I already made a quickstart with different lazyloaded panels, and all ajaxlinks are working fine. kind regards Patrick - 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 -- Mit freundlichen Grüßen, Patrick Davids NuboIT GmbH Co. KG Kieler Str. 103-107 • 25474 Bönningstedt Email: patrick.dav...@nuboit.de Handelsregister: HRA6819 Pi | Amtsgericht Pinneberg Geschäftsführung der Verwaltungsgesellschaft Daniel Fraga Zander HRB10145Pi | Amtsgericht Pinneberg
Re: Inmethod Grid on IE9
It seems there was something wrong with my IE, now it is working fine Thanks 2013/7/12 Jose Mauricio Meraz Mercado jmm...@gmail.com Hi, Currently on the application we are developing we are using InMethod grids, when those grids have a horizontal scroll bar there is a strange behavior that makes the div that has the contents grow when you select text or when you select a record on the grid. This behavior can be reproduced on http://www.wicket-library.com/inmethod-grid/data-grid/simple (the horizontal scroll bar has to be present, just passing the mouse on the rows will cause the navigation bar to be pushed below). IE8, Firefox and Chrome this works fine We found this on the wicketstuff project with something similar to what we have, but the solution provided doesn't work: https://github.com/wicketstuff/core/issues/44 Has anyone experienced and resolved this? Thanks for any help We are using Wicket 1.4.19 and Inmethod-grid 1.4.9.1 -- El conocimiento es poder
Re: Inmethod Grid on IE9
Hi, my IE has the same problem. But unfortunately I do not have any idea how to fix (except to remove horizontal scrollbar). On Thu, Jul 18, 2013 at 5:02 PM, Jose Mauricio Meraz Mercado jmm...@gmail.com wrote: It seems there was something wrong with my IE, now it is working fine Thanks 2013/7/12 Jose Mauricio Meraz Mercado jmm...@gmail.com Hi, Currently on the application we are developing we are using InMethod grids, when those grids have a horizontal scroll bar there is a strange behavior that makes the div that has the contents grow when you select text or when you select a record on the grid. This behavior can be reproduced on http://www.wicket-library.com/inmethod-grid/data-grid/simple (the horizontal scroll bar has to be present, just passing the mouse on the rows will cause the navigation bar to be pushed below). IE8, Firefox and Chrome this works fine We found this on the wicketstuff project with something similar to what we have, but the solution provided doesn't work: https://github.com/wicketstuff/core/issues/44 Has anyone experienced and resolved this? Thanks for any help We are using Wicket 1.4.19 and Inmethod-grid 1.4.9.1 -- El conocimiento es poder
Last cause: can't serialize class $Proxy23
My Wicket application uses Guice for DI and some AOP. I have successfully injected a DAO and used that to display records. However, when I try to save a new record in my form, I get the following exception Root cause: java.lang.IllegalArgumentException: can't serialize class $Proxy23 at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:270) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:226) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:226) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:120) at com.mongodb.DefaultDBEncoder.writeObject(DefaultDBEncoder.java:27) at com.mongodb.OutMessage.putObject(OutMessage.java:289) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:239) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:204) at com.mongodb.DBCollection.insert(DBCollection.java:148) at com.mongodb.DBCollection.insert(DBCollection.java:91) at com.mongodb.DBCollection.save(DBCollection.java:810) at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:731) at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:793) at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:787) at com.hp.honeybadger.persistence.dao.morphia.MorphiaCnavUrlDAO.save(MorphiaCnavUrlDAO.java:50) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:435) at $Proxy23.save(Unknown Source) at com.hp.honeybadger.console.forms.CnavForm$1.onSubmit(CnavForm.java:72) at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1253) at org.apache.wicket.markup.html.form.Form.process(Form.java:925) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:771) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:704) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:240) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:854) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1332) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) at org.eclipse.jetty.server.Server.handle(Server.java:348) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452) at
Re: Wicket/JQuery internals advanced problem / LazyLoadedPanel with AjaxLink / AjaxLink on click not executed
Sorry, it was just a wild guess that you bound an AjaxBehavior to a wicket:container tag :(. I already made a quickstart with different lazyloaded panels, and all ajaxlinks are working fine. Try to find the difference. Sven On 07/18/2013 04:38 PM, Patrick Davids wrote: Hi Sven, it's a simple a. Patrick Am 18.07.2013 16:08, schrieb Sven Meier: What's the markup of the component you're binding the AjaxLink to? Sven On 07/18/2013 03:53 PM, Patrick Davids wrote: Hi all, I have a very special problem with ajax lazy loaded panels, which contains ajax links. Problem: AjaxLink does not execute onclick. Does not reach server / no client-side execution in browser occurs. What I investigated until now: - client-side script evaluation of lazy loading panel works. I can see script like this: {Wicket.Ajax.ajax({u:./page?6-8.IBehaviorListener.VERY_LONG_ID,e:click,c:edtc5});})(); - I stepped into the evaluated javascript code Wicket.Ajax.ajax(attrb) with firebug. - inside a jquerys each() iterates over all elements, and adds onclick event handling to the particular element/a-link (c:edtc5 of script above). see: wicket-ajax-jquery-ver-xyz.js line: 1800 jQuery.each(attrs.e, function (idx, evt) { Wicket.Event.add(attrs.c, evt, function (jqEvent, data) { var call = new Wicket.Ajax.Call(); var attributes = jQuery.extend({}, attrs); attributes.event = Wicket.Event.fix(jqEvent); ... So far so good... At this point it gets to deep for me. :-/ Can any wicket pro please help, why the onclick (I think its binded correctly) of my link does not get fired to let execute the ajax request? I already made a quickstart with different lazyloaded panels, and all ajaxlinks are working fine. kind regards Patrick - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Last cause: can't serialize class $Proxy23
I found that having my DAO implement Serializable got me past the exception. Is Wicket attempting to serialize my DAO? On Thu, Jul 18, 2013 at 11:24 AM, Daniel Watrous dwmaill...@gmail.comwrote: My Wicket application uses Guice for DI and some AOP. I have successfully injected a DAO and used that to display records. However, when I try to save a new record in my form, I get the following exception Root cause: java.lang.IllegalArgumentException: can't serialize class $Proxy23 at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:270) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:226) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:226) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:120) at com.mongodb.DefaultDBEncoder.writeObject(DefaultDBEncoder.java:27) at com.mongodb.OutMessage.putObject(OutMessage.java:289) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:239) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:204) at com.mongodb.DBCollection.insert(DBCollection.java:148) at com.mongodb.DBCollection.insert(DBCollection.java:91) at com.mongodb.DBCollection.save(DBCollection.java:810) at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:731) at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:793) at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:787) at com.hp.honeybadger.persistence.dao.morphia.MorphiaCnavUrlDAO.save(MorphiaCnavUrlDAO.java:50) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:435) at $Proxy23.save(Unknown Source) at com.hp.honeybadger.console.forms.CnavForm$1.onSubmit(CnavForm.java:72) at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1253) at org.apache.wicket.markup.html.form.Form.process(Form.java:925) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:771) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:704) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:240) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:854) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1332) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965) at
Re: Form questions
I've made a lot of progress and been through chapters 9 and 10 of Wicket Free Guide, but I'm still stumped on point #2, pre-populating the form. Here's what I have right now: public class CnavForm extends Form { @Inject private CnavUrlDAO cnavUrlDAO; public CnavForm(String id) { super(id); CnavUrl cnavUrl = new MorphiaCnavUrl(); setModel(new Model((Serializable) cnavUrl)); add(new TextField(url, new PropertyModel(cnavUrl, URL)) .setRequired(true) .add(new UrlValidator())); add(new HiddenField(objectid, new PropertyModel(cnavUrl, id))); add(new Button(publish) { @Override public void onSubmit() { CnavUrl cnavUrl = (CnavUrl) CnavForm.this.getModelObject(); // check for existing record to know if this is a create or update if (((MorphiaCnavUrlModel)cnavUrl).getId() == null) { // create cnavUrlDAO.save(cnavUrl); } else { // update cnavUrlDAO.save(cnavUrl); } } }); } } I need to know how to do two things. 1) how to link to the page that displays the form, and pass it the ID for the record I want to edit 2) load the object from the database and have it replace the model I create in the constructor Obviously I can make a database call and get the object. Is the constructor called every time the page is requested, so that I could check for an ID and either create the model or load it from the database? If so, then I just need help with #1. Thanks, Daniel On Wed, Jul 17, 2013 at 10:19 AM, Daniel Watrous dwmaill...@gmail.comwrote: I think I'm getting it now. The Form needs to be embedded in a panel for the type of inclusion that I'm interested in. I created a CnavFormPanel.java and changed CnavForm.html to CnavFormPanel.html. I left CnavForm.java alone. In CnavModify.java I removed this Form form = new CnavForm(cnavFormArea); add(form); And added this add(new CnavFormPanel(cnavFormArea)); That works. Thanks for your help. Daniel On Wed, Jul 17, 2013 at 10:07 AM, Daniel Watrous dwmaill...@gmail.comwrote: I can make it work if I put the markup from CnavForm.html directly into CnavModify, but the form is not as reusable then. I would have to duplicate the markup for other pages that use the same form... Dnaiel On Wed, Jul 17, 2013 at 9:55 AM, Daniel Watrous dwmaill...@gmail.comwrote: That's what I tried to do. I created CnavForm.java and CnavForm.html. In the latter file I have this wicket:panel form wicket:id=cnavForm... // form details /form /wicket:panel Then I have CnavModify.java and CnavModify.html. You already see what I have in CnavModify.java from my last email. My CnavModify.html has this. wicket:extend span wicket:id=cnavFormAreaHere's the form/span /wicket:extend Rather than render I'm getting this error: Last cause: Component [cnavFormArea] (path = [0:cnavFormArea]) must be applied to a tag of type [form], not: 'span wicket:id=cnavFormArea id=cnavFormArea3' (line 0, column 0) I'll keep trying and report back when I figure it out. Daniel On Tue, Jul 16, 2013 at 10:50 PM, Paul Bors p...@bors.ws wrote: Wicket is a MVC component driven framework similar to Swing. In short, what you want to do is create your own Panel with that form file of yours and add it to another Panel as a child. See chapter 4 Keeping control over HTML of the Wicket Free Guide at: http://code.google.com/p/wicket-guide/ Also available from under the Learn section as the Books link on the right side navigation section on Wicket's home page at: http://wicket.apache.org/learn/books/ ~ Thank you, Paul Bors -Original Message- From: Daniel Watrous [mailto:dwmaill...@gmail.com] Sent: Tuesday, July 16, 2013 7:13 PM To: users@wicket.apache.org Subject: Re: Form questions Thanks Paul and Sven. I got the form to work and available in the onSubmit handler. Now I'm interested in splitting the form out into it's one file. So I created a class that has nothing more than the form, but I'm not sure how to include this into a page. In my class I do this: public class CnavModify extends ConsoleBasePage { public CnavModify(PageParameters parameters) { super(parameters); Form form = new CnavForm(cnavFormArea); add(form); } } My CnavModify obviously extends a base page. What do I put inside the wicket:extend tag to have the form render? Daniel On Tue, Jul 16, 2013 at 12:00 AM, Sven Meier s...@meiers.net wrote: Hi, Some problems I can't figure out. The code to create the button complains that it requires a CnavUrl but gets back a String. add(new Button(publish, model) { @Override public void onSubmit() {
RE: Form questions
Okay let's pre-populate this field: add(new TextField(url, new PropertyModel(cnavUrl, URL)) .setRequired(true) .add(new UrlValidator())); Its mode is a new PropertyModel(cnavUrl, URL), which is the CnavUrl cnavUrl = new MorphiaCnavUrl();. So it's the cnavUrl.getUrl() value. What do you get when you call new MorphiaCnavUrl().getUrl()? That's what should appear in the TextField when you first load the page (normally read form the DB). ~ Thank you, Paul Bors -Original Message- From: Daniel Watrous [mailto:dwmaill...@gmail.com] Sent: Thursday, July 18, 2013 6:03 PM To: users@wicket.apache.org Subject: Re: Form questions I've made a lot of progress and been through chapters 9 and 10 of Wicket Free Guide, but I'm still stumped on point #2, pre-populating the form. Here's what I have right now: public class CnavForm extends Form { @Inject private CnavUrlDAO cnavUrlDAO; public CnavForm(String id) { super(id); CnavUrl cnavUrl = new MorphiaCnavUrl(); setModel(new Model((Serializable) cnavUrl)); add(new TextField(url, new PropertyModel(cnavUrl, URL)) .setRequired(true) .add(new UrlValidator())); add(new HiddenField(objectid, new PropertyModel(cnavUrl, id))); add(new Button(publish) { @Override public void onSubmit() { CnavUrl cnavUrl = (CnavUrl) CnavForm.this.getModelObject(); // check for existing record to know if this is a create or update if (((MorphiaCnavUrlModel)cnavUrl).getId() == null) { // create cnavUrlDAO.save(cnavUrl); } else { // update cnavUrlDAO.save(cnavUrl); } } }); } } I need to know how to do two things. 1) how to link to the page that displays the form, and pass it the ID for the record I want to edit 2) load the object from the database and have it replace the model I create in the constructor Obviously I can make a database call and get the object. Is the constructor called every time the page is requested, so that I could check for an ID and either create the model or load it from the database? If so, then I just need help with #1. Thanks, Daniel On Wed, Jul 17, 2013 at 10:19 AM, Daniel Watrous dwmaill...@gmail.comwrote: I think I'm getting it now. The Form needs to be embedded in a panel for the type of inclusion that I'm interested in. I created a CnavFormPanel.java and changed CnavForm.html to CnavFormPanel.html. I left CnavForm.java alone. In CnavModify.java I removed this Form form = new CnavForm(cnavFormArea); add(form); And added this add(new CnavFormPanel(cnavFormArea)); That works. Thanks for your help. Daniel On Wed, Jul 17, 2013 at 10:07 AM, Daniel Watrous dwmaill...@gmail.comwrote: I can make it work if I put the markup from CnavForm.html directly into CnavModify, but the form is not as reusable then. I would have to duplicate the markup for other pages that use the same form... Dnaiel On Wed, Jul 17, 2013 at 9:55 AM, Daniel Watrous dwmaill...@gmail.comwrote: That's what I tried to do. I created CnavForm.java and CnavForm.html. In the latter file I have this wicket:panel form wicket:id=cnavForm... // form details /form /wicket:panel Then I have CnavModify.java and CnavModify.html. You already see what I have in CnavModify.java from my last email. My CnavModify.html has this. wicket:extend span wicket:id=cnavFormAreaHere's the form/span /wicket:extend Rather than render I'm getting this error: Last cause: Component [cnavFormArea] (path = [0:cnavFormArea]) must be applied to a tag of type [form], not: 'span wicket:id=cnavFormArea id=cnavFormArea3' (line 0, column 0) I'll keep trying and report back when I figure it out. Daniel On Tue, Jul 16, 2013 at 10:50 PM, Paul Bors p...@bors.ws wrote: Wicket is a MVC component driven framework similar to Swing. In short, what you want to do is create your own Panel with that form file of yours and add it to another Panel as a child. See chapter 4 Keeping control over HTML of the Wicket Free Guide at: http://code.google.com/p/wicket-guide/ Also available from under the Learn section as the Books link on the right side navigation section on Wicket's home page at: http://wicket.apache.org/learn/books/ ~ Thank you, Paul Bors -Original Message- From: Daniel Watrous [mailto:dwmaill...@gmail.com] Sent: Tuesday, July 16, 2013 7:13 PM To: users@wicket.apache.org Subject: Re: Form questions Thanks Paul and Sven. I got the form to work and available in the onSubmit handler. Now I'm interested in splitting the form out into it's one file. So I created a class that has nothing more than the form, but I'm not sure how to include this into a page. In my class I do
Re: Last cause: can't serialize class $Proxy23
Your DAO is declare in your form and you use it inside an inner method, so yes, wicket is going to serrialize it. I think you should use @SpringBean, instead of @inject. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Last-cause-can-t-serialize-class-Proxy23-tp4660352p4660358.html Sent from the Users forum 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: Mutliple forms - single login popup
Easy enough to implement when 1 form with submit button on page. Much more difficult when there are N forms with a submit button on a page. Each modal would need to have a different onSubmit() behavior so that the correct form is processed after the authentication occurs. On Sunday, July 14, 2013 at 11:38 PM, Paul Borș wrote: So what's stopping you from doing so again? You simply keep the same conditions, if not logged you show the modal pop-up with the authentication form. User clicks submit on the login form and inside the onSubmit() of the form/button you run your authentication and if it passes you post the data, if not you give an error. ~ Thank you, Paul Bors On Jul 14, 2013, at 10:07 AM, Jeff Schneller j...@mootus.com (mailto:j...@mootus.com) wrote: Paul - That is how I am doing it. But I want the buttons to always appear even if not logged in. Then when clicked a modal is shown to login through a form and then the button action is finally executed. On Sunday, July 14, 2013 at 1:15 AM, Paul Bors wrote: Keep a flag in your customized Session for when the user is logged in. I keep the ID of the user record from the db so that if I need the user POJO I can lazy load it later (say to e-mail the user or to show the user's name under the My Profile page etc). If that is null, then show your pop-up, if valid then show your button. ~ Thank you, Paul Bors -Original Message- From: Jeff Schneller [mailto:j...@mootus.com] Sent: Sunday, July 14, 2013 12:13 AM To: users@wicket.apache.org (mailto:users@wicket.apache.org) Subject: Mutliple forms - single login popup Using 1.5.x. I have multiple forms (minimum of 2 but could be any number) on my page being put on the page as a ListView. Each form has its own model and 2 buttons within it that perform some action on its model. Similar to the facebook newsfeed where each news article has its own like and comment button. I have a login form on the page being shown as a jquery modal window. My requirement is that the user must be logged in before either button click is processed. I have code that works but only for one form. I want the button click to perform the business logic when user is logged in and if not logged in - show a modal login form, after successful login then perform the business logic. What is the best/easiest way to do this? Jeff Schneller Co-Founder/CTO, Mootus (http://www.mootus.com) j...@mootus.com (mailto:a...@mootus.com) M: 1-617-851-0200 Skype: jeff.schneller LinkedIn (http://www.linkedin.com/in/jeffschneller) | Twitter (https://twitter.com/Mootusco) | Website (http://www.mootus.com/) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org (mailto:users-unsubscr...@wicket.apache.org) For additional commands, e-mail: users-h...@wicket.apache.org (mailto:users-h...@wicket.apache.org) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org (mailto:users-unsubscr...@wicket.apache.org) For additional commands, e-mail: users-h...@wicket.apache.org (mailto:users-h...@wicket.apache.org)
Re: Last cause: can't serialize class $Proxy23
No, Wicket is not trying to serialize your DAO. The exception occurs in the action phase of the request handling. It looks like you've passed an object to MongoDB which has a reference to the @Injected DAO, or at least to the component that has the DAO. It's this MongoDB DefaultDBEncoder.writeObject thing that's serializing/encoding something it shouldn't. If it's not clear by inspection how the object being passed to save() holds a reference (e.g. by being an inner class) then set a breakpoint and the debugger should point to the offending reference. On Thu, Jul 18, 2013 at 2:34 PM, Daniel Watrous dwmaill...@gmail.comwrote: I found that having my DAO implement Serializable got me past the exception. Is Wicket attempting to serialize my DAO? On Thu, Jul 18, 2013 at 11:24 AM, Daniel Watrous dwmaill...@gmail.com wrote: My Wicket application uses Guice for DI and some AOP. I have successfully injected a DAO and used that to display records. However, when I try to save a new record in my form, I get the following exception Root cause: java.lang.IllegalArgumentException: can't serialize class $Proxy23 at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:270) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:226) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:226) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:120) at com.mongodb.DefaultDBEncoder.writeObject(DefaultDBEncoder.java:27) at com.mongodb.OutMessage.putObject(OutMessage.java:289) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:239) at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:204) at com.mongodb.DBCollection.insert(DBCollection.java:148) at com.mongodb.DBCollection.insert(DBCollection.java:91) at com.mongodb.DBCollection.save(DBCollection.java:810) at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:731) at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:793) at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:787) at com.hp.honeybadger.persistence.dao.morphia.MorphiaCnavUrlDAO.save(MorphiaCnavUrlDAO.java:50) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:435) at $Proxy23.save(Unknown Source) at com.hp.honeybadger.console.forms.CnavForm$1.onSubmit(CnavForm.java:72) at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1253) at org.apache.wicket.markup.html.form.Form.process(Form.java:925) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:771) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:704) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:240) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:854) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1332) at