RE: Wicket Modals and Bootstrap Modals - sizing issues
Would the l0rdn1kk0n / wicket-bootstrap community have dealt with this issue already or do they not support Wicket/Bootstrap modal windows in 'responsive' mode? Regards, Chris -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Tuesday, 18 February 2014 6:32 PM To: users@wicket.apache.org Subject: Re: Wicket Modals and Bootstrap Modals - sizing issues Hi, I think you will need to tweak some CSS rules. Wicket's ModalWindow main CSS class is 'wicket-modal'. So you have to provide CSS rule that sets the width for any .form-control in .wicket- modal. You can either use LESS/SASS to generate different rules for the different screens or with CSS media queries. Martin Grigorov Wicket Training and Consulting On Tue, Feb 18, 2014 at 8:04 AM, Chris Colman chr...@stepaheadsoftware.comwrote: We are using Wicket with Bootstrap which is fine except for modal window. With Wicket it appears as though the modal window provides all the markup for the out modal 'window'. We can provide HTML for the panels within that but the outer modal seems to be Wicket generated. This seems to be causing problems when using responsive Bootstrap because the calculations of the grid sizes are based on the screen and not the width of the modal window and so the form fields end up being wider than the form itself. Has anyone else had this problem? Is there a work around? We're not using the Wicket 'enable bootstrap' flag in the settings as we support bootstrap and non bootstrap markup within the same wicket app. Regards, Chris - 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
display XML in a popup (or another window) wicket 6.9.1
hi, i want to display an xml string like with a ResourceLink but i want this xml string to be uploaded from the database when i click on the link. before wicket 6.9.1 i used the DocumentInlineFrame from Ernesto Reinaldo Barreiro and it works fine in a popup with a button ... but with 6.9.1, i cant make it work. Can someone help me ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527.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: display XML in a popup (or another window) wicket 6.9.1
What's the problem you are facing? On Tue, Feb 18, 2014 at 12:30 PM, BenHoit benoit.lanoise...@orange.comwrote: hi, i want to display an xml string like with a ResourceLink but i want this xml string to be uploaded from the database when i click on the link. before wicket 6.9.1 i used the DocumentInlineFrame from Ernesto Reinaldo Barreiro and it works fine in a popup with a button ... but with 6.9.1, i cant make it work. Can someone help me ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527.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 -- Regards - Ernesto Reinaldo Barreiro
Re: Wicket Modals and Bootstrap Modals - sizing issues
No. l0rdn1kk0n/wicket-bootstrap provides Wicket component for TB's Modal widget. It doesn't try to fix/workaround any issues with Wicket's ModalWindow. There are tickets like https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/228 but I doubt we will implement them. Martin Grigorov Wicket Training and Consulting On Tue, Feb 18, 2014 at 11:38 AM, Chris Colman chr...@stepaheadsoftware.com wrote: Would the l0rdn1kk0n / wicket-bootstrap community have dealt with this issue already or do they not support Wicket/Bootstrap modal windows in 'responsive' mode? Regards, Chris -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Tuesday, 18 February 2014 6:32 PM To: users@wicket.apache.org Subject: Re: Wicket Modals and Bootstrap Modals - sizing issues Hi, I think you will need to tweak some CSS rules. Wicket's ModalWindow main CSS class is 'wicket-modal'. So you have to provide CSS rule that sets the width for any .form-control in .wicket- modal. You can either use LESS/SASS to generate different rules for the different screens or with CSS media queries. Martin Grigorov Wicket Training and Consulting On Tue, Feb 18, 2014 at 8:04 AM, Chris Colman chr...@stepaheadsoftware.comwrote: We are using Wicket with Bootstrap which is fine except for modal window. With Wicket it appears as though the modal window provides all the markup for the out modal 'window'. We can provide HTML for the panels within that but the outer modal seems to be Wicket generated. This seems to be causing problems when using responsive Bootstrap because the calculations of the grid sizes are based on the screen and not the width of the modal window and so the form fields end up being wider than the form itself. Has anyone else had this problem? Is there a work around? We're not using the Wicket 'enable bootstrap' flag in the settings as we support bootstrap and non bootstrap markup within the same wicket app. Regards, Chris - 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: display XML in a popup (or another window) wicket 6.9.1
in wicket 1.4, i used an IndicatingAjaxLink and in onClick method, i asked my database, get a String, transform it in a byte[] and used DocumentInlineFrame with an XmlResource class extended DynamicWebResource import org.apache.wicket.markup.html.DynamicWebResource; public class MyXmlResource extends DynamicWebResource { private static final long serialVersionUID = 1L; private byte[] myXml; public MyXmlResource(byte[] thisXml) { this.myXml = thisXml; } /* (non-Javadoc) * @see org.apache.wicket.markup.html.DynamicWebResource#getResourceState() */ @Override protected ResourceState getResourceState() { return new ResourceState() { @Override public String getContentType() { return application/xml; } @Override public byte[] getData() { try { return myXml; } catch (Exception e) { return null; } } }; } } public class OdyReqTargetPanel extends Panel { private static final long serialVersionUID = 1L; public OdyReqTargetPanel(String id,byte[] res) { super(id); //setRenderBodyOnly(true); add(new DocumentInlineFrame(mypdf, new MyXmlResource(res))); } } in wicket 6.9.1, DynamicWebResource doesn't exist any more ... and i don't know what i can use -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527p4664530.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: display XML in a popup (or another window) wicket 6.9.1
Hi, Try this https://github.com/reiern70/antilia-bits/tree/master/content-iframe On Tue, Feb 18, 2014 at 1:04 PM, BenHoit benoit.lanoise...@orange.comwrote: in wicket 1.4, i used an IndicatingAjaxLink and in onClick method, i asked my database, get a String, transform it in a byte[] and used DocumentInlineFrame with an XmlResource class extended DynamicWebResource import org.apache.wicket.markup.html.DynamicWebResource; public class MyXmlResource extends DynamicWebResource { private static final long serialVersionUID = 1L; private byte[] myXml; public MyXmlResource(byte[] thisXml) { this.myXml = thisXml; } /* (non-Javadoc) * @see org.apache.wicket.markup.html.DynamicWebResource#getResourceState() */ @Override protected ResourceState getResourceState() { return new ResourceState() { @Override public String getContentType() { return application/xml; } @Override public byte[] getData() { try { return myXml; } catch (Exception e) { return null; } } }; } } public class OdyReqTargetPanel extends Panel { private static final long serialVersionUID = 1L; public OdyReqTargetPanel(String id,byte[] res) { super(id); //setRenderBodyOnly(true); add(new DocumentInlineFrame(mypdf, new MyXmlResource(res))); } } in wicket 6.9.1, DynamicWebResource doesn't exist any more ... and i don't know what i can use -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527p4664530.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 -- Regards - Ernesto Reinaldo Barreiro
Re: display XML in a popup (or another window) wicket 6.9.1
i have tried it but i don't know how to replace the new PackageResourceStream(HomePage.class, ScalaOverview.pdf) i haven't a resourceStream but a string (or a byte[]) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527p4664532.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: display XML in a popup (or another window) wicket 6.9.1
On Tue 18.02.2014 04:15, BenHoit wrote: i have tried it but i don't know how to replace the new PackageResourceStream(HomePage.class, ScalaOverview.pdf) i haven't a resourceStream but a string (or a byte[]) Try this: private final IResource resource; /** * Constructor. * * @param id ID of component * */ public AbstractXmlContentIframe(final String id) { super(id); resource = new ResourceStreamResource(new AbstractStringResourceStream(text/xml) { private static final long serialVersionUID = 1L; @Override protected String getString() { // Return your XML here } }); } -Timo - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
new wicket-bootstrap version in mvn central
Hi Martin, Michael, Did you already scheduled when will be the next version of wicket-bootstrap in mvn central including Twitter Bootstrap 3.1.1? I would love to have the new feature for resize the Modal. Best, Marvin Richter
Re: new wicket-bootstrap version in mvn central
Hi Marvin, Have you tested your app with the -SNAPSHOT version ? I didn't have much time to read carefully the release notes of TB 3.1.0 and 3.1.1 and I am not sure that everything is stable. Martin Grigorov Wicket Training and Consulting On Tue, Feb 18, 2014 at 1:46 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: Hi Martin, Michael, Did you already scheduled when will be the next version of wicket-bootstrap in mvn central including Twitter Bootstrap 3.1.1? I would love to have the new feature for resize the Modal. Best, Marvin Richter
Re: display XML in a popup (or another window) wicket 6.9.1
so strange ... i put log in getString method (and in onResourceRequested of the DocumentInlineFrame). they are never called and my panel is filled with random xml. i also log the database request and the response (before calling new OdyReqTargetPanel) : they are correct public class OdyReqTargetPanel extends Panel { private static final long serialVersionUID = 1L; private static final Logger log = LoggerFactory.getLogger(OrdersPage.class.getName()); public OdyReqTargetPanel(String id,final byte[] res) { super(id); //setRenderBodyOnly(true); add(new DocumentInlineFrame(myxml, new ResourceStreamResource(new AbstractStringResourceStream(text/xml) { @Override protected String getString() { log.debug(ResourceStreamResource = [+new String(res)+]); return new String(res); } }))); } } public class DocumentInlineFrame extends WebMarkupContainer implements IResourceListener { private static final long serialVersionUID = 1L; private static final Logger log = LoggerFactory.getLogger(OrdersPage.class.getName()); private IResource documentResource; /** * * Constructor receiving an IResourceStream. * * @param id * @param stream */ public DocumentInlineFrame(String id, IResourceStream stream) { this(id, new ResourceStreamResource(stream)); } /** * Constructor receiving an IResource.. * * @param id * @param resourceListener */ public DocumentInlineFrame(final String id, IResource documentResource) { super(id); this.documentResource = documentResource; } /** * Gets the url to use for this link. * * @return The URL that this link links to */ protected CharSequence getURL() { return urlFor(IResourceListener.INTERFACE, null); } /** * Handles this frame's tag. * * @param tag * the component tag * @see org.apache.wicket.Component#onComponentTag(ComponentTag) */ @Override protected final void onComponentTag(final ComponentTag tag) { checkComponentTag(tag, iframe); // Set href to link to this frame's frameRequested method CharSequence url = getURL(); // generate the src attribute tag.put(src, Strings.replaceAll(url, , amp;)); super.onComponentTag(tag); } @Override protected boolean getStatelessHint() { return false; } public void onResourceRequested() { log.debug(onResourceRequested = [+this.documentResource+]); RequestCycle requestCycle = RequestCycle.get(); Attributes attributes = new Attributes(requestCycle.getRequest(), requestCycle.getResponse(), null); this.documentResource.respond(attributes); } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527p4664537.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: new wicket-bootstrap version in mvn central
I didn't have the time either but will do so in the next days. Will let you know if I face some problems. Marvin Richter -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Tuesday, February 18, 2014 1:57 PM To: users@wicket.apache.org Subject: Re: new wicket-bootstrap version in mvn central Hi Marvin, Have you tested your app with the -SNAPSHOT version ? I didn't have much time to read carefully the release notes of TB 3.1.0 and 3.1.1 and I am not sure that everything is stable. Martin Grigorov Wicket Training and Consulting On Tue, Feb 18, 2014 at 1:46 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: Hi Martin, Michael, Did you already scheduled when will be the next version of wicket-bootstrap in mvn central including Twitter Bootstrap 3.1.1? I would love to have the new feature for resize the Modal. Best, Marvin Richter
Re: display XML in a popup (or another window) wicket 6.9.1
Do you want me to create an example and upload it to the repository? What shout be the content? Any XML file/content? On Tue, Feb 18, 2014 at 1:58 PM, BenHoit benoit.lanoise...@orange.comwrote: so strange ... i put log in getString method (and in onResourceRequested of the DocumentInlineFrame). they are never called and my panel is filled with random xml. i also log the database request and the response (before calling new OdyReqTargetPanel) : they are correct public class OdyReqTargetPanel extends Panel { private static final long serialVersionUID = 1L; private static final Logger log = LoggerFactory.getLogger(OrdersPage.class.getName()); public OdyReqTargetPanel(String id,final byte[] res) { super(id); //setRenderBodyOnly(true); add(new DocumentInlineFrame(myxml, new ResourceStreamResource(new AbstractStringResourceStream(text/xml) { @Override protected String getString() { log.debug(ResourceStreamResource = [+new String(res)+]); return new String(res); } }))); } } public class DocumentInlineFrame extends WebMarkupContainer implements IResourceListener { private static final long serialVersionUID = 1L; private static final Logger log = LoggerFactory.getLogger(OrdersPage.class.getName()); private IResource documentResource; /** * * Constructor receiving an IResourceStream. * * @param id * @param stream */ public DocumentInlineFrame(String id, IResourceStream stream) { this(id, new ResourceStreamResource(stream)); } /** * Constructor receiving an IResource.. * * @param id * @param resourceListener */ public DocumentInlineFrame(final String id, IResource documentResource) { super(id); this.documentResource = documentResource; } /** * Gets the url to use for this link. * * @return The URL that this link links to */ protected CharSequence getURL() { return urlFor(IResourceListener.INTERFACE, null); } /** * Handles this frame's tag. * * @param tag * the component tag * @see org.apache.wicket.Component#onComponentTag(ComponentTag) */ @Override protected final void onComponentTag(final ComponentTag tag) { checkComponentTag(tag, iframe); // Set href to link to this frame's frameRequested method CharSequence url = getURL(); // generate the src attribute tag.put(src, Strings.replaceAll(url, , amp;)); super.onComponentTag(tag); } @Override protected boolean getStatelessHint() { return false; } public void onResourceRequested() { log.debug(onResourceRequested = [+this.documentResource+]); RequestCycle requestCycle = RequestCycle.get(); Attributes attributes = new Attributes(requestCycle.getRequest(), requestCycle.getResponse(), null); this.documentResource.respond(attributes); } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527p4664537.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 -- Regards - Ernesto Reinaldo Barreiro
Re: display XML in a popup (or another window) wicket 6.9.1
in fact not never called but sometimes called !! my button is in a DataView (there is one button per line). i also have a PagingNavigator if i change the page in the paging navigator, getString and onResourceRequested are sometimes called on the first click. but never after. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527p4664540.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: display XML in a popup (or another window) wicket 6.9.1
That smell to client caching the resourse: try to add some random noise to the URL On Tue, Feb 18, 2014 at 2:06 PM, BenHoit benoit.lanoise...@orange.comwrote: in fact not never called but sometimes called !! my button is in a DataView (there is one button per line). i also have a PagingNavigator if i change the page in the paging navigator, getString and onResourceRequested are sometimes called on the first click. but never after. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527p4664540.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 -- Regards - Ernesto Reinaldo Barreiro
Re: display XML in a popup (or another window) wicket 6.9.1
On Tue 18.02.2014 05:06, BenHoit wrote: in fact not never called but sometimes called !! my button is in a DataView (there is one button per line). i also have a PagingNavigator if i change the page in the paging navigator, getString and onResourceRequested are sometimes called on the first click. but never after. This seems to be a caching issue. Append some random noise to the URL (src attribute) in onComponentTag(ComponentTag tag). -Timo - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: display XML in a popup (or another window) wicket 6.9.1
i think you are right because when i clean my browser cache between each click, it works every time ! but, sorry, i don't know how to Append some random noise to the URL (src attribute) in onComponentTag(ComponentTag tag) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527p4664544.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
Thanks !
Thanks a lot for your help ! I was circling for a long time ... De : Timo Schmidt [via Apache Wicket] [mailto:ml-node+s1842946n4664542...@n4.nabble.com] Envoyé : mardi 18 février 2014 14:12 À : LANOISELÉE Benoît OF/DSIF Objet : Re: display XML in a popup (or another window) wicket 6.9.1 On Tue 18.02.2014 05:06, BenHoit wrote: in fact not never called but sometimes called !! my button is in a DataView (there is one button per line). i also have a PagingNavigator if i change the page in the paging navigator, getString and onResourceRequested are sometimes called on the first click. but never after. This seems to be a caching issue. Append some random noise to the URL (src attribute) in onComponentTag(ComponentTag tag). -Timo - To unsubscribe, e-mail: [hidden email]/user/SendEmail.jtp?type=nodenode=4664542i=0 For additional commands, e-mail: [hidden email]/user/SendEmail.jtp?type=nodenode=4664542i=1 If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/display-XML-in-a-popup-or-another-window-wicket-6-9-1-tp4664527p4664542.html To unsubscribe from display XML in a popup (or another window) wicket 6.9.1, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4664527code=YmVub2l0Lmxhbm9pc2VsZWVAb3JhbmdlLmNvbXw0NjY0NTI3fC0xNTc3NDg1MzQz. NAMLhttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml _ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Thanks-tp4664545.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: display XML in a popup (or another window) wicket 6.9.1
On Tue 18.02.2014 05:33, BenHoit wrote: i think you are right because when i clean my browser cache between each click, it works every time ! but, sorry, i don't know how to Append some random noise to the URL (src attribute) in onComponentTag(ComponentTag tag) See Image#addAntiCacheParameter as an example. -Timo - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Possible issue in Localizer - Wicket Version 6.13.0
Hi, any application can add custom IStringResourceLoaders with IResourceSettings#getStringResourceLoaders().add(mine) Now the question is: is there a bug in Wicket or in your app ? Please investigate :-) I think there were no changes in Wicket related to this functionality for a fairly long time. Martin Grigorov Wicket Training and Consulting On Tue, Feb 18, 2014 at 6:11 PM, René Hartwig rene.hart...@befine-solutions.com wrote: Hi, just stumbled across this problem after I updated to the latest Wicket Release: Is anything known about this? I did not make any further investigations, so if you need more details just tell me. Thanks and regards, René Hartwig -- Mit freundlichen Grüßen / Best regards, René Hartwig Senior Developer *Befine Solutions AG - The Cryptshare Company* Bebelstraße 17 79108 Freiburg Germany Tel: +49 (0) 761 38913 0 Fax: +49 (0) 761 38913 115 E-Mail: *rene.hart...@befine-solutions.com rene.hart...@befine-solutions.com* Internet: http://www.cryptshare.com = Your attachments are too large or too confidential for e-mail? Get to know Cryptshare! http://www.cryptshare.com = http://www.linkedin.com/company/befine-solutions/products Amtsgericht Freiburg HRB 6144 Vorstand Mark Forrest, Dominik Lehr Aufsichtsratsvorsitzender Thilo Braun
Re: How to start Wizard with an active step? / Best practise?
Hi Paul, thanx for your answer. I will have a look at extending it. :-) kind regards Patrick Am 17.02.2014 22:44, schrieb Paul Bors: We need to build the WizardModel in a dynamic way. Although I think there is a better more dynamic step too that can be used here. So one cheap solution is to keep an enum or some sort of a definition of your wizard steps: public static enum WizStep { /** Step 1 of N */ STEP_ONE(1), /** Step N of N */ STEP_N; ... private int stepNum; WizStep(int stepNum) { this.stepNum = stepNum; } public int getNum() { return this.stepNum; } } Then extend the wizard and build the model starting at the given step like so: private class MyWizard extends Wizard { private static final long serialVersionUID = 1L; public MyWizard(String id, WizStep startStep) { super(id); setDefaultModel(ediPojoModel); WizardModel model = new WizardModel(); if(WizStep.STEP_ONE.getNum() = startStep.getNum()) { model.add(new FirstWiwardStep()}); } // Keep adding the rest of the steps ... if(WizStep.STEP_N.getNum() = startStep.getNum()) { model.add(new NthStep()); } init(model); } } Maybe a better approach is to create your own parent intelligent wizard step that will skip itself in the init() or onInit() method till it get to the Active step then you could build your model as normal. Have fun. On Mon, Feb 17, 2014 at 12:21 PM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi all, what is the best way to start a Wizard in a particular step? I tried: - to override onInit of WizardStep and setting this to activeStep, when the state is the right one, but init() of WizardModel always determines the next step after me (the current active), so this seems not to be a good way. I could set the prevoius, but this is quite faked. - to implement a condition; state is determined correct, but than all buttons are deactive, hmm... - manually setting setActiveStep() after init of WizardModel, but this needs to unpack model object to construction time to evaluate my state on my own (but it worked as expected). Did I miss something? Or is the third implementation the best trade-off? 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
Issue on multi-threaded page when opening another tab in browser
Okay, so I have an issue that I have finally narrowed down to multi-threading issues. I have a loader page that has a worker thread to process a csv file and store the results into a list declared as: List batchLines = Collections.synchronizedList(new CopyOnWriteArrayListBatchLine()); Each BatchLine object is a row in the csv file that was processed. I also have a pageableListView on the page that uses the BatchLine List to update itself. I use a AjaxSelfUpdatingTimerBehavior which will update the pageableListView every two seconds. The problem is, if I am on this page in one browser tab, and the workerthread is running, and the page is updating, and then at the same time I open another instance of the application in another tab of the same browser, the thread loses focus of this List. I know this because I print out the size of the list, and it stays the same when I open a new instance. I first had the List batchLines Global, but now I pass it as a parameter to keep it local to each method. When it was global, I had to mark it transient for serializable issues. The issue with this is the page would crash when I opened a new tab with another instance of the application. What can I do to prevent this? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Issue-on-multi-threaded-page-when-opening-another-tab-in-browser-tp4664552.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
3rd party JS+Wicket 6.6.0=MyWidget ?
Hi all, is there any recipes how integrate 3rd party javascript component to wicket component. For example i have Timeline js class and i need to bind it to WebComponent as container, what steps i need to do. -- Regards, Farrukh
Re: 3rd party JS+Wicket 6.6.0=MyWidget ?
Is this JS library the one what you mean? http://timeline.knightlab.com/ if so, iframe wicket:id=timeline width='100%' height='650' frameborder='0'/iframe Java /** * @author reiern70 * */ public class TimeLineContainer extends WebMarkupContainer { public TimeLineContainer(String id, IModelString url) { super(id, url); } @Override protected void onComponentTag(ComponentTag tag) { checkComponentTag(tag, iframe); CharSequence url = getURL(); // generate the src attribute tag.put(src, Strings.replaceAll(url, , amp;)); super.onComponentTag(tag); } private CharSequence getURL() { return getDefaultModelObjectAsString(); } } I haven't tried the above but it might work On Wed, Feb 19, 2014 at 7:45 AM, Farrukh SATTOROV fireda...@gmail.comwrote: Hi all, is there any recipes how integrate 3rd party javascript component to wicket component. For example i have Timeline js class and i need to bind it to WebComponent as container, what steps i need to do. -- Regards, Farrukh -- Regards - Ernesto Reinaldo Barreiro
Re: 3rd party JS+Wicket 6.6.0=MyWidget ?
i mean this js library visjs.org and timeline is http://visjs.org/examples/timeline/01_basic.html On Wed, Feb 19, 2014 at 11:13 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Is this JS library the one what you mean? http://timeline.knightlab.com/ if so, iframe wicket:id=timeline width='100%' height='650' frameborder='0'/iframe Java /** * @author reiern70 * */ public class TimeLineContainer extends WebMarkupContainer { public TimeLineContainer(String id, IModelString url) { super(id, url); } @Override protected void onComponentTag(ComponentTag tag) { checkComponentTag(tag, iframe); CharSequence url = getURL(); // generate the src attribute tag.put(src, Strings.replaceAll(url, , amp;)); super.onComponentTag(tag); } private CharSequence getURL() { return getDefaultModelObjectAsString(); } } I haven't tried the above but it might work On Wed, Feb 19, 2014 at 7:45 AM, Farrukh SATTOROV fireda...@gmail.com wrote: Hi all, is there any recipes how integrate 3rd party javascript component to wicket component. For example i have Timeline js class and i need to bind it to WebComponent as container, what steps i need to do. -- Regards, Farrukh -- Regards - Ernesto Reinaldo Barreiro -- Regards, Farrukh
Re: Issue on multi-threaded page when opening another tab in browser
Hi, On Wed, Feb 19, 2014 at 3:23 AM, eaglei22 jchojnack...@gmail.com wrote: Okay, so I have an issue that I have finally narrowed down to multi-threading issues. I have a loader page that has a worker thread to process a csv file and store the results into a list declared as: List batchLines = Collections.synchronizedList(new CopyOnWriteArrayListBatchLine()); Where is declared this list ? I.e. who keeps the reference to it ? Also how do you start the Thread ? Each BatchLine object is a row in the csv file that was processed. I also have a pageableListView on the page that uses the BatchLine List to update itself. I use a AjaxSelfUpdatingTimerBehavior which will update the pageableListView every two seconds. The problem is, if I am on this page in one browser tab, and the workerthread is running, and the page is updating, and then at the same time I open another instance of the application in another tab of the same browser, the thread loses focus of this List. I know this because I print out the size of the list, and it stays the same when I open a new instance. I first had the List batchLines Global, but now I pass it as a parameter to keep it local to each method. When it was global, I had to mark it transient for serializable issues. The issue with this is the page would crash when I opened a new tab with another instance of the application. What can I do to prevent this? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Issue-on-multi-threaded-page-when-opening-another-tab-in-browser-tp4664552.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: 3rd party JS+Wicket 6.6.0=MyWidget ?
Hi, Usually the steps to integrate any JS widget with Wicket are: 1) create a custom Component or Behavior that will contribute the .js (and any .css, images, ... if needed) in #renderHead() 2) if the JS widget needs configuration (e.g. some JSON object passed to the widget's constructor) then use again #renderHead() to write it to the response 3) if the JS widget provides functionality to send data back to the server then use either Ajax Behavior, IResourceListener or mounted resource I recommend you to check the source of some integrations: - https://github.com/sebfz1/wicket-jquery-ui - https://github.com/l0rdn1kk0n/wicket-bootstrap Martin Grigorov Wicket Training and Consulting On Wed, Feb 19, 2014 at 8:45 AM, Farrukh SATTOROV fireda...@gmail.comwrote: Hi all, is there any recipes how integrate 3rd party javascript component to wicket component. For example i have Timeline js class and i need to bind it to WebComponent as container, what steps i need to do. -- Regards, Farrukh
Re: 3rd party JS+Wicket 6.6.0=MyWidget ?
Thank you, Martin On Wed, Feb 19, 2014 at 11:42 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, Usually the steps to integrate any JS widget with Wicket are: 1) create a custom Component or Behavior that will contribute the .js (and any .css, images, ... if needed) in #renderHead() 2) if the JS widget needs configuration (e.g. some JSON object passed to the widget's constructor) then use again #renderHead() to write it to the response 3) if the JS widget provides functionality to send data back to the server then use either Ajax Behavior, IResourceListener or mounted resource I recommend you to check the source of some integrations: - https://github.com/sebfz1/wicket-jquery-ui - https://github.com/l0rdn1kk0n/wicket-bootstrap Martin Grigorov Wicket Training and Consulting On Wed, Feb 19, 2014 at 8:45 AM, Farrukh SATTOROV fireda...@gmail.com wrote: Hi all, is there any recipes how integrate 3rd party javascript component to wicket component. For example i have Timeline js class and i need to bind it to WebComponent as container, what steps i need to do. -- Regards, Farrukh -- Regards, Farrukh
Re: 3rd party JS+Wicket 6.6.0=MyWidget ?
I just delving in these libraries On Wed, Feb 19, 2014 at 11:51 AM, Farrukh SATTOROV fireda...@gmail.comwrote: Thank you, Martin On Wed, Feb 19, 2014 at 11:42 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, Usually the steps to integrate any JS widget with Wicket are: 1) create a custom Component or Behavior that will contribute the .js (and any .css, images, ... if needed) in #renderHead() 2) if the JS widget needs configuration (e.g. some JSON object passed to the widget's constructor) then use again #renderHead() to write it to the response 3) if the JS widget provides functionality to send data back to the server then use either Ajax Behavior, IResourceListener or mounted resource I recommend you to check the source of some integrations: - https://github.com/sebfz1/wicket-jquery-ui - https://github.com/l0rdn1kk0n/wicket-bootstrap Martin Grigorov Wicket Training and Consulting On Wed, Feb 19, 2014 at 8:45 AM, Farrukh SATTOROV fireda...@gmail.com wrote: Hi all, is there any recipes how integrate 3rd party javascript component to wicket component. For example i have Timeline js class and i need to bind it to WebComponent as container, what steps i need to do. -- Regards, Farrukh -- Regards, Farrukh -- Regards, Farrukh