Re: introducing wicket:for attribute
based on some feedback i changed the class name of the inner span from "text" to "label-text" to reduce chance of css collisions -igor On Fri, Jul 8, 2011 at 9:22 PM, Igor Vaynberg wrote: > just implemented the wicket:for attribute. check out the javadoc here: > > http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java?view=markup&pathrev=1144589 > > 1.4.x only for now, still needs to be forward-ported to trunk. > > feedback? > > -igor > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: best way to add tooltips in wicket
Cant remember what the mootip panel are doing.. heres the link for the source though: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/jdk-1.5-parent/minis-parent/minis/src/main/java/org/wicketstuff/minis/mootipbehavior/ 2011/7/12 Rodrigo Heffner : > Thanks again, Martin. > > I realised earlier that the below only renders the default browser > title attribute, so no CSS editing for it: > > add(new Label("tooltip01", "this is tool tip 01").add(new MootipBehaviour( > "This is my tool tip", > "I can be very long and even have formatting like and be > strong"))); > > Then I tried the following code, but I can't find the class MooPanel: > > MootipSettings mooSettings = new MootipSettings(); > mooSettings.setEvalAlways(true); > MootipBehaviour behaviour = new MootipBehaviour(new MooPanel()); > behaviour.setMootipSettings(mooSettings); > > add(new Label("tooltip02", "this is tool tip 02").add(behaviour)); > > My dependency for this is: > > > org.wicketstuff > minis > 1.4.15 > jar > > > Any ideas, anyone? > > Sorry for all the questions > > On Tue, Jul 12, 2011 at 3:44 PM, Martin Grigorov wrote: >> On Tue, Jul 12, 2011 at 4:42 PM, rodrigo.bezerra >> wrote: >>> Thank you very much, Martin. >>> >>> I'm using something very similar to the example: >>> >>> add(new Label("tooltip01", "this is tool tip 01").add(new MootipBehaviour( >>> "This is my tool tip", >>> "I can be very long and even have formatting like and be >>> strong"))); >>> >>> Two questions: >>> - Where can I edit the Tooltip's CSS? As of now, I see a squared box with a >>> yellow background. >> I guess MootipBehavior should deliver this CSS as PackageResourceReference >>> - Can I set some setting so I can select the text inside the tooltip? When I >>> move my mouse in the direction of the tooltip, it disappears. >> I have no experience with Mootip... >>> >>> Again, thank you for your help and prompt response. >>> >>> -- >>> View this message in context: >>> http://apache-wicket.1842946.n4.nabble.com/best-way-to-add-tooltips-in-wicket-tp1882871p3662487.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 >>> >>> >> >> >> >> -- >> Martin Grigorov >> jWeekend >> Training, Consulting, Development >> http://jWeekend.com >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > > -- > Rodrigo H M Bezerra > > - > 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: how to set focus in a listview coponent
JavaScript: Wicket.$('firstTextFieldId').focus(); On Tue, Jul 12, 2011 at 6:08 PM, sri357 wrote: > I am able to set focus using target.focusComponet() on an event,but how to > set focus in a textfield without using any event. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/how-to-set-focus-in-a-listview-coponent-tp3662151p3662730.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 > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: best way to add tooltips in wicket
Thanks again, Martin. I realised earlier that the below only renders the default browser title attribute, so no CSS editing for it: add(new Label("tooltip01", "this is tool tip 01").add(new MootipBehaviour( "This is my tool tip", "I can be very long and even have formatting like and be strong"))); Then I tried the following code, but I can't find the class MooPanel: MootipSettings mooSettings = new MootipSettings(); mooSettings.setEvalAlways(true); MootipBehaviour behaviour = new MootipBehaviour(new MooPanel()); behaviour.setMootipSettings(mooSettings); add(new Label("tooltip02", "this is tool tip 02").add(behaviour)); My dependency for this is: org.wicketstuff minis 1.4.15 jar Any ideas, anyone? Sorry for all the questions On Tue, Jul 12, 2011 at 3:44 PM, Martin Grigorov wrote: > On Tue, Jul 12, 2011 at 4:42 PM, rodrigo.bezerra > wrote: >> Thank you very much, Martin. >> >> I'm using something very similar to the example: >> >> add(new Label("tooltip01", "this is tool tip 01").add(new MootipBehaviour( >> "This is my tool tip", >> "I can be very long and even have formatting like and be >> strong"))); >> >> Two questions: >> - Where can I edit the Tooltip's CSS? As of now, I see a squared box with a >> yellow background. > I guess MootipBehavior should deliver this CSS as PackageResourceReference >> - Can I set some setting so I can select the text inside the tooltip? When I >> move my mouse in the direction of the tooltip, it disappears. > I have no experience with Mootip... >> >> Again, thank you for your help and prompt response. >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/best-way-to-add-tooltips-in-wicket-tp1882871p3662487.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 >> >> > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Rodrigo H M Bezerra - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to set focus in a listview coponent
I am able to set focus using target.focusComponet() on an event,but how to set focus in a textfield without using any event. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-set-focus-in-a-listview-coponent-tp3662151p3662730.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: url for images from database
https://cwiki.apache.org/WICKET/uploaddownload.html -igor On Tue, Jul 12, 2011 at 2:54 AM, Miroslav F. wrote: > Is there example? How to get shared resource key from byte[] (image from > DB)? In my App class i do for several > shared resources: > mountSharedResource("/styles/style.css", new ResourceReference(Styles.class, > "style.css").getSharedResourceKey()); > > Is is possible in this code getsharedResource() for byte[] (image from DB) > in some way? > > >> -Original Message- >> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] >> Sent: Sunday, 10. July 2011 18:16 >> To: users@wicket.apache.org >> Subject: Re: url for images from database >> >> use a shared resource to output the images instead of an >> Image component >> >> -igor >> >> On Sun, Jul 10, 2011 at 6:44 AM, Miroslav F. wrote: >> > Hi folks, >> > >> > please direct me to right docu with following problem: I >> have image as >> > byte[] from database which I display on pages. >> > >> > Works fine, on image atribute src is somethink like this: >> > > > src="?wicket:interface=:0:repeater:1:obrazok::IResourceListener::"/> >> > >> > For lightbox I need make this "ugly" src atribute transform to >> > something like src="/images/xxx.jpg" and mount it >> on-the-fly but don't >> > know how to do it. >> > >> > Is somewhere related example please? >> > >> > Thanks in advance, >> > >> > Miro >> > >> > >> > >> - >> > 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 > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'AboutUs' not found
Hi, attach java code and HTML of this new class so we can take a look. Hi, I am extending a class SomeDetailPage which extends SomePage which in turn extends WebPage. Now this SomeDetailPage is working fine and has no issues. But I have created a new class and extended some of its features and when I am trying to deploy it I am getting the error org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'AboutUs' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried: [Page class = AboutUs, id = 11, version = 0]. I have checked if the html is not copied into the folder which has AboutUs.class, but it's there, checked if naming was different, no use. I couldn't find why I am not able to run it and couldn't even find out the reason why so that I could atleast try a workaround. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-markup-MarkupNotFoundException-Markup-of-type-html-for-component-AboutUs-not-found-tp3662335p3662335.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: DynamicImageResource and urls
use a shared resource and pass a key on the url store a key in session as well if they match then the request came from the same session -igor On Tue, Jul 12, 2011 at 12:29 AM, datazuul wrote: > that is exactly my problem: > - I get image data from my backend > - I need url to some serving wicket resource (to be used in javascript) > - I need the url not public (like a shared resource) but only for session > > something like: urlFor(DynamicImageResource) > > Did you solve it? Any hints for me? (Wicket 1.4.17) > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/DynamicImageResource-and-urls-tp1870316p3661636.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: best way to add tooltips in wicket
On Tue, Jul 12, 2011 at 4:42 PM, rodrigo.bezerra wrote: > Thank you very much, Martin. > > I'm using something very similar to the example: > > add(new Label("tooltip01", "this is tool tip 01").add(new MootipBehaviour( > "This is my tool tip", > "I can be very long and even have formatting like and be > strong"))); > > Two questions: > - Where can I edit the Tooltip's CSS? As of now, I see a squared box with a > yellow background. I guess MootipBehavior should deliver this CSS as PackageResourceReference > - Can I set some setting so I can select the text inside the tooltip? When I > move my mouse in the direction of the tooltip, it disappears. I have no experience with Mootip... > > Again, thank you for your help and prompt response. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/best-way-to-add-tooltips-in-wicket-tp1882871p3662487.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 > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: best way to add tooltips in wicket
Thank you very much, Martin. I'm using something very similar to the example: add(new Label("tooltip01", "this is tool tip 01").add(new MootipBehaviour( "This is my tool tip", "I can be very long and even have formatting like and be strong"))); Two questions: - Where can I edit the Tooltip's CSS? As of now, I see a squared box with a yellow background. - Can I set some setting so I can select the text inside the tooltip? When I move my mouse in the direction of the tooltip, it disappears. Again, thank you for your help and prompt response. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/best-way-to-add-tooltips-in-wicket-tp1882871p3662487.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: how to set focus in a listview coponent
org.apache.wicket.ajax.AjaxRequestTarget.focusComponent(firstTextField) On Tue, Jul 12, 2011 at 2:53 PM, sri357 wrote: > Hi, > > I have a table with a list view displaying one textbox in one column,and > next column is again a listview displaying textboxes depending on its > size.The problem i am facing here is,whenever i enter some text in the > second textbox,im implementing a ajax onblurr event to format text and > refreshing the container holding the second listview to make the changes > visible.After refreshing container i am unable to view cursor in the page. I > want to set focus either in the first textbox or textbox next to the one > where i entered data in the second list view.Can anyone help me out with > this. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/how-to-set-focus-in-a-listview-coponent-tp3662151p3662151.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 > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: best way to add tooltips in wicket
See https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/minis-parent/minis-examples/src/main/java/org/wicketstuff/minis/MooTipPage.java The impl is in https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/minis It is available in Maven repos too. On Tue, Jul 12, 2011 at 3:56 PM, rodrigo.bezerra wrote: > Hi guys. I'm very new to wicket and I'm trying to add tooltips on a project. > > Do you have any tutorials / examples using mootips? I've searched for this > for a while now but couldn't find much besides this thread. Ideally I'd like > something like this (http://jqwicket.appspot.com/tiptip). I've tried this > already but it doesn't work (negative -1000s margins). > > I want to use it on a listview, sort of a "more details" column that would > show extra info. > > I'm using Wicket 1.4x on a Mac. > > Thank you in advance. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/best-way-to-add-tooltips-in-wicket-tp1882871p3662356.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 > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Why is stateless from making my page stateful?
by making them shared ?! On Tue, Jul 12, 2011 at 3:55 PM, Mike Mander wrote: > Thanks Martin for the dev-utils hint. You're right for my problem. > It seems that all my images have the statelessHint = false. > > But: How can i make my image resource references stateless? > > Thanks > Mike > >> I think ImageButton is the component that makes it stateful. >> >> To be sure use wicket-devutils, annotate the page with >> @StatelessComponent and add StatelessChecker as >> IComponentOnBeforeRenderListener in your application. >> >> On Tue, Jul 12, 2011 at 2:14 PM, Mike Mander wrote: >>> >>> Hi, >>> >>> i use a page with a border. I add a panel with a stateless form to the >>> border and the page gets stateful. Why? >>> The symtoms are - NotSerializableExceptions and RuntimeException if i >>> click >>> the submit. >>> Form action: >>> >>> ../../../../Overview.html/gdw_exact/Party/of/47/wicket:interface/:0:ambiance:search:searchSlot::IFormSubmitListener:: >>> >>> I'm definitly doing something stupid, but i can't see what. Maybe someone >>> can point me to a doc or something. >>> >>> Thanks >>> Mike >>> >>> ShopBorder.java >>> >>> public class ShopBorder extends Border { >>> >>> public ShopBorder(String id) { >>> super(id); >>> add(searchSlot()); >>> } >>> >>> private Component searchSlot() { >>> return new SearchSlot("search") { >>> @Override >>> protected void setSearchterm(String searchterm) { >>> getPage().getPageParameters().put("sTerm", searchterm); >>> setResponsePage(getPage().getClass(), >>> getPage().getPageParameters()); >>> }; >>> }; >>> } >>> } >>> >>> >>> SearchSlot.java >>> >>> public abstract class SearchSlot extends Panel { >>> >>> public SearchSlot(String id) { >>> super(id); >>> IModel term = new Model(); >>> StatelessForm form = new >>> StatelessForm("searchSlot", >>> term) { >>> @Override >>> protected void onSubmit() { >>> setSearchterm(getModelObject()); >>> super.onSubmit(); >>> } >>> }; >>> form.add(new TextField("searchTerm", term)); >>> form.add(new ImageButton("doSearch", new >>> CompressedResourceReference(WicketApplication.class, "res/img/go.png"))); >>> add(form); >>> } >>> >>> protected abstract void setSearchterm(String searchterm); >>> } >>> >>> >>> - >>> 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 > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
how to set focus in a listview coponent
Hi, I have a table with a list view displaying one textbox in one column,and next column is again a listview displaying textboxes depending on its size.The problem i am facing here is,whenever i enter some text in the second textbox,im implementing a ajax onblurr event to format text and refreshing the container holding the second listview to make the changes visible.After refreshing container i am unable to view cursor in the page. I want to set focus either in the first textbox or textbox next to the one where i entered data in the second list view.Can anyone help me out with this. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-set-focus-in-a-listview-coponent-tp3662151p3662151.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: best way to add tooltips in wicket
Hi guys. I'm very new to wicket and I'm trying to add tooltips on a project. Do you have any tutorials / examples using mootips? I've searched for this for a while now but couldn't find much besides this thread. Ideally I'd like something like this (http://jqwicket.appspot.com/tiptip). I've tried this already but it doesn't work (negative -1000s margins). I want to use it on a listview, sort of a "more details" column that would show extra info. I'm using Wicket 1.4x on a Mac. Thank you in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/best-way-to-add-tooltips-in-wicket-tp1882871p3662356.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: Why is stateless from making my page stateful?
Thanks Martin for the dev-utils hint. You're right for my problem. It seems that all my images have the statelessHint = false. But: How can i make my image resource references stateless? Thanks Mike I think ImageButton is the component that makes it stateful. To be sure use wicket-devutils, annotate the page with @StatelessComponent and add StatelessChecker as IComponentOnBeforeRenderListener in your application. On Tue, Jul 12, 2011 at 2:14 PM, Mike Mander wrote: Hi, i use a page with a border. I add a panel with a stateless form to the border and the page gets stateful. Why? The symtoms are - NotSerializableExceptions and RuntimeException if i click the submit. Form action: ../../../../Overview.html/gdw_exact/Party/of/47/wicket:interface/:0:ambiance:search:searchSlot::IFormSubmitListener:: I'm definitly doing something stupid, but i can't see what. Maybe someone can point me to a doc or something. Thanks Mike ShopBorder.java public class ShopBorder extends Border { public ShopBorder(String id) { super(id); add(searchSlot()); } private Component searchSlot() { return new SearchSlot("search") { @Override protected void setSearchterm(String searchterm) { getPage().getPageParameters().put("sTerm", searchterm); setResponsePage(getPage().getClass(), getPage().getPageParameters()); }; }; } } SearchSlot.java public abstract class SearchSlot extends Panel { public SearchSlot(String id) { super(id); IModel term = new Model(); StatelessForm form = new StatelessForm("searchSlot", term) { @Override protected void onSubmit() { setSearchterm(getModelObject()); super.onSubmit(); } }; form.add(new TextField("searchTerm", term)); form.add(new ImageButton("doSearch", new CompressedResourceReference(WicketApplication.class, "res/img/go.png"))); add(form); } protected abstract void setSearchterm(String searchterm); } - 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
org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'AboutUs' not found
Hi, I am extending a class SomeDetailPage which extends SomePage which in turn extends WebPage. Now this SomeDetailPage is working fine and has no issues. But I have created a new class and extended some of its features and when I am trying to deploy it I am getting the error org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'AboutUs' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried: [Page class = AboutUs, id = 11, version = 0]. I have checked if the html is not copied into the folder which has AboutUs.class, but it's there, checked if naming was different, no use. I couldn't find why I am not able to run it and couldn't even find out the reason why so that I could atleast try a workaround. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-markup-MarkupNotFoundException-Markup-of-type-html-for-component-AboutUs-not-found-tp3662335p3662335.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: Why is stateless from making my page stateful?
I think ImageButton is the component that makes it stateful. To be sure use wicket-devutils, annotate the page with @StatelessComponent and add StatelessChecker as IComponentOnBeforeRenderListener in your application. On Tue, Jul 12, 2011 at 2:14 PM, Mike Mander wrote: > Hi, > > i use a page with a border. I add a panel with a stateless form to the > border and the page gets stateful. Why? > The symtoms are - NotSerializableExceptions and RuntimeException if i click > the submit. > Form action: > ../../../../Overview.html/gdw_exact/Party/of/47/wicket:interface/:0:ambiance:search:searchSlot::IFormSubmitListener:: > > I'm definitly doing something stupid, but i can't see what. Maybe someone > can point me to a doc or something. > > Thanks > Mike > > ShopBorder.java > > public class ShopBorder extends Border { > > public ShopBorder(String id) { > super(id); > add(searchSlot()); > } > > private Component searchSlot() { > return new SearchSlot("search") { > @Override > protected void setSearchterm(String searchterm) { > getPage().getPageParameters().put("sTerm", searchterm); > setResponsePage(getPage().getClass(), > getPage().getPageParameters()); > }; > }; > } > } > > > SearchSlot.java > > public abstract class SearchSlot extends Panel { > > public SearchSlot(String id) { > super(id); > IModel term = new Model(); > StatelessForm form = new StatelessForm("searchSlot", > term) { > @Override > protected void onSubmit() { > setSearchterm(getModelObject()); > super.onSubmit(); > } > }; > form.add(new TextField("searchTerm", term)); > form.add(new ImageButton("doSearch", new > CompressedResourceReference(WicketApplication.class, "res/img/go.png"))); > add(form); > } > > protected abstract void setSearchterm(String searchterm); > } > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Why is stateless from making my page stateful?
Hi, i use a page with a border. I add a panel with a stateless form to the border and the page gets stateful. Why? The symtoms are - NotSerializableExceptions and RuntimeException if i click the submit. Form action: ../../../../Overview.html/gdw_exact/Party/of/47/wicket:interface/:0:ambiance:search:searchSlot::IFormSubmitListener:: I'm definitly doing something stupid, but i can't see what. Maybe someone can point me to a doc or something. Thanks Mike ShopBorder.java public class ShopBorder extends Border { public ShopBorder(String id) { super(id); add(searchSlot()); } private Component searchSlot() { return new SearchSlot("search") { @Override protected void setSearchterm(String searchterm) { getPage().getPageParameters().put("sTerm", searchterm); setResponsePage(getPage().getClass(), getPage().getPageParameters()); }; }; } } SearchSlot.java public abstract class SearchSlot extends Panel { public SearchSlot(String id) { super(id); IModel term = new Model(); StatelessForm form = new StatelessForm("searchSlot", term) { @Override protected void onSubmit() { setSearchterm(getModelObject()); super.onSubmit(); } }; form.add(new TextField("searchTerm", term)); form.add(new ImageButton("doSearch", new CompressedResourceReference(WicketApplication.class, "res/img/go.png"))); add(form); } protected abstract void setSearchterm(String searchterm); } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: url for images from database
Is there example? How to get shared resource key from byte[] (image from DB)? In my App class i do for several shared resources: mountSharedResource("/styles/style.css", new ResourceReference(Styles.class, "style.css").getSharedResourceKey()); Is is possible in this code getsharedResource() for byte[] (image from DB) in some way? > -Original Message- > From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] > Sent: Sunday, 10. July 2011 18:16 > To: users@wicket.apache.org > Subject: Re: url for images from database > > use a shared resource to output the images instead of an > Image component > > -igor > > On Sun, Jul 10, 2011 at 6:44 AM, Miroslav F. wrote: > > Hi folks, > > > > please direct me to right docu with following problem: I > have image as > > byte[] from database which I display on pages. > > > > Works fine, on image atribute src is somethink like this: > > > src="?wicket:interface=:0:repeater:1:obrazok::IResourceListener::"/> > > > > For lightbox I need make this "ugly" src atribute transform to > > something like src="/images/xxx.jpg" and mount it > on-the-fly but don't > > know how to do it. > > > > Is somewhere related example please? > > > > Thanks in advance, > > > > Miro > > > > > > > - > > 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: ModalWindow
It works after I added "Wicket.Window.unloadConfirmation = false;" into the page. Thanks for your helps. Cheers, Duy On 7/12/2011 3:43 PM, Ernesto Reinaldo Barreiro wrote: Maybe you are getting an Exception which is redirecting you to an error page... which can also produce what you describe... Ernesto On Tue, Jul 12, 2011 at 10:36 AM, Duy Do wrote: Thank you for your quick reply. I already used AjaxButton but it still show that popup. Do we have other options? Duy On 7/12/2011 3:27 PM, Martijn Dashorst wrote: Use an AjaxSubmitButton instead of a normal SubmitButton (or AjaxSubmitLink...). You submit your form with a normal submit instead of an ajax one. The modalwindow script captures this and tries to help the user. Martijn On Tue, Jul 12, 2011 at 10:15 AM, Duy Dowrote: Hi all, When submit a form in modal window, browsers display a popup with message: /"Are you sure want leave this page?"/ How we disable this popup? Thanks, Duy - 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: ModalWindow
Maybe you are getting an Exception which is redirecting you to an error page... which can also produce what you describe... Ernesto On Tue, Jul 12, 2011 at 10:36 AM, Duy Do wrote: > Thank you for your quick reply. > > I already used AjaxButton but it still show that popup. Do we have other > options? > > Duy > > On 7/12/2011 3:27 PM, Martijn Dashorst wrote: >> >> Use an AjaxSubmitButton instead of a normal SubmitButton (or >> AjaxSubmitLink...). >> >> You submit your form with a normal submit instead of an ajax one. The >> modalwindow script captures this and tries to help the user. >> >> Martijn >> >> On Tue, Jul 12, 2011 at 10:15 AM, Duy Do wrote: >>> >>> Hi all, >>> >>> When submit a form in modal window, browsers display a popup with >>> message: >>> /"Are you sure want leave this page?"/ >>> How we disable this popup? >>> >>> Thanks, >>> Duy >>> >>> >>> >> >> > > > - > 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: ModalWindow
> I already used AjaxButton but it still show that popup. Do we have other > options? Do you have an onbeforeunload event handler that returns a value? That will trigger such a message as well. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow
Thank you for your quick reply. I already used AjaxButton but it still show that popup. Do we have other options? Duy On 7/12/2011 3:27 PM, Martijn Dashorst wrote: Use an AjaxSubmitButton instead of a normal SubmitButton (or AjaxSubmitLink...). You submit your form with a normal submit instead of an ajax one. The modalwindow script captures this and tries to help the user. Martijn On Tue, Jul 12, 2011 at 10:15 AM, Duy Do wrote: Hi all, When submit a form in modal window, browsers display a popup with message: /"Are you sure want leave this page?"/ How we disable this popup? Thanks, Duy - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow
Use an AjaxSubmitButton instead of a normal SubmitButton (or AjaxSubmitLink...). You submit your form with a normal submit instead of an ajax one. The modalwindow script captures this and tries to help the user. Martijn On Tue, Jul 12, 2011 at 10:15 AM, Duy Do wrote: > Hi all, > > When submit a form in modal window, browsers display a popup with message: > /"Are you sure want leave this page?"/ > How we disable this popup? > > Thanks, > Duy > > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow
Hi all, When submit a form in modal window, browsers display a popup with message: /"Are you sure want leave this page?"/ How we disable this popup? Thanks, Duy
Re: DynamicImageResource and urls
that is exactly my problem: - I get image data from my backend - I need url to some serving wicket resource (to be used in javascript) - I need the url not public (like a shared resource) but only for session something like: urlFor(DynamicImageResource) Did you solve it? Any hints for me? (Wicket 1.4.17) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DynamicImageResource-and-urls-tp1870316p3661636.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