Re: replace panels with fade effect
here is what i do... i use the animator.js lib ajaxlink.onclick(target) { SuccessFlash flash=new SuccessFlash(); c1.add(flash); c2.add(flash); target.addcomponent(c1); target.addcomponent(c2); } see code below -igor public class AbstractAnimation extends AnimatorResources { private ListComponent components; @Override public void bind(Component component) { super.bind(component); if (components == null) { components = new ArrayListComponent(1); } components.add(component); } protected ListComponent getComponents() { if (components == null) { return Collections.emptyList(); } else { return Collections.unmodifiableList(components); } } @Override public boolean isTemporary() { return true; } } public class SuccessFlash extends AbstractAnimation { @Override public void renderHead(IHeaderResponse response) { super.renderHead(response); for (Component component : getComponents()) { response.renderOnLoadJavascript(Animator.Javascript.flashSuccess (component)); } } } On 7/28/07, Leszek Gawron [EMAIL PROTECTED] wrote: I'd like to create an ajax heavy application (no pages, all panels). When replacing panels during ajax event I would like the old panel to fade out and new one to fade in (or any kind of morph effect). I've been trying to make use of wicket-scriptaculous module but without success. please advise. lg -- Leszek Gawron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Behaviour adding to Component body
On 7/30/07, Jan Kriesten [EMAIL PROTECTED] wrote: Hi Igor, i really dont think oncomponenttagbody() belongs in behaviors. this should be done without a behavior by subclassing the component and overriding oncomponenttagbody() there. that said you can still hack it by using AbstractTransformerBehavior and some string manipulation code. I don't think this should belong in a subclass. IMHO manipulating attributes for a certain type of object should be handled by simply adding a Behaviour. yes i agree 100%. but, you are not manipulating attributes, you are generating additional markup int component's body. SWF's are only one example. Other Objects (QuickTime, Real, WMV) have other Attributes and parameter needs which is where Behaviours do what they do best: manipulating them. The Problem is, that Objects aren't handled Browser independend. So it's enough for FF Co. to have a 'data'-Attribute for the SWF, whereas IE needs the param name=movie... and no 'data' to have the movie streamed. ATM it looks like this: WebMarkupContainer swf = new WebMarkupContainer( swf ); ResourceReference resRef = new ResourceReference( HeaderPanel.class, res/mymovie.swf ); swf.add( new FlashAttributes( urlFor( resRef ).toString(), 700, 70 ) ); add( swf ); It really looks messy if you subclass it and take into account the 20 other parameters you could add the Object... well the logic has to go somewhere so just do SwfObject object=new SwfObject(swf, resRef, 700, 70); instead of putting it into a behavior put it into a custom webmarkupcontainer subclass instead. -igor Best regards, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DownloadLink for an external URL
whatever streams that external file has to set a content-disposition:attachment header so the browser pops up that box. -igor On 8/2/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I see that DownloadLink can be used to stream a File. What I want to do is use DownLoadLink to redirect to an external URL that should be streamed (i.e. File Save box should pop up). I can't use ExternalLink as the external URL's location is not pre determined, also the external URL's location lookup is a costly so I don't want to do it unless the User clicks on a link. So in my case I do some thing like class DownloadUrlLink { onClick() { URL externalUrl = getExternalURL(); //this is a costly operation, so I don't want to do it unless user clicks the Download link. getRequestCycle().setRequestTarget(new RedirectRequestTarget(url.toString ())); } } The URL points to a rather large gzipped XML file about 11MB in size. But instead of popping up a File Save dialog, the browser starts to display the XML file. and CPU usage jumps up to 100%, on account of the file being this large. Is there a way to force the browser to pop up a FileSave dialog when using RedirectRequestTarget - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is this even possible...?
this is pretty simple, but there are a few things to consider a) the obvious: create a form and put the pageable listview into it. instead of adding labels add textfields for each row. b) call setreuseitems(true) on the pageable listview c) override links in the navigator with submit links i think that should be it -igor On 8/3/07, James Crosthwaite [EMAIL PROTECTED] wrote: Hi all, I'm relatively new to Wicket and i have a query about creating an editable list. My query is simply, is it even possible? Basically i have a list of objects, currently displayed in a PageableListView, that i want the user to be able to edit. They should be able to edit any of the rows and then click a button to save all changes that they may have made to each row. I've tried using DataBinder which didn't help as i could only edit one object at a time, however i cannot now work out how to achieve this or even if it is possible! If anyone has any ideas that would get me started i would be most grateful! Many thanks in advance -- View this message in context: http://www.nabble.com/Is-this-even-possible...--tf4213555.html#a11986760 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Caching components
usually component render is cheap - it is the retrieval of model data that drives the render that is expensive. so you should cache this data rather then the component output. -igor On 8/5/07, Dariusz Wojtas [EMAIL PROTECTED] wrote: Hi, Is it possible to cache some component output? Sometimes we know that some custom component output does not depend on the browser and changes very rarely. But generating it every time may be very costly. What is the background? I have a topMenu component, which depends on database, but does not change once started. Or I have a productCategories component, it requires several DB calls to render, but I would love to cache it's output per parentID as it does not change once rendered. Is there any way to tell the component to cache somewhere it's output? Some method that may be overriden and give rendering hint? Other question. What I can see in examples is that usually all components are added to a page in it's constructor. Is it allowed to use cached instances of components? Are they thread safe by default (if I do not break it myself)? Is it allowed to add a component instance to multiple other objects at the same time? I cannot find such info anywhere in wiki. Any hint in this area would be helpful. Regards Dariusz Wojtas -- View this message in context: http://www.nabble.com/Caching-components-tf4219802.html#a12004616 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Callbacks triggered by keyboard...
why would you want a serverside callback for this? you just need a javascript handler. -igor On 8/6/07, Patrick Angeles [EMAIL PROTECTED] wrote: Is this possible in Wicket, say for example, as a way to scroll down a listing, or go left and right on a menu? Thanks in advance... -- View this message in context: http://www.nabble.com/Callbacks-triggered-by-keyboard...-tf4227815.html#a12027815 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketTester vs Component.error()
in 1.2 you cannot call error/info/etc from component's constructor because you havent added that component to the page yet. in 1.3 it just works. -igor On 8/7/07, Gabor Szokoli [EMAIL PROTECTED] wrote: Hi, I'm using wicket 1.2, and use the WicketTester startPage(...) method in a unit test. (In fact there's nothing else in it, I just want to test if the markup matches the component hierarchy.) Problem is, a component on the page uses its error(...) method to display its dissatisfaction with the mock data in a feedbackpanel, which is perfectly normal operation. But that causes an exception: java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = signInForm, page = No Page, path = signInForm.LoginPanel$SignInForm]] Is this expected? Did I do something wrong? Any advice is appreciated. Upgrading to wicket 1.3 is planned, but I'd rather have tests even before that. Thank you for your attention and the great framework! Gabor Ps: Here's the full output: SEVERE: tester: unexpected wicket.WicketRuntimeException: tester: unexpected at wicket.util.tester.WicketTester.convertoUnexpect( WicketTester.java:381) at wicket.util.tester.WicketTester.access$200(WicketTester.java :178) at wicket.util.tester.WicketTester$3.getTestPanel( WicketTester.java:365) at wicket.util.tester.DummyPanelPage.init(DummyPanelPage.java :40) at wicket.util.tester.WicketTester$2.getTestPage(WicketTester.java :336) at wicket.util.tester.DummyHomePage$TestLink.onClick( DummyHomePage.java:84) at wicket.markup.html.link.Link.onLinkClicked(Link.java:254) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at wicket.RequestListenerInterface.invoke( RequestListenerInterface.java:187) at wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents (ListenerInterfaceRequestTarget.java:74) at wicket.request.compound.DefaultEventProcessorStrategy.processEvents( DefaultEventProcessorStrategy.java:65) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents (AbstractCompoundRequestCycleProcessor.java:57) at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java :896) at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java :929) at wicket.RequestCycle.step(RequestCycle.java:1010) at wicket.RequestCycle.steps(RequestCycle.java:1084) at wicket.RequestCycle.request(RequestCycle.java:454) at wicket.protocol.http.MockWebApplication.processRequestCycle( MockWebApplication.java:318) at wicket.protocol.http.MockWebApplication.processRequestCycle( MockWebApplication.java:307) at wicket.util.tester.WicketTester.newRequestToComponent( WicketTester.java:248) at wicket.util.tester.WicketTester.startPage(WicketTester.java :235) at wicket.util.tester.WicketTester.startPanel(WicketTester.java :330) at com.deverto.centrex.panels.LoginPanelTest.testForm( LoginPanelTest.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:228) at junit.framework.TestSuite.run(TestSuite.java:223) at org.junit.internal.runners.OldTestClassRunner.run( OldTestClassRunner.java:35) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute( JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet( AbstractDirectoryTestSuite.java:138) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute( AbstractDirectoryTestSuite.java:125) at org.apache.maven.surefire.Surefire.run(Surefire.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25)
Re: [Newbie] Add a yui calendar without a datetextfield
i used to use the code below, but now i see eelco has removed AbstractCalendar :( so maybe he can tell us how we can accomplish it now package com.tbs.webapp.component; import java.util.Date; import java.util.Map; import org.apache.wicket.extensions.yui.calendar.AbstractCalendar; import org.apache.wicket.markup.html.IHeaderContributor; import org.apache.wicket.markup.html.IHeaderResponse; import org.apache.wicket.markup.html.link.ILinkListener; import org.apache.wicket.model.IModel; import org.joda.time.DateMidnight; public class Calendar extends AbstractCalendar implements ILinkListener, IHeaderContributor { public Calendar(String id) { super(id); } public Calendar(String id, IModel model) { super(id); setModel(model); } public final void onLinkClicked() { String arg = getRequest().getParameter(getJavascriptWidgetId()); String[] parts = arg.split(,); int year = Integer.parseInt(parts[0]); int month = Integer.parseInt(parts[1]); int day = Integer.parseInt(parts[2]); setModelObject(new DateMidnight(year, month, day).toDate()); onClick(); } @Override protected void appendToInit(String markupId, String javascriptId, String javascriptWidgetId, StringBuffer b) { super.appendToInit(markupId, javascriptId, javascriptWidgetId, b); b.append(getJavascriptWidgetId()); b.append(.selectEvent.subscribe(\n\tfunction(type,args,obj) {\n\t\twindow.location='); b.append(urlFor(ILinkListener.INTERFACE)); b.append().append(getJavascriptWidgetId()).append(='+args;\n); b.append(\t}\n\t,).append(getJavascriptWidgetId()).append(, true);); Date date = (Date) getModelObject(); b.append(getJavascriptWidgetId()); b.append(.setYear().append(1900 + date.getYear()); b.append();); b.append(getJavascriptWidgetId()); b.append(.setMonth().append(date.getMonth()); b.append();); } public void renderHead(IHeaderResponse response) { // TODO Auto-generated method stub } @Override protected void configureWidgetProperties(Map widgetProperties) { super.configureWidgetProperties(widgetProperties); Date date = (Date) getModelObject(); if (date != null) { widgetProperties.put(selected, (date.getMonth() + 1) + / + date.getDate() + / + (1900 + date.getYear())); } } protected void onClick() { } } -igor On 8/8/07, Per Newgro [EMAIL PROTECTED] wrote: Hi *, i'm new to the group and hope to find some answers here :-). I checked the examples and i got the idea to add a simple rendered yui calendar instance to a webpage. I don't want to add a datetextfield and then click the button beside it. Is this possible? And if so how? Thanks for your time Cheers Per - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Newbie] Add a yui calendar without a datetextfield
can you not factor out the common thing into an abstract behavior and have abstractcalendar add that abstract behavior to itself and bridge config methods through itself? -igor On 8/8/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On 8/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i used to use the code below, but now i see eelco has removed AbstractCalendar :( Sorry. I put it back. The problem is that it isn't maintained well, as all the effort so far has been around the date picker. And since the datepicker is a behavior, and AbstractCalendar a component there's a lot of code duplication. AbstractCalendar should be fixed for that sometime. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicketstuff-dojo questions and answers
On 8/8/07, Kirk Israel [EMAIL PROTECTED] wrote: I'm getting the feeling this list doesn't have a ton of patience for questions it considers dumb. (or related to a library rather than core wicket) So with the idea that I might have asked a few dumb things, and to show that I'm trying to resolve things on my own, I'm going to give my answers to the questions I do have: not the case. what you have to understand is that dojo stuff is a wicket-stuff project. created and maintained by developers that are not core developers. so it is really up to those developers to monitor this list and answer questions. -igor
Re: wicketstuff-dojo questions and answers
no they havent. i am not saying that this isnt the place to ask questions, i am saying dont expect to receive the same quality of service as you receive when asking questions about the core projects. also not that not everyone on this list uses that wicket-stuff project, so probably most people know nothing about it and cant help you. -igor On 8/8/07, Kirk Israel [EMAIL PROTECTED] wrote: On 8/8/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 8/8/07, Kirk Israel [EMAIL PROTECTED] wrote: not the case. what you have to understand is that dojo stuff is a wicket-stuff project. created and maintained by developers that are not core developers. so it is really up to those developers to monitor this list and answer questions. Ok. But most side projects (including Wicketstuff/Wicketstuff-Dojo) haven't forked their own mailing lists or discussion groups, true? Nothing leapt out after searching through the wiki pages. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mountBookmarkablePage and missing parameters - exception thrown
On 8/8/07, Dariusz Wojtas [EMAIL PROTECTED] wrote: I want to use it in cases where the user may be given feeling that he is browsing some structure. well, my point was that structure is probably better represented by indexed coding strategy, which is forgiving. for example /products/clothes/tshirts/red (indexed) is better imho then /products/category/clothes/subcategory/tshirts/color/red (default) -igor
Re: Motivation for having setRequired()
the whole refactor started because validators were doing a lot of repeitive stuff. for example lets say you have a textfield for a purchase quantity. you add three validators to it, requred, min1) and checkinventory. min(1) = { if (input==null) return; int i=typeconvertinput(); if (i1) error(); } checkinventory() = { if (input==null) return; int i=typeconvert(); if (igetavailable()) error(); } what do we notice... both validators have input==null check because they will run whether or not field is required or not. both validators have to perform typeconversion - which is potentially an expensive operation. so lets refactor type conversion into the formcomponent. great, but the problem is we dont know if we have to convert a or not. so we also factor out the required check. the nice thing about it is that now our validators look like this min(1) = { if (i1) error(); } checkinventory() = { if (igetavailable()) error(); } so now not every validator has to check for null, and type conversion is only performed/checked once and in a single place. -igor On 8/8/07, David Leangen [EMAIL PROTECTED] wrote: I guess this was already discussed at some point on the dev list, but I couldn't find the thread. I'm just very curious about the motivation of deprecating RequiredValidator in favour of the setRequired method. Knowing how clever you devs are, I'm sure there's a good reason, but at first glace, to me the RequiredValidator seems like a more elegant solution... Would somebody mind explaining this decision, if you have the time? Thanks! Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to put a form on each row within a DataView?
if you get duplicate id exception you are probably doing this populate(Item item) { Form f=new Form(f); add(form); } instead of the correct way: populate(Item item) { Form f=new Form(f); item.add(f); } -igor On 8/8/07, Mark van Leeuwen [EMAIL PROTECTED] wrote: Hi I have a table which is populated using a DataView. Now I have a requirement to add button actions on every row. I tried defining a form within a column but get an error that I cannot have duplicate ids. Can I do this within a DataView component? If not, is there another repeater type component that can do this? Thanks Mark
Re: Custom RequiredValidation message
afaik they .properties can be attached to any container with associated markup: so page/panel/border should work furthermore you can move them up to the application.properties which is a global file. -igor On 8/8/07, David Leangen [EMAIL PROTECTED] wrote: if you want total control you can put this in the .properties of the page with the form formid.email.Required=Enter your email formid.subject.Requried=Subject is required Is it not possible to put this in the properties file for the component? I.e.: // Constructor for Page public MyPage( String id ) { add( new MyForm( myForm ); } // Constructor for Form public MyForm( String id ) { add( new MyComponent( myComponent ); } So in the properties file MyComponent.properties: email.Required=Enter your email subject.Requried=Enter the subject Or are the two ways you described in your last message the only ways to possibly resolve customised messages (unless, I suppose, if I create my own resolver)? Essentially, I would like to have finer-grained control over my validation messages, but not need to have to repeat them for every page. So: formid.email.Required = blah requires me to rewrite them for every page, but Required = Enter your ${label} is not really as fine-grained as I'd like it to be. Thanks again, Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Feedbacks contaminated
yes it is normal. feedback panels show any feedback available. if you want to filter by a container see ContainerFeedbackMessageFilter -igor On 8/9/07, David Leangen [EMAIL PROTECTED] wrote: I have a few forms on one page, and more than one form has a feedback. When a user submits one form with errors, the feedbacks from the other forms are contaminated by the validation error messges from the other forms. Is this normal? Do I need to use something other than feedback to accomplish what I'm trying to do? Thanks! Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
On 8/8/07, Alexander Schatten [EMAIL PROTECTED] wrote: Greetings to all Wicket experts I try to get Wicket running for some rather simple web-application. First (no offense, but have to say that), Wicket has the worst documentation of an apparently good open source project I have seen in a long time; and this is really a pity, because it seems, that if one would know how to do it, many things can be performed quite easily. have you seen the wiki? Now to my current issue: I want to add a loginpage to my project and protect some of the pages. My first thought was to make a base class (worked) and somehow hook into the lifecycle, check if the user is checked in (MySessio works) but this is not running at all. lot of redirection errors, incoherent documentation and so on. e.g.: have you started by checking out Signin, Signin2, Authentication, Authorization examples in wicket-examples? Javadoc 1.3 of Page talks about checkAccess() method... however, this methdod can be found nowhere. yes the javadoc is outdated, fixed Now I check the mailing list archive, only useful thing I find is a posting from 9.2.2006 suggesting: protected void init() { getSecuritySettings().setAuthorizationStrategy(new IAuthorizationStrategy() { public boolean authorizeAction(...) ... public boolean authorizeInstantiation(...) ... } starting with 1.2. Well, this interface is still here, but these methods are not available any longer. There is no documentation about this strategy I could find and the Javadoc (which is btw. not linked from the wicket website, and just this made me search for an hour) is very unconclusive. we are working on linking the javadoc...you do know wicket is a maven project right? so there is of course javadoc in the maven repo: http://repo1.maven.org/maven2/org/apache/wicket/wicket/1.3.0-beta2/ further, since it is open source simply attach the sources to your ide and you are set. if you are using maven2 and eclipse add the wicket dep to your pom and do mvn eclipse:eclipse -DdownloadSources=true - and you are all set. now that you have found IAuthorizationStrategy have you even looked at it? for example have you pulled up its class hieararchy to see an example implementation? for example when i do it it leads me directly to SimplePageAuthorizationStrategy - which will probably get you started - even if you havent looked at the 4 examples i have mentioned. btw. another thing: when the documentation of a project is so bad, at least the javadoc should be accessible: I tried to build mvn site with wicket and got the error that you use a special template or somthing and it does not build, and this template is apparently not in the repository ARRRGGHHH. yes working on that too. maven2 site generation is a pita and eats up a lot of time to get working. sorry, but Wicket experience was far away from beeing pleasent. I am quite willing to check several sources, but this here is really bad. have you gotten the Pro Wicket book? outdated information is not easy to distinguish from actual documentation, the reference to the component doc is nice, but component doc very incomplete and so on... you are more then welcome to help out. Wicket seems to be a quite productive and powerful framework (one of the best I have seen so far, at least so it seems), but getting into it is a damn frustrating experience, I can tell you... you are meant to look at examples first. they cover all the basic usecases. learn-by-example has been our philosophy so far. (I did not even know where to start. happyily there is a maven archetype at the Jetty website which was helpful.) So, sorry for that outburst, but I was so frustrated... no problem -igor best greetings Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reacting to DateField change
On 8/9/07, Dipu Seminlal [EMAIL PROTECTED] wrote: yes i am almost certain, we need to have the event in the markup. if you add an onchange behaviour then you must add onchange in the markup. no, you do not -igor On 8/9/07, Federico Fanton [EMAIL PROTECTED] wrote: On Thu, 9 Aug 2007 14:10:58 +0100 Dipu Seminlal [EMAIL PROTECTED] wrote: Did you add onchange in the markup as well, you need to add it in the markup as well input wicket:id=yourDate id=yourDate type=text name=yourDate onchange=blah / I'm sorry, do you mean that Wicket replaces the blah on the fly? I thought that behaviors don't need modification to the markup.. Or maybe it's needed just for DateFields? I'll try with your suggestion though, many thanks :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Authentication in Webapp and Wicket documentation...
so how do you propose we consolidate it? instead of javadoc have links to the wiki? /** * see wicket.apache.org/wiki/authstrat */ public interface IAuthorizationStrategy {...} that would really really suck. -igor On 8/9/07, Alexander Schatten [EMAIL PROTECTED] wrote: Martijn Dashorst wrote: http://cwiki.apache.org/WICKET/framework-documentation.html sorry, I sent the last email to quick, was a Mistake; what I wanted to point out is this: http://cwiki.apache.org/WICKET/framework-documentation.html this is your link, and it apparently has interesting information, whereas when you search (as probably every newbie would) starting from the wicket website, you go to the wiki and reference info, you come to: http://cwiki.apache.org/WICKET/reference-library.html now: this is what I meant before with very confusing documentation: these two pages apparently cover similar topics, but are different in details. then there is the confusing component reference plus the javadoc which is also misleading sometimes (see the authentication stuff with reference to non-existing methods). don't you think this information base should be consolidated? thank you very much Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I Need SubmitLink Help
this is for 1.3, but it might work for 1.2.x also package com.tbs.webapp.util; import org.apache.wicket.Component; import org.apache.wicket.behavior.AbstractBehavior; import org.apache.wicket.markup.ComponentTag; import org.apache.wicket.model.IComponentAssignedModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; public class LinkConfirmation extends AbstractBehavior { private final IModel msg; public LinkConfirmation(String msg) { this(new Model(msg)); } public LinkConfirmation(IModel msg) { this.msg = msg; } @Override public void onComponentTag(Component component, ComponentTag tag) { super.onComponentTag(component, tag); String onclick = tag.getAttributes().getString(onclick); IModel model = msg; if (model instanceof IComponentAssignedModel) { model = ((IComponentAssignedModel) model).wrapOnAssignment(component); } onclick = if (!confirm(' + model.getObject().toString() + ')) return false; + onclick; tag.getAttributes().put(onclick, onclick); model.detach(); msg.detach(); } } -igor On 8/9/07, Darren Houston [EMAIL PROTECTED] wrote: Hello all, first time post. I used Wicket 0.9 for a large project awhile back. We have continued to upgrade Wicket with every new release, and we currently sit at 1.2.6. I haven't done much maintenance on my project because every Wicket upgrade has been smooth. One feature Wicket didn't have back then was a SubmitLink, so I built my own. Now with Wicket 1.2.6, my SubmitLink doesn't work but Wicket's SubmitLink works. Let me explain; I have a dynamic page which contains a form which may contain listviews with listviews with listviews (up to 3 deep). Users can add and delete listviews at any depth and modify data in the listviews. The add and delete links in each listview are SubmitLinks so data isn't lost when the page reloads. Here is the problem; Say I have listviews 1, 2 and 3. When I delete listview 1 with my SubmitLink and the page returns, listview 1 and 2 are still present, listview 3 is gone. The database says listview 1 is deleted. If I leave the page and come back (the model is reloaded), listview 1 is deleted and listview 2 and 3 are displayed. When I delete listview 1 with Wicket's SubmitLink and the page returns, listview 1 is gone and listview 2 and 3 are present. So, to test I coppied the source of Wicket's SubmitLink into my own SubmitLink class and tried it out. The same problem explained above occurs, even though the onclick output of my SubmitLink is exactly the same as the onclick output of Wicket's submit link (the rest of the html is exactly the same too). Strange. I would use Wicket's SubmitLink, except I need a confirmation dialog to popup to confirm a user's delete request. So, does anyone know how to easily modify Wicket's SubmitLink javascript so I can have my confirmation dialog? I could override getOnClickScript() and pass in a bunch of javascript, but I would rather somehow grab the onclick javascript from SubmitLink and append the confirm. Or..., any other ideas? Thanks for any help, Darren H. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How Can I Implement a Dynamic Table?
see DataTable -igor On 8/10/07, Pantaleoni, Andrea (KCTU) [EMAIL PROTECTED] wrote: Hello, I have to implement a dynamic table: depending on user choices or values of fields in database, the number of columns could change. e.g. In same case I can have 3 columns containing Labels or in other cases 5 containing Labels and form components(and so on). To do that I'm using a ListView inside a WebMarkupContainer(I need to implements some ajax behavior too) The problems is that wicket require a exact match between components added to the form object or page and markup items inside the relative html page Someone of you has already faced that problems? Any suggestion? Many Thanks Andrea
Re: Problem with uploading files
looks like fileInputStream is a field on your page, but it isnt serializable. so dont store it as a field -igor On 8/10/07, legol [EMAIL PROTECTED] wrote: Iam doing something like this: FileUpload upload = uploadField.getFileUpload(); if(upload!=null) { try { fileInputStream = upload.getInputStream(); } catch(IOException e) { logger.error(e.getMessage()); } I want inputStream because i want to write file to database, but i get following errors: ERROR there was an error detaching the request from the session [EMAIL PROTECTED] wicket.WicketRuntimeException: Internal error cloning object. Make sure all dependent objects implement Serializable. Class: com.attachment.RMSTAttachmentWebPage at wicket.protocol.http.HttpSessionStore.setAttribute(HttpSessionStore.java :63) at wicket.Session.setAttribute(Session.java:952) more Caused by: java.io.NotSerializableException: java.io.ByteArrayInputStream at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) more I tried also using upload.writeToTempFile() but i gets the same error with exception: java.io.NotSerializableException: java.io.FileInputStream When i use upload.getBytes() everything is OK till file is too large; Pls help, what am doing wrong? -- View this message in context: http://www.nabble.com/Problem-with-uploading-files-tf4247384.html#a12087471 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: remove all behaviors of a certain type
you have getbehaviors() and removebehavior(), the rest belongs in some WicketUtil class you write. -igor On 8/10/07, Sean Sullivan [EMAIL PROTECTED] wrote: The Component class provides a method for removing a single IBehavior object: public Component remove(final IBehavior behavior) Is there a similar method that will allow me to remove all IBehaviors of a certain type? I'd like to be able to do this: Panel p; ... p.removeBehaviorsWithType(Clazz behaviorClass); Suggestions? Sean
Re: Paging Navigator
i think this is the only place we put markup into code. and it is because this is a global setting, so what markup template would it go to? and because the html fragment itself is tiny - usually just a single tag. -igor On 8/11/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Thank you for that fast response. Work fine. I'm just wondering. Isn't it against good web programming rules to add HTML code in the java code? Isn't that what all new template based frameworks ( Struts 2, Tapestry, etc ) is trying to avoid? // Mathias -- View this message in context: http://www.nabble.com/Paging-Navigator-tf4254110.html#a12108063 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Paging Navigator
you can always extend it to do what you want. those components are pretty old, been untouched since probably before 1.0because they seem to work for the vast majority of users. if you want to improve it you can always attach a patch to jira. -igor On 8/11/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Yes! Your right. Had been great if it had wicket:id=emptyLink so that you could mark up the code. Maybe like a ul, li list and display:block in css to make it both vertical and or horizontal. -- View this message in context: http://www.nabble.com/Paging-Navigator-tf4254110.html#a12110934 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTML template
seeing as that is the entire point of wicket - pragmatic markup manipulation - the answer is no, not with wicket. you can however use text manipulation libs like velocity, etc. -igor On 8/12/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Is there any way of changing the HTML template without extending the class? -- View this message in context: http://www.nabble.com/HTML-template-tf4257008.html#a12114907 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTML template
not sure what you mean -igor On 8/12/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Ok thanks! Havn't read much of freemarkers and velocity. What do you think is the most common use. Plain html seems as a good idé. -- View this message in context: http://www.nabble.com/HTML-template-tf4257008.html#a12115137 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Phone book example
that is not the svn url for wicket-stuff repo, see sf.net project site -igor On 8/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I am new to Wicket and java and am trying to get the phone book example to at https://svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-phonebook/ and get BAD GATEWAY. Where can I get it? Many thanks Jim This message and any attachments (the message) is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. ** BNP Paribas Private Bank London Branch is authorised by CECEI AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Securities Services London Branch is authorised by CECEI AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom. BNP Paribas Fund Services UK Limited is authorised and regulated by the Financial Services Authority
Re: Ajax submit form with empty file input
no, ajax submits do not support multipart forms. -igor On 8/13/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, is it possible to ajax submit a form that has a file input between its fields, even if this input is always empty at the time of submission? For example, the following example throws a 'ServletRequest does not contain multipart content' exception when clicking the ajaxSubmit button, even if form.setMultiPart(false). Form form = new Form(form); form.add (new TextField(text, new PropertyModel(this, text))); form.add(new FileUploadField(file)); form.add(new AjaxButton(ajaxSubmit, form) { protected void onSubmit(AjaxRequestTarget target, Form form) { } }); The fact is that I will upload images using another, hidden and not nested, form with an iframe as its target, so the above form will never be submitted with a non-empty file input. How can I do this? Thank you in advance Carlos
Re: sharing a context menu across components
what i am suggesting is this: if you only want to have a single instance of behavior per table, yet have onclick react per row you need to have some javascript on the clientside that can tell what row is clicked by appending something meaningful to the behavior's callback url. you do not need this when you use an instance of behavior per row - because wicket already builds the unique name that can identify that row/behavior for you - which is the component path of the component that contains the behavior. -igor On 8/13/07, Kirk Israel [EMAIL PROTECTED] wrote: I guess I'm not understanding what you're suggesting. I've added a ContextMenuBehavior to the dataTableComponent row. Inside the ContextMenuComponent that is also on the page, there is an AjaxLink anonymous inner class. that overrides onClick(AjaxRequestTarget pRequestTarget) But the result of getPath() always has the same problem, even when I do ContextMenuComponent.this.getPath(). The Behavior isn't in the path, because it's not part of the nesting hierarchy. It stands outside and connects, and as you can see below the path says dataTableComponent:campaignContextMenuComponent - the fact that behaviors have been added to the dataTableComponent's rows doesn't matter to the path, at least in the straight forward way I've made the contextMenuComponent. (Just to make sure I wasn't missing something obvious, I tried adding the contextMenuComponent to the Behavior rather than to the dataTableComponent, but of course there is no .add(Component) for behaviors, so the concept didn't make sense.. you can add a behavior to a component but not vice versa) What am I not getting here? Is there some other kind of special menu item class I need to use that would capture the path of the behavior that invoked it?( Because right now it's just a component that happens to be showing up and relocated because of the behavior i added to the rowitem.) Is there some sort of way of jamming the behavior into the path, besides the fact that the behavior is added to the appropriate rowitem? On 8/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: see component.getpath() -igor On 8/13/07, Kirk Israel [EMAIL PROTECTED] wrote: Where can I retrieve that path? Each row is generating a unique behavior object instance, but in the onClick for one of the menu items, code like this.getRequest().getPath(); (which, through some documentation surfing and trial and error seemed the only thing close to what you were talking about) comes back with 1:campaignManagerViewContainer:dataTableComponent:campaignContextMenuComponent:contextmenuNewLink with no mention of the behavior that is connecting dataTableComponent and campaignContextMenuComponent Is there another object that would be carrying more meaningful request path info, or is my only hope to start hacking in the javascript? I really hate breaking the abstraction layer Wicket provides by putting so much in javascript, and the path to even do so isn't clear to me. On 8/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: the first one is internal to wicket - because the behavior is unique it gets an internal unique path in wicket, so you dont need to worry about it. so basically your onclick handler for the menuitem has a 1-1 link to the onclick handler of the behavior. if you want one behavior then you have many menuitems onclicks linking to a single behavior onclick. so you need to map somehow - and that is through javascript on clientside. -igor On 8/13/07, Kirk Israel [EMAIL PROTECTED] wrote: I kind of see what you're getting at, but could you give an example of the syntax for the first one? I already have a unique behavior instance for each row... do I need to add another one? Or is there some way in the onClick code to read what the path of the behavior is? (Actually I might not be thinking of the right use of path) I guess I'm trying to avoid hacking javascript strings if I can, since the link syntax is pretty arcane... On 8/13/07, Igor Vaynberg [EMAIL PROTECTED] wrote: the event is triggered on clientside, so you need to pass back what item was clicked there. you can either do it by adding a unique behavior - which then has a unique path - which is that id you are passing back. or you need to append some unique id on client side using javascript so it can tell which row was clicked. -igor On 8/13/07, Kirk Israel [EMAIL PROTECTED] wrote: I have a Context Menu Object and Behavior... right now I construct one Context Menu for the whole Data Table (extends AjaxFallbackDefaultDataTable) component that links to it... then on newRowItem() I add a unique ContextMenuBehavior (extends
Re: AjaxTabbedPanel Problem
you probably have the span/div problem. make sure you do not nest any block level elements like div inside spans -igor On 8/13/07, Tauren Mills [EMAIL PROTECTED] wrote: Eric, Will you test in IE? The form content shows in IE6, but not in FF2 on WinXP. Tauren On 8/13/07, Tauren Mills [EMAIL PROTECTED] wrote: Eric, After reading your message, I just tested my problem out again. I described my problem in a message last night with the subject How to replace panelA with panelB using AjaxLink in panelA. I'm now thinking that that I did have it working, but that the content is just not showing. I have a form on panelB, and it looks like panelA has been replaced with panelB when I look at the AjaxDebug info. But panelB isn't showing on the page. Note that I'm not using an AjaxTabbedPanel, just a TabbedPanel. But I'm using ajax inside the panel to replace it. Bottom line is that I too am having that same problem. Unfortunately, I don't have a solution. Tauren On 8/13/07, Eric Woerner [EMAIL PROTECTED] wrote: I have a interesting problem with the AjaxTabbedPanel. If one of that tabs has a panel that has forms with in it they are not displayed when you click on that tab. None of the textareas or TextFields will display. Nothing between the form tags will display. Has anyone ever seen this problem? -- View this message in context: http://www.nabble.com/AjaxTabbedPanel-Problem-tf4263456.html#a12133292 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic AJAX Tabs
hmm, its still pretty difficult to tell what is going on. how about a quickstart that reproduces the problem. you want to have an ajax tabbed panel where the number of tabs is variable, so when you recalculate the number of tabs why not simply replace the tabbedpanel with a new instance and add the new instance to the ajax target. -igor On 8/13/07, Ballist1c [EMAIL PROTECTED] wrote: Opppsss!!! hahaha.. gotta get into that habit, at the moment, the tabs display a unique id just to see if i can get it working. also... I am currently using a list, cause I cant add a AbstractTab to the 'item' in populate item :( final List tabs = new ArrayList(); chatSessionTabs = new RefreshingView(chatSessionTabs, new PropertyModel(HotListTargetPanel.this.getJumbuckSession ().getMySessionData(), chatSessions)) { protected Iterator getItemModels() { return new ModelIteratorAdapter(HotListTargetPanel.this.getJumbuckSession ().getMySessionData().getChatSessions().iterator()) { protected IModel model(Object object) { return new Model((Serializable) object); } }; } protected void populateItem(Item item) { Label chatSessionTabData = new Label(chatSessionTab, ((Long)item.getModelObject()).toString()); final long tempChatSessionId = (Long)item.getModelObject(); item.add(chatSessionTabData); tabs.add(new AbstractTab(item.getModel()) { public Panel getPanel(String panelId) { return new FlirtTabPanel(panelId, tempChatSessionId); } }); } }; add(chatSessionTabs); if (tabs.size() 0) add(new AjaxTabbedPanel(tabs, tabs)); else add(new Label(tabs, You have no chat sessions)); igor.vaynberg wrote: why dont you paste your code, abstracttab should work just fine, its just a factory for panels. -igor On 8/13/07, Ballist1c [EMAIL PROTECTED] wrote: Hey guys, Right now i have been playing around with the current, ajax tabbs in wicket extensions. What I am trying on now is creating a dynamic number of tabs with multiple components and models within each tab which can change during runtime so it will have Ajax polling for information. I have been using a RefreshingView to manage X number of tabs and it will have AJAX updates performed on the fly for information contain within the tab. I have been trying to use AbstractTab but it doesn't work with RefreshingView because refreshing view populates the tabs at run-time rather then creating the tabs at construction/render. This is my current predicament, and I am looking for a clean solution using current framework classes if possible. THanks hEaps guys LEO! -- View this message in context: http://www.nabble.com/Dynamic-AJAX-Tabs-tf4264551.html#a12136668 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Dynamic-AJAX-Tabs-tf4264551.html#a12137077 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Caching the context path
so what exactly are you doing? obviously you cant really share an app across actual contexts because they are supposed to be isolated. so what do you do? you have a single application object, but you map two filters with two different paths and share the single instance of application object via custom applicationfactory? -igor On 8/15/07, David Leangen [EMAIL PROTECTED] wrote: Hmmm... Very nasty things are happening in my forms. Because it's not resolving the URLs properly, wicket thinks that my pages are expired. Does this mean that I have no choice but to re-instantiate a new wicket for each context? In other words, is what I'm trying to do too much to ask of wicket without some major changes? Or is there a relatively simple way I could get this to work? On Wed, 2007-08-15 at 12:57 +0900, David Leangen wrote: I'm attempting to mount one instance of wicket on more than one context path. However, something is not working as I expect it to from within Wicket, due to some kind of caching going on. Essentially, I have my servlet container setup so that both of the following get routed to the same instance of wicket: www.example.com/cxt1/ www.example.com/cxt2/ On the first run, both work as expected. If I try to access directly either one of: www.example.com/cxt1/somePage www.example.com/cxt2/somePage also no problem. However, if I first access cxt1, then later try to access: www.example.com/cxt2{/} Wicket is forwarding me back to: www.example.com/cxt1 And vice-versa when I first access cxt2 and later try to access cxt1 without a path. Also, none of my links are working as expected. Once cxt1 is cached, all my links now point to that context, which messes up what I'm trying to do. Is this a bug? If so, where should I look to fix this? Thanks! David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Order-Items master detail page
you create a new instance of itemsDataProvider but your listview never gets that new instance, so its using the old one. instead you should change the data that instance returns: IDataProvider itemsDataProvider = new idataprovider() { count() { if (selected==null) return 0; else return selected.items.size(); } iterator() { if (selected==null) { return new EmptyIterator(); } else { return selected.items.iterator(); } } -igor On 8/15/07, Oleg Taranenko [EMAIL PROTECTED] wrote: Hi, I have the simplest use case, but i'm finally confused, please help. I have 2 DataViews with ListDataProvider. Left dataview shows Orders, right must show order items, when I click on the order number. I have simple list - Order List and Order Items List: Both created as DataView with ListDataProviders. List Provider for items depends on clicked ajax link. It seems that IDataProvider static bound to the markup? and cannot be changed How i can show order's item in the Items List by click on Ajax Link in Order Lis? I thought enough add - Markup -- HomePage.html html body table cellspacing=0 cellpadding=2 border=1 tr wicket:id=orders tdspan wicket:id=id[id]/span/td tda wicket:id=alinkspan wicket:id=name[name]/span/a/td /tr /table div wicket:id=itemsWrap/div /body /html HomePage$ItemsPanel.html wicket:panel table cellspacing=0 cellpadding=2 border=1 tr wicket:id=items tdspan wicket:id=itemid[id]/span/td tdspan wicket:id=itemname[name]/span/td /tr /table /wicket:panel -- Code -- HomePage.java: public class HomePage extends WebPage { private Order selected; IDataProvider itemsDataProvider = new ListDataProvider( Collections.emptyList()); private ItemsPanel itemsWrap; public HomePage(final PageParameters parameters) { IDataProvider orderDataProvider = new ListDataProvider( Order.orderList); add (new DataView(orders, orderDataProvider) { @Override protected void populateItem(Item item) { Order order = (Order) item.getModelObject (); item.add(new Label(id, order.getId ().toString())); final AjaxLink link; item.add(link = new AjaxLink(alink,new Model(order)) { @Override public void onClick(AjaxRequestTarget target) { counter1++; selected = (Order) this.getModelObject(); itemsDataProvider = new ListDataProvider(toList(selected.getItems())); target.addComponent(c1); itemsWrap.setVisible(true); target.addComponent (itemsWrap); } }); link.add(new Label(name, order.getName ())); } }); add (itemsWrap = new ItemsPanel(itemsWrap)); itemsWrap.setOutputMarkupId(true); itemsWrap.setVisible(true); } /*** * Items Panel. ***/ public class ItemsPanel extends Panel { public ItemsPanel(String id) { super(id); add (new DataView(items, itemsDataProvider) { @Override protected void populateItem(Item item) { OrderItem orderItem = (OrderItem) item.getModelObject(); item.add(new Label(itemid, orderItem.getId().toString())); item.add(new Label(itemname, orderItem.getOrderId().toString())); } }); } } public ListObject toList(Set? extends Object set) { if (set == null) { throw new NullPointerException(argument must not be null); } ListObject result = new ArrayListObject(set.size()); result.addAll(set); return result; } } It does not works, order items are not shown at all. :( It seems like itemsDataProvider is bound
Re: How to get the html combo value in wicket?
the final value is put into the model -igor On 8/15/07, Edi [EMAIL PROTECTED] wrote: any reply.. Edi wrote: Hi, I have ordinary html combo, select name=comboTxt option value=oneOne/option option value=twoTwo/option /select How can I get the html combo value using wicket. if ordinary html text box input type=text name=txtbox means I can get getRequest().getParameter(txtbox); But In combo? Please let me know. Thanking You -- View this message in context: http://www.nabble.com/How-to-get-the-html-combo-value-in-wicket--tf4274630.html#a12175034 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket vs. ZK
On 8/15/07, juliez [EMAIL PROTECTED] wrote: First, thanks for the reply! 2. AJAX components (Wicket vs. ZK) you do not implement features like drag and drop or datepicker in wicket, instead you wrap javascript libraries that implement those features with wicket components. I am actually confused at how many ways Wicket supports AJAX. The classes in wicket.ajax packages are used for AJAX behaviors. I supposed these classes are for common AJAX behaviors. wicket has an excellent native ajax support. it allows you to perform partial page renders where only one or more components on the page are updated. see wicketstuff.org/wicket13 for examples under ajax. it also has common ajax handlers - so you dont have to reinvent the wheel - such as form component update, ajax form submit, self updating timers, etc. It seems they are different from wrapping JavaScript - correct me if I am wrong. javascript is not the same as ajax. take drag and drop - that has very little to do with ajax except maybe for notification that x has been dropped into y. take datepicker, that has no ajax in it at all, its just javascript that draws a calendar and puts a selected date into a textfield. Then my questions are 1) what is the standard way to add AJAX with Wicket: first looking for existing components (including the components in WicketStuff), then if not found, wrap JavaScript? if you have some ajax need that wicket doesnt natively provide and that is existent in some 3rd party js lib then you can easily write wicket wrappers for it. the nice thing about it is that you only have to do it once, and from that point on you dont need to worry about javascript, just use your java classes. for example there is wicketstuff-animator project that wraps animator.js in a set of wicket components. you can add animations without known the details of the animator.js lib. 2) I read the attached file and googled more for the instruction on how to wrap JavaScript. Found one here (http://cwiki.apache.org/WICKET/adding-dynamic-field-prompts-or-hints.html ). I am wondering if there are instructions on how to do it in a general way. there is no general way, you simply write components that hook into the javascript. 3. Target application (Wicket) like you say, wicket is component oriented. it doesnt really care how you build your app: many pages or a single page. at my day time job we have an app that is mostly a single page with a lot of component replacement. works just fine. Still not sure, if a page includes many replacement, how to keep the method/class short yet support those changes? you dont define the combination of all possible replacements at the same time. wicket is dynamic, at any point in time a component can replace itself or other components with something else that was just instantiated. also because components are encapsulated they can perform replacements inside themselves as well. wicket is not page-centric. -igor
Re: Wicket-1.3-beta2 validation (conversion) bug?
it is obscure but it still should be possible. anyway, you can discuss it here if you like. for example you can list some pros and cons that you think the current approach has. -igor On 8/15/07, Alex Objelean [EMAIL PROTECTED] wrote: If you believe that the usecase is obscure, shouldn't this approach to be reconsidered? Or at least discussed a little bit more, before the final release is done? Thank you! igor.vaynberg wrote: i believe it was jonathan who had an obscure usecase that null input was supposed to be converted to a nonnull object. -igor On 8/14/07, Alex Objelean [EMAIL PROTECTED] wrote: I found a quick fix for my issue: instead of disabling the Textfield, I make it readonly... still wondering why the change has been made in the convert() method. Matej Knopp-2 wrote: At this point I don't know why the check was removed, but i suppose there was a reason for it. I'm not sure whether we should support the state when client and server are out of sync. -Matej On 8/14/07, Alex Objelean [EMAIL PROTECTED] wrote: This means that the component enable state must be always in sync with the client side state? Shouldn't it be set automatically as not enabled after the submit occurs? On the other hand, the same code worked great on the wicket-1.2.x branch.. Please help! Matej Knopp-2 wrote: I'm not sure if it's bug in wicket. So your input is disabled, but the TextField component is not? That's not good, you need to disable the TextField too in that case. -Matej On 8/14/07, Alex Objelean [EMAIL PROTECTED] wrote: After migrating from wicket-1.2.6 to wicket-1.3.0-beta2 I had the following problem: application throws ConversionException when trying to convert a null value of the Textfield wich is disabled on the clientside. I've take a look on the convert() method of the FormComponent class and noticed the difference from the 1.2.x branch which may cause the issue: This snippet of code is from 1.3.0-beta2 [CODE] if (typeName == null) { //string conversion code } else { //type conversion code } [/CODE] This snippet of code is from 1.2.6 [CODE] if (type == null) { //string conversion code } else if (!Strings.isEmpty(getInput())) { //type conversion code } [/CODE] As you can see, in the 1.3.0-beta2 version, the conversion does not check if the getInput() is an empty string before performing type conversion. I wonder if it is a bug, or it is something that I missed? Thank you! Alex -- View this message in context: http://www.nabble.com/Wicket-1.3-beta2-validation-%28conversion%29-bug--tf4265733.html#a12140062 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Wicket-1.3-beta2-validation-%28conversion%29-bug--tf4265733.html#a12141596 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Wicket-1.3-beta2-validation-%28conversion%29-bug--tf4265733.html#a12157292 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Wicket-1.3-beta2-validation-%28conversion%29-bug--tf4265733.html#a12175844 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: strang bug in wicket-1.3.0-beta2 when submitting a form
unfortunately formcomponent:565 doesnt point to anything useful. mind trying again with the trunk build? it looks like formcomponent is trying to find its form, do you have it inside a form? -igor On 8/16/07, Alex Objelean [EMAIL PROTECTED] wrote: I've got the following exception when submit a form... (the same code worked fine with wicket-1.2.6) Any thougths? [10:39:10.071] ERROR [http-8080-Processor8] RequestCycle - Could not find Form parent for [MarkupContainer [Component id = editOrCancel, page = ro.isdc.centerparcs.dpa.ui.page.DPADashboardPage, path = 0:body:panel:actionDetailsContainer:actionDetails:panel:actionSummaryButtons: editOrCancel.Button, isVisible = true, isVersioned = false]] org.apache.wicket.WicketRuntimeException: Could not find Form parent for [MarkupContainer [Component id = editOrCancel, page = ro.isdc.centerparcs.dpa.ui.page.DPADashboardPage, path = 0:body:panel:actionDetailsContainer:actionDetails:panel:actionSummaryButtons: editOrCancel.Button, isVisible = true, isVersioned = false]] at org.apache.wicket.markup.html.form.FormComponent.getForm( FormComponent.java:565) at org.apache.wicket.markup.html.form.Form$2.component(Form.java:416) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:820) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:835) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:835) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:835) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:835) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:835) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:835) at org.apache.wicket.markup.html.form.Form.findSubmittingButton(Form.java :407) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:643) at ro.isdc.centerparcs.dpa.ui.component.AjaxDynamicFormSubmitBehavior.onEvent (AjaxDynamicFormSubmitBehavior.java:86) at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java :163) at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest( AbstractDefaultAjaxBehavior.java:252) at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents (BehaviorRequestTarget.java:97) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents( AbstractRequestCycleProcessor.java:90) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java :1031) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1107) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176) at org.apache.wicket.RequestCycle.request(RequestCycle.java:499) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java :127) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke( FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter( FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter( ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter( AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:274) at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java :106) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter( HttpSessionContextIntegrationFilter.java:229) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java :148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java :98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at
Re: Request Cycle TimeOut
please file a bug. also understand that if you set timeout to one hour that means the user will not be able to access any other page within that session until the original request goes through. -igor On 8/16/07, Gustavo Yoshizaki [EMAIL PROTECTED] wrote: Hi, I have some problems with the time out of the request cycle. I extended my application from WebApplication and in the init method added the following line: getRequestCycleSettings().setTimeout(Duration.ONE_HOUR); However, in one page with an ajax link, I got the following error: 09:00:05,290 ERROR [RequestCycle] java.lang.InterruptedException wicket.WicketRuntimeException: java.lang.InterruptedException at wicket.Session.getPage(Session.java:431) This is an error thrown in Session.class: try { pageMapsUsedInRequest.wait(timeout.getMilliseconds()); } catch (InterruptedException ex) { throw new WicketRuntimeException(ex); } The timeout that pageMapsUsedInRequest waits is 1 minute, which is default of Wicket. It seems that the settings is being ignored. I'm using Wicket 1.2.6 Thanks
Re: Request Cycle TimeOut
https://issues.apache.org/jira/ -igor On 8/16/07, Gustavo Yoshizaki [EMAIL PROTECTED] wrote: Okey, Thanks for the answer. How do I report this bug? Gustavo On 8/16/07, Igor Vaynberg [EMAIL PROTECTED] wrote: please file a bug. also understand that if you set timeout to one hour that means the user will not be able to access any other page within that session until the original request goes through. -igor On 8/16/07, Gustavo Yoshizaki [EMAIL PROTECTED] wrote: Hi, I have some problems with the time out of the request cycle. I extended my application from WebApplication and in the init method added the following line: getRequestCycleSettings().setTimeout(Duration.ONE_HOUR); However, in one page with an ajax link, I got the following error: 09:00:05,290 ERROR [RequestCycle] java.lang.InterruptedException wicket.WicketRuntimeException: java.lang.InterruptedException at wicket.Session.getPage(Session.java:431) This is an error thrown in Session.class: try { pageMapsUsedInRequest.wait(timeout.getMilliseconds()); } catch (InterruptedException ex) { throw new WicketRuntimeException(ex); } The timeout that pageMapsUsedInRequest waits is 1 minute, which is default of Wicket. It seems that the settings is being ignored. I'm using Wicket 1.2.6 Thanks
Re: Is there something like ValidationDelegates in Wicket?
yep, i have a border implementation that does just this. it searches its hierarchy for a formcomponent(s) and adds labels, then if there are any errors it renders them after the component. so it is definetely possible, you still have to add a border/component but the chances are you are adding a label/component anyways. -igor On 8/16/07, Scott Swank [EMAIL PROTECTED] wrote: Look at Borders http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.BorderPage Particular the FormComponentFeedbackBorder. On 8/16/07, Onno Scheffers [EMAIL PROTECTED] wrote: Hi, I'm new to Wicket. I worked with Tapestry before and I was wondering if there's something like the Tapestry ValidationDelegate available in Wicket? By adding a ValidationDelegate to a form I was able to override methods like writeLabelPrefix, writeLabelSuffix, writePrefix and writeSuffix. That made it very easy to add a '*' behind each component in the form if it was required and when it was in error I could automatically render the error-message behind the component and apply an error-style to the label of that component. It made life much easier and saved a lot of code. So far the only way I've been able to get error-messages to render behind component in Wicket is by using a custom component that I manually have to add after each component to both the template and to the Java code. I haven't yet found a way to add behaviors to components or forms that can render this kind of markup behind an existing component or its label. Rendering error-messages behind components is quite common and I'm a Wicket newbie, so I'm sure I must have overlooked something. Any help would be appreciated. regards, Onno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: url mapping and wizards
this is not how wicket works. bookmarkable urls are entry points, but once you change the state of the page you have to keep track of that instance somehow - that is what :12: is in that url - a wicket page id. so once you change the state of any page it is no longer bookmarkable and thus cannot have a ncie url. -igor On 8/16/07, wicket user [EMAIL PROTECTED] wrote: Hi, I've just started using Wicket and I've managed to mount pages so that the urls are cleaned up but for the life of me I can't seem to get it to work with Wizard pages. Is there a trick to this? At the moment it looks like this: http://localhost:8080/myapp/app/?wicket:interface=:12 I've tried mounting the wizard page as well as mounting the package that the wizard is in but with no luck. Many thanks Simon
Re: Localizing title of ModalWindow
setTitle(getString(editTitle)); but that method really should take an imodel, please add an rfe -igor On 8/16/07, Tauren Mills [EMAIL PROTECTED] wrote: I'm using a panel based ModalWindow and want to localize the window title. Without localization, I'd do this: modalWindow.setTitle(Edit User); The setTitle() method takes a string, not a resource. I'm not clear how to make this work. I tried this: modalWindow.setTitle((String)new ResourceModel(editTitle).getObject()); However, I then get this exception: java.util.MissingResourceException: Unable to find resource: editTitle at org.apache.wicket.Localizer.getString(Localizer.java:233) at org.apache.wicket.Localizer.getString(Localizer.java:127) at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java :75) I've tried adding the property editTitle to all sorts of property files in my project, but it just isn't finding it. What should I be doing? Tauren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there something like ValidationDelegates in Wicket?
my border handles multiple formcomponetns if they are meant to be grouped. for example you can add 3 textfields and it will create labels like: city/state/zip [text1][text2][text3] errors for text1/text2/text3 i have a utility method in my Form subclass addWithBorder(String borderid, FormComponent... fcs) so my code usually looks like: addWithBorder(nameborder, new TextField(name).setRequired(true).setLabel(new ResourceModel(user.name )); and in markup: div wicket:id=nameborderinput type=text wicket:id=name//div the border will then generate tdlabel for=namename/label/tdtdinput type=text id=name ... / [any errors]/td unfortunately i can post the code for it, but it isnt very complicated -igor On 8/17/07, Onno Scheffers [EMAIL PROTECTED] wrote: Hi Igor, does this mean that you wrote a Border component that handles multiple formcomponents at once? Or that you wrote a Border component that handles only one formcomponent at a time (like the FormComponentFeedbackBorder)? The first is what I've been trying to figure out, because I find the second way of doing it very code-intensive in both Markup and Java code. I could use some example code if that's possible, since I haven't been able to figure out how to do it. I can visit all formComponents (getForm().visitFormComponents()) but adding new components to them during rendering is not possible if I'm not mistaken? Regards, Onno yep, i have a border implementation that does just this. it searches its hierarchy for a formcomponent(s) and adds labels, then if there are any errors it renders them after the component. so it is definetely possible, you still have to add a border/component but the chances are you are adding a label/component anyways. -igor On 8/16/07, Scott Swank [EMAIL PROTECTED] wrote: Look at Borders http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.BorderPage Particular the FormComponentFeedbackBorder. On 8/16/07, Onno Scheffers [EMAIL PROTECTED] wrote: Hi, I'm new to Wicket. I worked with Tapestry before and I was wondering if there's something like the Tapestry ValidationDelegate available in Wicket? By adding a ValidationDelegate to a form I was able to override methods like writeLabelPrefix, writeLabelSuffix, writePrefix and writeSuffix. That made it very easy to add a '*' behind each component in the form if it was required and when it was in error I could automatically render the error-message behind the component and apply an error-style to the label of that component. It made life much easier and saved a lot of code. So far the only way I've been able to get error-messages to render behind component in Wicket is by using a custom component that I manually have to add after each component to both the template and to the Java code. I haven't yet found a way to add behaviors to components or forms that can render this kind of markup behind an existing component or its label. Rendering error-messages behind components is quite common and I'm a Wicket newbie, so I'm sure I must have overlooked something. Any help would be appreciated. regards, Onno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple JS-libraray inclusions
i just downloaded dojo 0.9beta it runs in at 16mb if all i want is to build a modal dialog using dojo i do not want to distribute a 16mb jar. given that is uncompressed and can probably shrink down to less then a third, still it is gigantic. so if i can strip out all i do not use and shrink my jar to a few KB you bet i will do that instead. -igor On 8/17/07, Jan Kriesten [EMAIL PROTECTED] wrote: hi igor, if anyone has any better solutions im all ears. the problem is that the components are encapsulated, so you can never count on any of them to include the full version of any lib they depend on. and today unfortunately these libs are so big that they come with multiple files - and on top of that have all these dynamic loaders. i know that maintaining such a lib isn't really doable. but why shouldn't libraries actually deliver the whole packages with them and set a common id on it - and it's wicket to decide which location came first? it's no problem of data-redundancy in the jars, but contributing more than once to the browser. --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple JS-libraray inclusions
On 8/17/07, Eelco Hillenius [EMAIL PROTECTED] wrote: there are just too many holes in this idea for us to implement it properly where it Hust Works. we can implement it half way and spend a lot of time answering questions as to why something doesnt work sometimes based on what components you have in your page or not. So let's just stop thinking about it then. you know damn well thats not what i meant! jackass. the current global id idea is simply not enough to fix much of anything. -igor Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: password encryption
i have recently disabled encryption because the idea was flawed. it would need to be encrypted on clientside in order to work properly. -igor On 8/17/07, John Carlson [EMAIL PROTECTED] wrote: I'm looking for some clarification on the wiki about Validating PasswordTextfield: http://cwiki.apache.org/WICKET/validating-passwordtextfield.html getValue() will get you an encryption of the entered value I assume this is saying wicket implements some sort of encryption between the client and server when a user inputs a password and then when it reaches the server it is decrypted and accessable as clear text via getModelObjectAsString (). Is this correct? Or does the PasswordTextfield travel to the server from the client and then get encrypted. Second option doesn't make sense in my head but I figured I'd toss it out there... Thanks in Advance John
Re: Can we do straight print in a java web application?
i think its a little out of scope of wicket :) prob what you would need is a browser plugin -igor On 8/18/07, Eko S.W. [EMAIL PROTECTED] wrote: Dear all, I would like to found out about something : can we do straight print in a java web application? That is, we do not rely on window.print(), because we rely on browser to print them. I have an idea, silly perhaps, that we build another daemon that listen to something. That daemon wait, and when printing request from java web application does occur, it will do the printing. Is it applicable? Because as a matter of moving from desktop to web, maybe printing is one aspect that as an application developer, will be of some challenge. Thanks in advance -- Best wishes, Eko SW http://swdev.blogs.friendster.com/my_blog/
Re: Two questions: Roadmap and Editable Grids
On 8/18/07, dtoffe [EMAIL PROTECTED] wrote: I wonder if is it possible to create a custom component that behaves like an editable grid. For example, I want a flexible grid like those in Visual Basic or Delphi, in which I can set some cells as editable, some fixed, some in other colour, is this feasible ?? yes it is possible/feasible How hard it would be ?? that depends on you :) As I understood, I could control all of these behaviours in the Java code, is this right ?? correct, see wicket-examples. there is an editable treetable that can give you some clues. -igor Thanks in advance !! Daniel -- View this message in context: http://www.nabble.com/Two-questions%3A-Roadmap-and-Editable-Grids-tf4289464.html#a12211258 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I HTTP Post from static html page to a Wicket page?
sure, set the form's action to point to the bookmarkable page. mount the bookmarkable page with querystringurlcodingstrat give it a (PageParameters params) constructor and you are good to go, you can pull out the submitted values out of params. -igor On 8/18/07, Chris Lintz [EMAIL PROTECTED] wrote: Hi all, I want to post to a Bookmarkable page from a static (non-Wicket page). I am having a tough time figuring out exactly how this can be done. For example, I simply want a static home page to contain a basic form with the form action=/auth/login . Is this possible with a Wicket page? I can't find any examples for pure http posts to a wicket page/form. thanks chris -- View this message in context: http://www.nabble.com/Can-I-HTTP-Post-from-static-html-page-to-a-Wicket-page--tf4289562.html#a12211582 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom StringHeaderContributor
there should already be a png fix for ie in extensions. -igor On 8/18/07, Tauren Mills [EMAIL PROTECTED] wrote: Maybe its just late and I'm not thinking straight, but I can't figure out the best way to create a custom StringHeaderContributor. All I want it to is encapsulate some javascript that has some property replacements in it. I have it working with a custom model as such: add(new StringHeaderContributor(new PngTransparency(this))); But I want it to look like this: add(new PngTransparencyHeaderContributor(this)); It's not really a big deal, but it seems like it would be cleaner that way. Here is the model class: public class PngTransparency extends Model { public static final ResourceReference PNGFIX = new ResourceReference(PngTransparency.class, PngTransparency.js); public static final ResourceReference TRANSPARENT_PIXEL = new ResourceReference(PngTransparency.class, transparentpixel.gif); public PngTransparency(Component component) { String output = !--[if lt IE 7]\n + script defer type=\text/javascript\ src=\ + component.urlFor(PNGFIX) + \/script\n + script language=\javascript\ type=\text/javascript\\n + var pngTransparencyGif = \ + component.urlFor(TRANSPARENT_PIXEL) + \\n + /script\n + ![endif]--\n; setObject(output); } } Any ideas? Tauren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generic validator questions
right now you have a few choices: you can load that .properties file yourself from inside your validator you can put these properties into application-scoped .properties file. you can also add an rfe into our jira to allow validators to have their own .properties bundles. -igor On 8/18/07, Stojce Dimski [EMAIL PROTECTED] wrote: Hi I am new to wicket and during my studying phase (1.3b2) I wrote a small validator for my pilot project. Validator checks that class indicated by some control implements specified interface or is subclass of specified class. It works like charm. But I have a big problems locating the messages for display purposes. What is the correct way to make a _generic_ validator (like 'PatternValidator') not tied to any form and specify his messages in some .properties file ??? Can some kind soul enlight me ? import org.apache.wicket.validation.*; import org.apache.wicket.validation.validator.*; public class ClassValidator extends AbstractValidator { private static final long serialVersionUID = 1L; private final Class ? validClass; public ClassValidator (final Class ? validClass) { this.validClass = validClass; } @Override protected void onValidate (final IValidatable validatable) { final String validatableClassName = (String) validatable.getValue(); try { final Class ? validatableClass = Class.forName(validatableClassName); final Object validatableInstance = validatableClass.newInstance(); if (!validClass.isInstance(validatableInstance)) error(validatable, notValid); } catch (ClassNotFoundException problem) { error(validatable, notFound); } catch (InstantiationException problem) { error(validatable, instantiation); } catch (IllegalAccessException problem) { error(validatable, illegalAccess); } } } ___ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generic validator questions
On 8/18/07, Stojce Dimski [EMAIL PROTECTED] wrote: Hi Igor The error message says: Could not locate error message for error: [org.apache.wicket.validation.ValidationError message=[null], keys=[notFound, ClassValidator], variables=[]] the problem looks like is that its looking for a notFound key or a ClassValidator key, not for a ClassValidator.notFound key. so just adjust your code. -igor notFound - is my key ClassValidator - is the name of the class the .propeties file is together with .class file and and have identical names... inside .properties i have a row like this: ClassValidator.notFound=${input} cannot be found on a classpath. What is wrong with this ? Thanks, Stojce ___ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom StringHeaderContributor
hrm, i remember i added one there based on [1], but maybe it was removed due to license incompatibilities before we moved to apache... [1] http://homepage.ntlworld.com/bobosola/pnghowto.htm -igor On 8/18/07, Tauren Mills [EMAIL PROTECTED] wrote: Igor, Really? I didn't see one. Then again, ModalWindow uses transparent pngs and doesn't seem to have an issue. But I didn't see any code to handle it in modal.js. Could you point me to where its at? If one doesn't exist, I'd be happy to contribute this. Tauren On 8/18/07, Igor Vaynberg [EMAIL PROTECTED] wrote: there should already be a png fix for ie in extensions. -igor On 8/18/07, Tauren Mills [EMAIL PROTECTED] wrote: Maybe its just late and I'm not thinking straight, but I can't figure out the best way to create a custom StringHeaderContributor. All I want it to is encapsulate some javascript that has some property replacements in it. I have it working with a custom model as such: add(new StringHeaderContributor(new PngTransparency(this))); But I want it to look like this: add(new PngTransparencyHeaderContributor(this)); It's not really a big deal, but it seems like it would be cleaner that way. Here is the model class: public class PngTransparency extends Model { public static final ResourceReference PNGFIX = new ResourceReference(PngTransparency.class, PngTransparency.js); public static final ResourceReference TRANSPARENT_PIXEL = new ResourceReference(PngTransparency.class, transparentpixel.gif); public PngTransparency(Component component) { String output = !--[if lt IE 7]\n + script defer type=\text/javascript\ src=\ + component.urlFor(PNGFIX) + \/script\n + script language=\javascript\ type=\text/javascript\\n + var pngTransparencyGif = \ + component.urlFor(TRANSPARENT_PIXEL) + \\n + /script\n + ![endif]--\n; setObject(output); } } Any ideas? Tauren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Slider Component
any javascript slider can be easily integrated into wicket, in fact most javascript libs can be. see wicket-stuff for inspiration, there are integrations for animator.js, mootools, yui, scriptaculous, etc. -igor On 8/18/07, Samanth Bapu [EMAIL PROTECTED] wrote: All, I am relatively new to Wicket and just hooked to it. Thanks for creating such a good framework without any messy xml or configuration files. I just wanted to know if there are any good open source Slider component available and can be integrated with Wicket? I have found ZK, Prototype GI slider components but not sure if they can be integrated with Wcket. Any other suggestions would be of great help. Thanks Samanth Bapu
Re: generic validator questions
im not sure exactly what your usecase is. we have something that is kind of similar, namely new TextField(number, Integer.class); which would type convert the entered string into an Integer and error out if the conversion could not be performed. but i dont think this is the exact match to whatever it is you are trying to achieve. -igor On 8/18/07, Stojce Dimski [EMAIL PROTECTED] wrote: Hi Igor, First thing, thanks, your hints gave me the direction and I solved the issue... I like the approach 'Classname.Key' and I think it's right for this category of generic validators as are those in 'validator' package. It was just a question of overriding one method: @Override public void error (final IValidatable validatable, final String resourceKey) { super.error(validatable, resourceKey() + . + resourceKey); } and everything worked like a charm ;-) What do you think of adding this validator in trunk ? Cheers, Stojce ___ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading global resources in test?
it should probably be MyApplication.properties unless you have myApplication.java -igor On 8/20/07, Erik Underbjerg [EMAIL PROTECTED] wrote: Hello, I have just moved some localized string resources to a myApplication.properties file, because they need to accessed by different panels and pages, and it works fine. However, when running my unit tests with WicketTester, it can't find the resources in myApplication.properties. I have been unsuccessful in finding a way to add the myApplication.properties file to the resource path of my WicketTester subclass. This is what I've tried, in my subclass of WicketTester: public void initialize() { getResourceSettings().addStringResourceLoader(new ClassStringResourceLoader(this, PolFotoApplication.class)); } So: How do I add myApplication.properties to the resource path of my WicketTester? Kind regards, Erik
Re: back button processing doesn't work in Opera
please file a jira issue. this was supposed to work. -igor On 8/20/07, Andrew Klochkov [EMAIL PROTECTED] wrote: Use case: 1) user loads page A 2) he goes to page B 3) he hits back button 4) he clicks an ajax link on the page A, but wicket thinks that page B is current page because Opera doesn't make any request when back button is presssed Is it supposed to work somehow? or back button processing is not supported in Opera? Opera 9.01 wicket 1.3 beta 2 BTW the same thing happens under safari for windows -- Andrew Klochkov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bookmarkable link to a page in another WebApplication
not across contexts, contexts in webapps are isolated. so you have to construct the url manually, which is easy since you know the mount point. so construct a url and give it to externallink component. -igor On 8/20/07, Dariusz Wojtas [EMAIL PROTECTED] wrote: Hi, What is the best way to create bookmarkable link to a page in another application in the same WAR file? I mount some pages to some urls, this way: mountBookmarkablePage(/navi, ProductCategoryPage.class); And it perfectly works. But later I want to create link to this page from a page in separate application (the same WAR file). add(new BookmarkablePageLink(menuItem, ProductCategoryPage.class)); The 2nd page does not know about the mount point defined above. It creates normal wicket link, with prefix of the 2nd app - not the 1st app. This has implications, because clicked link is processed by app2, not app1. Is there any nice way to use such bookmarkable link without any hardcoded strings? Regards Dariusz Wojtas -- View this message in context: http://www.nabble.com/Bookmarkable-link-to-a-page-in-another-WebApplication-tf4301106.html#a12242595 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading global resources in test?
wicket tester uses a mock web application - not yours - so it cannot load those properties. i think in 1.3 we refactored it to support custom application subclasses. i think as far as you can make it work in 1.2.6 is to change resource settings not to throw exceptions on not-found-resources while testing. or you can add your own stringresourceloader to the mock application and make it load properties from your application's property file. im not sure we can properly fix this in 1.2.6 because we cannot break api. -igor On 8/20/07, Erik Underbjerg [EMAIL PROTECTED] wrote: Right, sorry for the typo. I do have both: src/main/java/base/MyApplication.java src/main/java/base/MyApplication.properties The application works as intended: When I start MyApplication, I can access all constants in MyApplication.properties from various pages and components throughout the application. So far so good. However, when I try to access the same pages from my tests, I get errors similar to: wicket.WicketRuntimeException: Error attaching this container for rendering: [MarkupContainer [Component id = basket_item, page = base.BasketPage, path = 0:basket:basket_form:basket_item.BasketPanel $BasketEditForm$1, isVisible = true, isVersioned = false]] at wicket.MarkupContainer.internalAttach(MarkupContainer.java:361) [..] Caused by: java.util.MissingResourceException: Unable to find resource: MODEL_RELEASED for component: MODEL_RESOURCE is a string constant defined in MyApplication.properties, and it works fine when I run the app in the normal way. The tests are run a subclass of WicketTester, in src/test/java/base with the initialization method: public void initialize() { getResourceSettings().addStringResourceLoader(new ClassStringResourceLoader(this, MyApplication.class)); } That is what I've tried, in order to load the MyApplication.properties for my subclass of WicketTester. It just doesn't work. So my question is: How can I load the MyApplication.properties file, so the constants in it are accessible in my tests? I'm using wicket 1.2.6. Thanks in advance. /Erik On 20/08/2007, at 22.55, Igor Vaynberg wrote: it should probably be MyApplication.properties unless you have myApplication.java -igor On 8/20/07, Erik Underbjerg [EMAIL PROTECTED] wrote: Hello, I have just moved some localized string resources to a myApplication.properties file, because they need to accessed by different panels and pages, and it works fine. However, when running my unit tests with WicketTester, it can't find the resources in myApplication.properties. I have been unsuccessful in finding a way to add the myApplication.properties file to the resource path of my WicketTester subclass. This is what I've tried, in my subclass of WicketTester: public void initialize() { getResourceSettings().addStringResourceLoader(new ClassStringResourceLoader(this, PolFotoApplication.class)); } So: How do I add myApplication.properties to the resource path of my WicketTester? Kind regards, Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DownloadLink hanging
On 8/21/07, Thomas Singer [EMAIL PROTECTED] wrote: Hi Igor, yep, DownloadLinks will block because requests to the same page are serialized. Sorry, I don't understand, why links to downloadable resources should be blocking or serialized. Usually downloads are the larger parts of an application and hence should never lock the application. because this is how this component is designed to work. if you dont like it you can build your own that doesnt block. to work around it register a shared resource or create a servlet that can stream the file (resoureces in wicket are not serialized), then create a link component that can build a download url. Well, I guess, we can't use a servlet, because wicket is registered to /*, so it will get everything. wicket is a filter, so even though it is mapped to /* it will let urls that are not wicket urls pass through. how do you think it lets you download static images... so if you map your wicket filter on /* and the servlet on /download and yo have no download mount in wicket the filter will let /download/* requests go to the servlet. -igor Could you please give some more hints about shared resources? I've tried to search http://cwiki.apache.org/WICKET/ without luck. Alternatively, is it possible to complete shut off the serialization (which seems to cause this and maybe even other blocking problems)? -- Best regards Thomas Singer _ SyntEvo GmbH Brunnfeld 11 83404 Ainring Germany Igor Vaynberg wrote: yep, DownloadLinks will block because requests to the same page are serialized. to work around it register a shared resource or create a servlet that can stream the file (resoureces in wicket are not serialized), then create a link component that can build a download url. -igor On 8/20/07, Thomas Singer [EMAIL PROTECTED] wrote: Hi, We are using Wicket 1.3 beta 2 running in Tomcat and have a couple of DownloadLinks on a page (created with 'new DownloadPage(parameters)') for larger files (a couple of MB). I open different tabs of the same page in Opera and click these download links, so the downloads should happen in parallel. Unfortunately, the web-application seems to hang until the previous files were completely downloaded. Even normal pages do not show up. This does not happen for other websites (so our internet connection couldn't be the reason) and not for the same project with old-JSP-/Servlet-technology at a different server running in the same version of Tomcat. Is this a known problem? How to work around? -- Best regards, Thomas Singer _ SyyntEvo GmbH Brunnfeld 11 83404 Ainring Germany www.syntevo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading global resources in test?
it looks like you are doing it properly. not sure why it doesnt work. you will have to debug it and see. maybe you have to do it every time because it might be creating new application instances? -igor On 8/21/07, Erik Underbjerg [EMAIL PROTECTED] wrote: Thanks for the reply. I did figure out that the WicketTester is not a subclass of MyApplication, and therefore doesn't have access to the MyApplication.properties file. That's also why I was trying to do as you suggest, and add my own StringResourceLoader to the WicketTester subclass, and load the MyApplication.properties file manually. So as far as I can see, I'm doing what you said, but I just can't make it work. For some reason, even though I add a new StringResourceLoader in the WicketTester, I can't access the resources in MyApplication.properties. Am I adding it in the wrong way? /Erik On 21/08/2007, at 15.51, Igor Vaynberg wrote: wicket tester uses a mock web application - not yours - so it cannot load those properties. i think in 1.3 we refactored it to support custom application subclasses. i think as far as you can make it work in 1.2.6 is to change resource settings not to throw exceptions on not-found- resources while testing. or you can add your own stringresourceloader to the mock application and make it load properties from your application's property file. im not sure we can properly fix this in 1.2.6 because we cannot break api. -igor On 8/20/07, Erik Underbjerg [EMAIL PROTECTED] wrote: Right, sorry for the typo. I do have both: src/main/java/base/MyApplication.java src/main/java/base/MyApplication.properties The application works as intended: When I start MyApplication, I can access all constants in MyApplication.properties from various pages and components throughout the application. So far so good. However, when I try to access the same pages from my tests, I get errors similar to: wicket.WicketRuntimeException: Error attaching this container for rendering: [MarkupContainer [Component id = basket_item, page = base.BasketPage, path = 0:basket:basket_form:basket_item.BasketPanel $BasketEditForm$1, isVisible = true, isVersioned = false]] at wicket.MarkupContainer.internalAttach (MarkupContainer.java:361) [..] Caused by: java.util.MissingResourceException: Unable to find resource: MODEL_RELEASED for component: MODEL_RESOURCE is a string constant defined in MyApplication.properties, and it works fine when I run the app in the normal way. The tests are run a subclass of WicketTester, in src/test/java/base with the initialization method: public void initialize() { getResourceSettings().addStringResourceLoader(new ClassStringResourceLoader(this, MyApplication.class)); } That is what I've tried, in order to load the MyApplication.properties for my subclass of WicketTester. It just doesn't work. So my question is: How can I load the MyApplication.properties file, so the constants in it are accessible in my tests? I'm using wicket 1.2.6. Thanks in advance. /Erik On 20/08/2007, at 22.55, Igor Vaynberg wrote: it should probably be MyApplication.properties unless you have myApplication.java -igor On 8/20/07, Erik Underbjerg [EMAIL PROTECTED] wrote: Hello, I have just moved some localized string resources to a myApplication.properties file, because they need to accessed by different panels and pages, and it works fine. However, when running my unit tests with WicketTester, it can't find the resources in myApplication.properties. I have been unsuccessful in finding a way to add the myApplication.properties file to the resource path of my WicketTester subclass. This is what I've tried, in my subclass of WicketTester: public void initialize() { getResourceSettings().addStringResourceLoader(new ClassStringResourceLoader(this, PolFotoApplication.class)); } So: How do I add myApplication.properties to the resource path of my WicketTester? Kind regards, Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicketstuff-minis Veil
why dont you just drop it into your project and see -igor On 8/21/07, Federico Fanton [EMAIL PROTECTED] wrote: Hi everyone! I'm sorry, is there a screenshot of what the veil behavior looks like, somewhere? Many thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IndicatingAjaxSubmitButton and download after form submission problem
you cannot stream back from ajax request directly, instead try doing something like window.location=somedownloadurl for ajax requests; -igor On 8/21/07, Martin Bednář [EMAIL PROTECTED] wrote: Hi, I have problem when I use IndicatingAjaxSubmitButton for dowload after form submission. I use this code, normal Button working correctly. it's bug in IndicatingAjaxSubmitButton or I'm doing something wrong ? ... //This dosn't work form.add(new IndicatingAjaxSubmitButton(submit, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form form) { processSubmit(); } }); //This working form.add(new Button(submit) { @Override protected void onSubmit() { processSubmit(); } }); private void processSubmit() { final String zipArchiveFilename = /tmp/sample.zip; RequestCycle requestCycle = this.getRequestCycle(); final ResourceStreamRequestTarget exportTarget = new ResourceStreamRequestTarget( new FileResourceStream(new wicket.util.file.File( zipArchiveFilename)), application/zip) { @Override protected void configure(Response arg0, IResourceStream arg1) { super.configure(arg0, arg1); WebResponse response = (WebResponse) arg0; setFileName(sample.zip); } }; requestCycle.setRequestTarget(exportTarget); }
Re: DownloadLink hanging
you can register a shared resource and build a url for it. inside shared resource you can simply call Session.get() to get to wicket session. see application.getsharedresources(); alternatively you can extend WicketSessionFilter which will also allow you to perform Session.get() -igor On 8/21/07, Thomas Singer [EMAIL PROTECTED] wrote: Disclaimer: I'm not experienced with filters or wicket resources. Is it possible to create a (shared) wicket resource which can be filtered, so it only is accessible when the right flag is set in OurWebSession? Or would you suggest to write an own javax.servlet.Filter which does this flag-check and redirects internally to a hidden location which then is send to the client by Tomcat when the right flag is set? Thanks in advance. -- Best regards, Thomas Singer _ SyntEvo GmbH Brunnfeld 11 83404 Ainring Germany www.syntevo.com Igor Vaynberg wrote: On 8/21/07, Thomas Singer [EMAIL PROTECTED] wrote: Hi Igor, yep, DownloadLinks will block because requests to the same page are serialized. Sorry, I don't understand, why links to downloadable resources should be blocking or serialized. Usually downloads are the larger parts of an application and hence should never lock the application. because this is how this component is designed to work. if you dont like it you can build your own that doesnt block. to work around it register a shared resource or create a servlet that can stream the file (resoureces in wicket are not serialized), then create a link component that can build a download url. Well, I guess, we can't use a servlet, because wicket is registered to /*, so it will get everything. wicket is a filter, so even though it is mapped to /* it will let urls that are not wicket urls pass through. how do you think it lets you download static images... so if you map your wicket filter on /* and the servlet on /download and yo have no download mount in wicket the filter will let /download/* requests go to the servlet. -igor Could you please give some more hints about shared resources? I've tried to search http://cwiki.apache.org/WICKET/ without luck. Alternatively, is it possible to complete shut off the serialization (which seems to cause this and maybe even other blocking problems)? -- Best regards Thomas Singer _ SyntEvo GmbH Brunnfeld 11 83404 Ainring Germany Igor Vaynberg wrote: yep, DownloadLinks will block because requests to the same page are serialized. to work around it register a shared resource or create a servlet that can stream the file (resoureces in wicket are not serialized), then create a link component that can build a download url. -igor On 8/20/07, Thomas Singer [EMAIL PROTECTED] wrote: Hi, We are using Wicket 1.3 beta 2 running in Tomcat and have a couple of DownloadLinks on a page (created with 'new DownloadPage(parameters)') for larger files (a couple of MB). I open different tabs of the same page in Opera and click these download links, so the downloads should happen in parallel. Unfortunately, the web-application seems to hang until the previous files were completely downloaded. Even normal pages do not show up. This does not happen for other websites (so our internet connection couldn't be the reason) and not for the same project with old-JSP-/Servlet-technology at a different server running in the same version of Tomcat. Is this a known problem? How to work around? -- Best regards, Thomas Singer _ SyyntEvo GmbH Brunnfeld 11 83404 Ainring Germany www.syntevo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket generates invalid HTML/CSS with ListView
already fixed in beta3 -igor On 8/22/07, Edvin Syse [EMAIL PROTECTED] wrote: Hi, I use Wicket 1.3-beta2. When I construct a ListView and setOutputMarkupId(true) on the listItem itself, the constructed id in the HTML-code is only a number. This breaks the CSS 2 standard, that says that the id cannot contain only numbers. Is there a way to prepend the id with a string, for example the wicket:id of the component? (That seems to be standard for most other elements when I setOutputMarkupId(true) on them). Example to reproduce: ListView lw = new ListView(lw, someList) { protected void populateItem(final ListItem item) { item.setOutputMarkupId(true); // Add other elements } } The HTML: ul li wicket:id=lw .. Other elements here ../li /ul The rendered output: ul li wicket:id=lw id=30 .. Other elements here ../li /ul -- Edvin Syse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component Factory and code against interface
i dont see why it wouldnt work for you. i know some people who use osgi with wicket did this a while ago and no problems. -igor On 8/22/07, Sam Hough [EMAIL PROTECTED] wrote: Would it make sense in Wicket to have a factory, for at least common components like Button etc, that use interfaces rather than concrete classes in their signature? We have a requirement to have two target browsers. Full bells and whistles Ajax version and some JavaScript (IE5 and IE5.5) so I thought the factory pattern might allow me to return different components based on the client browser. Also, my tech lead can control what parts of a component a developer should play with. Maybe it is just coming from GWT or that pattern text books use Widgets as their example for Factory pattern but it seems like a reasonable thing to do? Anbody else tried this? Worked out well? Top tips? -- View this message in context: http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12272781 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page and compoenent level feedback are mixing together
you have to create your own custom feedback filter. this is simply how wicket feedback works. it is stored per page, and if you want to filter it you have to do it inside the panel. -igor On 8/22/07, Watter [EMAIL PROTECTED] wrote: I've searched for and read a number of threads on using multiple feedback panels on one page. I'm struggling with the same thing, but I haven't seen a response that is directly on point to my problem. We want to have a feedback component on our main page that most of the other pages in the application extend. This would be present to display any truly unexpected errors and the occasional feedback message related to things that happen in our menus or in our global search box (an invalid search query message for example). We also need to have a specific feedback panel for the forms that we use in our app. It's very easy to restrict what gets shown in that second feedback panel. We either add a ComponentFeedbackMessageFilter or use the convenience class, ComponentFeedbackPanel. The problem is that the page level feedback panel is catching the messages for the form level component as well. I'm not sure how to go about solving this. I'm reluctant to put some arbitrary filters on the page level feedback as it's intended to be a catch-all for things we don't expect (there's some AOP advice around our service tier calls that wrap exceptions and deliver them to this component). Any ideas? Matt -- View this message in context: http://www.nabble.com/Page-and-compoenent-level-feedback-are-mixing-together-tf4314782.html#a12285394 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question regarding old post (ResultSet and DataTable)
actually idataprovider is more generic then resultset :) -igor On 8/22/07, dtoffe [EMAIL PROTECTED] wrote: Hi !! I've found this old thread: http://www.nabble.com/RE%3A-DataView-%28extensions%29-tf1287013.html#a3423281 I hope this link works OK, just in case I quote here the relevant part: I have come up with my own subclass of DataTable and implementation of IDataProvider to display any arbitrary database java.sql.ResultSet. - The code is actually quite compact; when I'm finished I'll post it to the list if there is any interest. I'm trying to fill a DataTable with the ResultSet obtained from executing a query: cs = con.prepareCall({ call Region_SelectAll }); rs = cs.executeQuery(); After I while I discovered that there is no easy or evident way of filling the DataTable from a ResultSet, I have to provide custom DataProviders which implement IDataProvider. In case there is some work done on a generic approach, even if incomplete or undocumented, I'm interested in taking a look at it. If there are new or better ways to do this that came up after this thread, I'm also interested in knowing. Having a way of easily handling the database resultset and a list of the resultset headers (column titles) would be great, the more generic, the better. Thanks !! Daniel -- View this message in context: http://www.nabble.com/Question-regarding-old-post-%28ResultSet-and-DataTable%29-tf4314874.html#a12285785 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Page and compoenent level feedback are mixing together
On 8/22/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Improving upon the current situation could work roughly like this: updateFeedback is done post order, and the implementations should mark feedbackmessages as accepted or something (IFeedbackMessageFilter would best be converted to an abstract class then so that we can guarantee marking the messages). When messages are marked, other components may choose to ignore them. If FeedbackPanel would work that way, we'd have Matt's behavior out-of-the-box, which imho is a lot better than the current way that feedbackmessages just print out any messages regarless whether they already were consumed by another feedback panel. WDYT? what we need to do is collect usecases from our users. what you propose sounds great if you are doing component-hierarchy based filtering - but is this common. for example what about a usecase where there are two panels - one on top and one on bottom of a form showing the same messages - will we still support that? with your proposal sounds not, because panels would grab messages out of the set so a message can be shown at most one time by one panel. i would say ask our users for all these usecases, pick the most common ones but leave enough wiggle room to implement the uncommon ones. maybe really what we should do is not provide a feedbackpanel at all, but rather some callback that users can implement and build their own panels. -igor Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question regarding old post (ResultSet and DataTable)
perhaps you can email frank and ask him, it is unfortunate he did not post his code on a wiki page somewhere. http://www.nabble.com/displaying-java.sql.Timestamp-tf1333211.html#a3561689 -igor On 8/22/07, dtoffe [EMAIL PROTECTED] wrote: Uhh, well... yes, you are right. Excuse me but I fail to see how that could help to solve the problem I presented, please keep in mind that I'm not native english speaker and perhaps I'm not using the proper words, I'll try to explain that more precisely. As I said in my previous post, I do my database queries in this way: ResultSet rs = cs.executeQuery(); In fact, later I'll use a code generator to ease the task, but let's assume for simplicity that I get the result in a java.sql.ResultSet. But, as stated in the Wicket Extension Javadoc, I must create the DataTable instances in this way: DataTable table = new DataTable(datatable, columns, new UserProvider(), 10); Specifically, the third parameter must implement wicket.markup.repeater.data.IDataProvider; which ResultSet doesn't implement, so I must provide for a means to overcome this. I didn't intended to mean that ResultSets are more generic that DataProviders. When I talked about a general way of handling ResultSet I tried to mean independently of whether I'm querying a Database Table, Stored Porcedure, with read-only or read-write cursors, uni or bi-directional, and so. I'm concerned about how well this will go in regard of sortable and pageable tables. Perhaps there is a mean to do all that already in the Wicket library, but I havent found it yet. In the examples I've seen so far the database is represented by some kind of static list, like in the ContactsDatabase and ContactGenerator classes in the DataTable example, but I'm looking for a way of using data from queries to a database engine. The way I see it, I'll have to develop a class which could perhaps extends ResultSet, or one of the RowSet implementations, and implements the IDataProvider interface, am I right on this one ?? Thanks for your help !! Daniel igor.vaynberg wrote: actually idataprovider is more generic then resultset :) -igor On 8/22/07, dtoffe [EMAIL PROTECTED] wrote: Hi !! I've found this old thread: http://www.nabble.com/RE%3A-DataView-%28extensions%29-tf1287013.html#a3423281 If there are new or better ways to do this that came up after this thread, I'm also interested in knowing. Having a way of easily handling the database resultset and a list of the resultset headers (column titles) would be great, the more generic, the better. Thanks !! Daniel -- View this message in context: http://www.nabble.com/Question-regarding-old-post-%28ResultSet-and-DataTable%29-tf4314874.html#a12287761 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: POJO Adapter in Wicket
i would use the pojos directly and put the presentation stuff into the model -igor On 8/23/07, Vincenzo Vitale [EMAIL PROTECTED] wrote: Hi All, I'm using Wicket (1.3.0 beta2), Hibernate and Spring. In my Wicket project for each POJO of my business model I created an Adapter maintaining the original object and having methods for the presentation layer (like getCompleteName()); I have not created a delegate getter or setter for all the properties of the target so in my wicket java code I simply bind the target properties with a name I choose. For example: final ApiAccountAdapter account = (ApiAccountAdapter) model.getObject(); BoundCompoundPropertyModel accountModel = new BoundCompoundPropertyModel(account); TextField contactNameField = new TextField(contactName); accountModel.bind(contactNameField, target.contactName); I use cascades with Hibernate to create/update my objects so the unique problems with the adapters approach is that I always want to use Adapters in the presentation projects and I always want to navigate my objects starting from the main object I'm using. So for example if I'm editing a parent object with a child list, in Wicket I need to create a ParentAdapter with a method like ListChildAdapter getChildsList(); returning the List of adapters and I need to manually construct this method. If a child has also relations with other objects (directly or worst into Collections) the problem became rapidly really complex. Have you some suggestion on how to face in a better way the problem? My main requirements are: - I don't want to modify the POJOs adding presentation getters. - I want to use the dot notation in Wicket to easily access what I need: directly the pojo properties or some adapter (or whatever) with more complex getters. - When I have an input field in a page, representing a simple property in the main object or in some child object (like a property of a specific element of the child list) I don't want to manually map this field with the property of the object I want to be persisted. This work fine using adapters and mapping always an input field with target.property or a list with target.getListAdapter and then mapping the input fields in the list also with target.property. Sorry if I'm confusing you... :-) Thanks, Vicio. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component Factory and code against interface
not really sure what you mean when you say marking components as dirty... have you seen ajaxfallback* components? those will use ajax when its there, and fallback on regular requests when its not. so you dont even need a factory necessarily. -igor On 8/23/07, Sam Hough [EMAIL PROTECTED] wrote: Thanks Igor, Because we have to support Ajax and non-Ajax version I was wondering about hiding details of making components Ajax friendly in the factory. so setOutputMarkupId(true) etc and hiding Ajax specific handlers where possible. Have you seen anybody automatically marking components as dirty so they can be sent back via Ajax (Echo like)? I think that would handle 90% of our Ajax like stuff. Cheers Sam -- View this message in context: http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12290179 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PageStore listener...
On 8/23/07, Jan Kriesten [EMAIL PROTECTED] wrote: hi matej, hi johan, Why can't you just implement read/writeObject on your page/component? that would be an effort... here a listview, there a link and over there another image... that way i loose all the benefits of using injection - i build new logic in the components which i just wanted to get rid of. Or make the fields itself not transient, but a proxy that has a transient field and the proxy can deserialize and inject itself again (see wicket-ioc project) possible, but that reminds me on the 'XYService.getInstance()' usage in the times before IoC. it adds another indirection which makes should-be-easy things more complex. instead of being able to just inject the right class instances, i have to use proxies (so being on the save side when changing classes/implementations break serialization). really, so this is too complicated? public mypanel extends panel { @SpringBean private Service service; ... } -igor regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No get method defined for expression recorder when using Palette and CompoundPropertyModel
i dont know if it is by design or not. it makes sense to me that you pass in a model with at least an empty collection, otherwise palette has to create an instance of some collection which isnt as clean. -igor On 8/23/07, Federico Fanton [EMAIL PROTECTED] wrote: On Fri, 6 Jul 2007 08:48:56 -0700 Igor Vaynberg [EMAIL PROTECTED] wrote: Thanks for the tip but I absolutly need a compoundPropertyModel. https://issues.apache.org/jira/browse/WICKET-723 I had the same issue, thanks! Now I'm using beta3.. Another question though: I see that Recorder.initIds() assumes that getPalette().getModelCollection() is never null.. Is this by design? Should I check my backing bean for null collections before passing it to the CompoundPropertyModel? (Or maybe I could override CompoundPropertyModel.AttachedCompoundPropertyModel.getObject() so that it creates the empty collection when needed.. X-) ) Many thanks in advance! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Layout Panel
only pages/panels/borders have associated markup files by default. -igor On 8/23/07, andrea pantaleoni [EMAIL PROTECTED] wrote: the reason is that I need to consider the panel as a single component which is used inside a listview Anyway you could be right I saw that in wicket you can create a html markup for each single component naming the file in this way: pagename$componentname.html So maybe I can add the drodownchoice and textfield to the panel component and fix the layout in the html file pagename$panelname.html table tr tdwicketcomponentup td tdwicketcomponentdown td /tr /table What do you think about? could that work? Thanks Paolo paolo di tommaso wrote: Umh .. I think the best things are simple .. Why don't just handle the components position using html or css in your panel? Bye, Paolo On 8/23/07, andrea pantaleoni [EMAIL PROTECTED] wrote: Hi, I have a little problem with Panel In a table I added a Panel Now in this Panel I want to add two different components, let's say, a dropdownchoice up and a textfield down. If I remember well, in swing it could be possible to add a layout to a panel and then for example add a component in north or in the south. Is there in wicket something similar? If I want to add the dropdownchoice component in the north of the panel and the textfield in the south is that possible Thanks for any help Andrea -- View this message in context: http://www.nabble.com/Layout-Panel-tf4317423.html#a12293248 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Layout-Panel-tf4317423.html#a12293520 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component Factory and code against interface
On 8/23/07, Sam Hough [EMAIL PROTECTED] wrote: Say my onSubmit handler changes three components, as I understand it, I have to hand code feeding those three components to the AjaxRequestTarget. This seems cumbersome and slightly error prone. I think for our application, if the components kept track of changes, I could automate which components are sent back. Guess what I'm asking is if anything that already exists in Wicket keeps track of component changes? Can't imagine it would be easy otherwise without really heavy duty AOP etc... heh, there is nothing that automatically marks components as dirty() because wicket doesnt know what you do inside your components. wicket is unmanaged. but i dont really understand the issue. you have onclick(ajaxrequesttarget t) { dosomething(); t.addcomponent() } so in your case you mean inside dosomething() you do something to x components, but you dont know which x components they are? -igor Thanks again Igor. igor.vaynberg wrote: not really sure what you mean when you say marking components as dirty... have you seen ajaxfallback* components? those will use ajax when its there, and fallback on regular requests when its not. so you dont even need a factory necessarily. -igor On 8/23/07, Sam Hough [EMAIL PROTECTED] wrote: Thanks Igor, Because we have to support Ajax and non-Ajax version I was wondering about hiding details of making components Ajax friendly in the factory. so setOutputMarkupId(true) etc and hiding Ajax specific handlers where possible. Have you seen anybody automatically marking components as dirty so they can be sent back via Ajax (Echo like)? I think that would handle 90% of our Ajax like stuff. Cheers Sam -- View this message in context: http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12290179 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12296693 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DownloadLink hanging
yep -igor On 8/23/07, Thomas Singer [EMAIL PROTECTED] wrote: Should I report a bug in JIRA? -- Best regards, Thomas Singer _ SyntEvo GmbH Brunnfeld 11 83404 Ainring Germany www.syntevo.com Igor Vaynberg wrote: hm, this looks like an old bug. johan didnt we fix this a while ago? -igor On 8/23/07, Thomas Singer [EMAIL PROTECTED] wrote: inside shared resource you can simply call Session.get() to get to wicket session. Unfortunately, it looks like this is not possible, because I'm getting following exception: java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle org.apache.wicket.Session.findOrCreate(Session.java:250) org.apache.wicket.Session.get(Session.java:279) com.syntevo.hpsmart.DownloadResource.getResourceStream( DownloadResource.java:18) org.apache.wicket.protocol.http.WicketFilter.getLastModified( WicketFilter.java:708) org.apache.wicket.protocol.http.WicketFilter.doFilter( WicketFilter.java:122) Our resource code looks like this: final class DownloadResource extends Resource { public IResourceStream getResourceStream() { final OurSession session = (OurSession)Session.get(); if (session == null) { return null; } final File file = session.getFileToDownload(); if (file == null) { return null; } return new MyFileResourceStream(file); } -- Best regards, Thomas Singer _ SyntEvo GmbH Brunnfeld 11 83404 Ainring Germany www.syntevo.com Igor Vaynberg wrote: you can register a shared resource and build a url for it. inside shared resource you can simply call Session.get() to get to wicket session. see application.getsharedresources(); alternatively you can extend WicketSessionFilter which will also allow you to perform Session.get() -igor On 8/21/07, Thomas Singer [EMAIL PROTECTED] wrote: Disclaimer: I'm not experienced with filters or wicket resources. Is it possible to create a (shared) wicket resource which can be filtered, so it only is accessible when the right flag is set in OurWebSession? Or would you suggest to write an own javax.servlet.Filter which does this flag-check and redirects internally to a hidden location which then is send to the client by Tomcat when the right flag is set? Thanks in advance. -- Best regards, Thomas Singer _ SyntEvo GmbH Brunnfeld 11 83404 Ainring Germany www.syntevo.com Igor Vaynberg wrote: On 8/21/07, Thomas Singer [EMAIL PROTECTED] wrote: Hi Igor, yep, DownloadLinks will block because requests to the same page are serialized. Sorry, I don't understand, why links to downloadable resources should be blocking or serialized. Usually downloads are the larger parts of an application and hence should never lock the application. because this is how this component is designed to work. if you dont like it you can build your own that doesnt block. to work around it register a shared resource or create a servlet that can stream the file (resoureces in wicket are not serialized), then create a link component that can build a download url. Well, I guess, we can't use a servlet, because wicket is registered to /*, so it will get everything. wicket is a filter, so even though it is mapped to /* it will let urls that are not wicket urls pass through. how do you think it lets you download static images... so if you map your wicket filter on /* and the servlet on /download and yo have no download mount in wicket the filter will let /download/* requests go to the servlet. -igor Could you please give some more hints about shared resources? I've tried to search http://cwiki.apache.org/WICKET/ without luck. Alternatively, is it possible to complete shut off the serialization (which seems to cause this and maybe even other blocking problems)? -- Best regards Thomas Singer _ SyntEvo GmbH Brunnfeld 11 83404 Ainring Germany Igor Vaynberg wrote: yep, DownloadLinks will block because requests to the same page are serialized. to work around it register a shared resource or create a servlet that can stream the file (resoureces in wicket are not serialized), then create a link component that can build a download url. -igor On 8/20/07, Thomas Singer [EMAIL PROTECTED] wrote: Hi, We are using Wicket 1.3 beta 2 running in Tomcat and have a couple of DownloadLinks on a page (created with 'new DownloadPage(parameters)') for larger files (a couple of MB). I open different tabs of the same page in Opera and click these download links, so the downloads should happen in parallel. Unfortunately, the web-application seems to hang until the previous files were
Re: Can Panel replace itself ?
c.replacewith(a) is the same as c.getparent().replace(a) -igor On 8/23/07, Artur W. [EMAIL PROTECTED] wrote: Eelco Hillenius wrote: do: TestPanel newOne = new TestPanel(TestPanel.this.getId(), another param); TestPanel.this.replaceWith(newOne); target.addComponent(newOne); I didn't know about replaceWith method. It works great! Thanks a lot!!! Artur -- View this message in context: http://www.nabble.com/Can-Panel-replace-itself---tf4318533.html#a12297058 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PageStore listener...
are you using wicket-guice? or just the guice' raw injection? -igor On 8/23/07, Jan Kriesten [EMAIL PROTECTED] wrote: hi igor, public mypanel extends panel { @SpringBean private Service service; actually, if i use guice-injection @Inject private ContentManager cm; where ContentManager isn't serializable, i get tons of exceptions regarding 'not serializable. so, to me it seems that the proxy-stuff not always applies. i wouldn't have asked if i hadn't had any trouble with this. regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [newb] sorting, paging table
On 8/23/07, somethingRandom [EMAIL PROTECTED] wrote: I am trying out wicket, coming from the action-based world, so please bear with me. I made a simple report (we have a backend using spring and hibernate in place). It was very easy to take the ArrayList that hibernate returns to me and display that in a DataView using the ListDataProvider. So I look into trying to add some sorting and paging and decide that the AjaxFallbackDefaultDataTable looks like the ticket. But now it looks like I also need to write 3 or 4 new classesl, which are what? and write sort methods for each property of my pojos. It's not really this difficult, is it? What's the easiest way to take an arraylist of objects and display them in a sortable, pageable table? class mydataprovider extends sortabledataprovider { abstract List getList(String sortcol, boolean asc) { // implement this yourself and return the properly sorted list } imodel model(object o) { // implement yourself } int size() { return getList(getSort().getProperty(), getSort().isAsc()).size(); } iterator iterator(int first, int count){ return getList(getSort().getProperty(), getSort().isAsc()).sublist(first, first+count); } } just one small class looks like to me -igor } Thanks -- View this message in context: http://www.nabble.com/-newb--sorting%2C-paging-table-tf4319230.html#a12299554 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can Panel replace itself ?
does it do that in all browsers? also call view.setreuseitems(true); -igor On 8/23/07, Artur W. [EMAIL PROTECTED] wrote: igor.vaynberg wrote: c.replacewith(a) is the same as c.getparent().replace(a) I want to extend this example and replace the panel but inside the ListView. But I've found another problem. I did like you wrote but the panel isn't replaced. The new panel is being added at the top of the table. Why? The Page: public class TestPage extends MyPage { private static final Listlt;Stringgt; params = Arrays.asList( new String[] { one, two, three, four} ); public TestPage(PageParameters parameters) { super(parameters); ListView view = new ListView(list, params) { protected void populateItem(ListItem item) { String s = (String) item.getModelObject(); item.add(new TestPanel(panel, s)); } }; add(view); } } lt;wicket:extendgt; lt;tablegt; lt;tr wicket:id=listgt; lt;span wicket:id=panelgt;[panel]lt;/spangt; lt;/trgt; lt;/tablegt; lt;/wicket:extendgt; The Panel: public TestPanel(String id, String param) { super(id); setOutputMarkupId(true); AjaxLink link = new AjaxLink(link) { public void onClick(AjaxRequestTarget target) { TestPanel newOne = new TestPanel( TestPanel.this.getId(), another param); TestPanel.this.replaceWith(newOne); target.addComponent(newOne); } }; link.add(new Label(label0, click)); add(link); add(new Label(label1, param.toUpperCase())); add(new Label(label2, param.toLowerCase())); } lt;wicket:panelgt; lt;tdgt;lt;a href=# wicket:id=linkgt;lt;span wicket:id=label0gt;[label0]lt;/spangt;lt;/agt;lt;/tdgt; lt;tdgt;lt;span wicket:id=label1gt;[label1]lt;/spangt;lt;/tdgt; lt;tdgt;lt;span wicket:id=label2gt;[label2]lt;/spangt;lt;/tdgt; lt;/wicket:panelgt; Artur -- View this message in context: http://www.nabble.com/Can-Panel-replace-itself---tf4318533.html#a12300076 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RadioGroup and posted Values
hmm, dont know why you would do this inside a converter of another component but you can get to it like this: rg.convert(); rg.getconvertervalue(); -igor On 8/23/07, Jan Kriesten [EMAIL PROTECTED] wrote: hi, I'm trying to get the posted value of a RadioGroup (within a converter of a textfield), but i only get the posted string values, not the model values of the radio elements: RadioGroup rg = new RadioGroup( takedown ); add( rg ); rg.add( new Radio( takedownFalse, new Model( false ) ) ); rg.add( new Radio( takedownTrue, new Model( true ) ) ); after post, rg.getValue() should return something like true or false, but i only get 'radio6' or 'radio8' depending on which of both Radio is selected. rg.getInput() delivers the same, as does rg.getInputAsArray(). rg.getConvertedInput() gives a null. how can i access the current value?? regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Constructor of Component not DRY?
just add a private component init(String, IModel) which can assume null arguments do the null checks in the constructor and forward to that method -igor On 8/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote: hmmm... that would go against my taste of chaining from the constructor with the least parameters to the constructor with the most parameters. I'd just tend to chose the constructor with the most complex signature as the default constructor, doing the 'real' construction part of the object construction and the others chained towards it, using default or null values. I think I would typically do that too, though there are no hard rules for this, so it doesn't matter much in the end. Chaining like that doesn't work for constructors who assume that if their form is used, the passed in arguments are not null. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: conditional markup change
there are a few ways to do this one is to add both and override isvisible() on them to conditionally hide one or the other another way would be for that link to replace one with the other -igor On 8/23/07, Konstantin Ignatyev [EMAIL PROTECTED] wrote: I need to change presentation dynamically depending on object status and I can do it with conditionally using different panels like this: if( getWSSession().getVisit().isSaved( v.getId() ) ){ add( new VehicleUncompareControl( compareControl, new Model( v ), new Component[]{ ajaxTarget, VehicleItem.this})); } else{ add( new VehicleCompareControl( compareControl, new Model( v ), new Component[]{ ajaxTarget, VehicleItem.this})); } so far so good, BUT, when I click on the AjaxLink inside of those panels they change status of the component (vehicle), so I would like the item to reflect the change - and THAT does not happens. It is sort of understandable because component already has been created... But the question is: How can I do that in Wicket: conditionally change markup and see effect of those changes for Ajax updates too? Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Add a choice to a DropDownChoice
class mypanel extends panel { private List options; mypanel () { add(new dropdownchoice(id,model, new PropertyModel(this, options),...);} now that it is using a property model to retrieve its choices just add/remove items from the options list -igor On 8/24/07, andrea pantaleoni [EMAIL PROTECTED] wrote: Hi, I'm creating a DropDownChoice in this way: DropDownChoice dropDownChoice = new DropDownChoice(id,PropertyModel(beanName,propertyName),List,renderer) Now I want to add a choice with key 0 and Value (empty string) I was looking for the API and I expected to find something like dropDownChoice.addChoice(choice) but there is not. Is there a way to add a extra choice after the dropdown component is built? Many thanks Andrea -- View this message in context: http://www.nabble.com/Add-a-choice-to-a-DropDownChoice-tf4322067.html#a12307733 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can Panel replace itself ?
its happening because you are creating invalid html you cannot have a span between a tr and td, so you just need to adjust how you are outputting the markup. change testpage.html to use the following and it will work: body table style=border-collapse: collapse; empty-cells: show; wicket:container wicket:id=list tr style=border: 1px solid #000; wicket:id=panel /tr /wicket:container /table /body -igor On 8/24/07, Artur W. [EMAIL PROTECTED] wrote: igor.vaynberg wrote: i dont get it, where do you expect it to go? it looks like you are replacing an item inside panel7, not inside the panel that is inside the table? maybe you should build a quickstart so we have something to play with. Thanks for you replay Igor. The panel is put inside the table. But when I replace it with ajax it appear outside the table. Here is the working example with full source code: http://sunet.pl/files/test.war Artur -- View this message in context: http://www.nabble.com/Can-Panel-replace-itself---tf4318533.html#a12307905 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket and Spring MVC compared.
who cares, he says he has a database in there so the tests should be pretty even. for all we know wicket might be five times slower then spring mvc! and it may very well be because spring mvc is so simple in comparison. but who cares? a five fold improvement of something that is only five percent of the request time to start with is insignificant. anyway, the only thing to really look for is to make sure the wicket app is running in deployment mode when you run the tests. there is also a jmeter page on wiki somewhere if you want more clues. -igor On 8/24/07, Matej Knopp [EMAIL PROTECTED] wrote: There is not much point in comparing Wicket to Spring MVC. Spring MVC is a very simple action based framework with very little functionality (and probably minimal overhead). So what you would really be comparing is Wicket to JSP (assuming you use JSP as your view layer). Now again, Wicket is a full blown component based framework with advanced state management, while JSP is a simple templating engine. You're trying to compare apples with cars :) -Matej On 8/24/07, Vincenzo Vitale [EMAIL PROTECTED] wrote: Hi all, any performance comparison out there between Spring MVC and Wicket? I do want to convince people I'm working with to use Wicket for the next presentation projects but someone has concerns about the session usage and performances with Ajax. There are a lot of post in which is explained this is not a problem and for example I know using Detachable models is the first best practice for the first problem but I want to show numbers to my colleagues... :-) To compare the memory usage performance I wrote the same simple application in Wicket (Detachable Models used) and Spring MVC. Both are using the same service layer (Spring + Hibernate) to retrieve objects from the db; in the applications there are two stateless pages: the first one is just a list page without pagination and the second one is a detail page. In the database there are 50 elements and I wrote a JMeter script in which a request for each page is done (a CookieManager is used to create always a new session) , 10 threads are used with 1 sec of ramp up and 20 loops per threads. Each application is deployed alone in a JBoss instance. Then I launch the Jmeter script and use JConsole for the memory analysis. Something wrong with this? Any Suggestions (more elements in the db, more threads, more something...)? Thanks a lot, Vicio. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component Factory and code against interface
the ui layer is generally not portable. if you start building your own abstraction to make it portable you will end up with a pretty big mess because you will be working against whatever framework you are using and eventually that abstraction will turn into a framework itself. -igor On 8/24/07, Sam Hough [EMAIL PROTECTED] wrote: Many thanks Igor, that sounds like a very pragmatic approach. I was thinking about all sorts of horrible kludges like re-rendering the whole page and seeing how elements changed or hooking into the serialisation. Taken away another reason to do my over complicated solution ;) Am I worrying over nothing that developers might get carried away using vast number of components and fiddling with attributes that will make the application difficult to test and maybe one day port? Restricting the set of components can presumably end up with a more consistent UI... Anyway, thanks for all your time and sage advice. -- View this message in context: http://www.nabble.com/Component-Factory-and-code-against-interface-tf4311047.html#a12308606 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie questions
On 8/24/07, Alex Shneyderman [EMAIL PROTECTED] wrote: I wonder if there is any documentation as to how the rendering process works How do I go from Component graph - html associated with the page? the basic answer is that wicket traverses the component graph and calls various render methods on the components, which then output the markup. And what is the model's role there. i assume you are referring to component.get/setmodel(). this is a default model slot that all components have. its use varies per component. for example label uses the default model slot to get the string it will replace its body with. listview uses it to retrieve a list of items it will use to populate itself. link doesnt use it at all - allowing the user to put their own model into it which is then easy to retrieve inside the onclick event. as your questions get more specific so will the answers :) I have been reading and re-reading the getting started manual, unfortunately it is an extremely incomplete document, so it is of a very limited use, although I appreciate the intention. we depend on our users to make it better. Thanks in advance for any pointers and explanations. -igor -- Thanks, Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataView and onComponentTag
or we can forward the call to the repeatermore intuitive for newbies less intuitive for the rest :) -igor On 8/24/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: dataview doesnt have its own markup, it delegates it to its direct children. so you want to put that oncomponenttag into the item the dataview creates. override dataview.newitem() and override oncomponenttag on the returned item. It would probably be a good idea to make that method final in repeaters, right? Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxFallbackDefaultDataTable... changing sort does not setCurrentPage to 0
oh, and btw http://wicketstuff.org/wicket13 is where the live examples are. wicket-library isnt maintained and hasnt been for a while, not sure why its still up and running. -igor On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote: thanks, fixed in trunk -igor On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote: I noticed this in the examples: http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.AjaxDataTablePage Changing the sort order does not seem to take you to the first page... I stepped through the code, and it looks like it should work. Any ideas on how to get this to work? Here's the relevant snippet from HeadersToolbar: protected WebMarkupContainer newSortableHeader(String headerId, String property, ISortStateLocator locator) { return new OrderByBorder(headerId, property, locator) { private static final long serialVersionUID = 1L; protected void onSortChanged() { getTable().setCurrentPage(0); } }; } -- View this message in context: http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12318280 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax version of DropDownChice/Select
you didnt look very hard than http://wicketstuff.org/wicket13/ajax/choice.1 -igor On 8/24/07, Oleg Taranenko [EMAIL PROTECTED] wrote: Hi * *, I can not find subj neither in wicket nor in extensions codabases. Must I write it or there is a workaround (AjaxLink?) Cheers, Oleg [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxFallbackDefaultDataTable... changing sort does not setCurrentPage to 0
i think it has been fixed since then. at least snapshots at wicketstuff.org/wicket13 appear to be working fine. -igor On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote: 1.3-beta2 igor.vaynberg wrote: i believe this was fixed a long time ago, what version are you seeing this with? -igor On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote: That was fast :) Also, while we're on it, I just noticed that the NavigationToolbar text is off. For a list of 50 items with a pagesize of 5, it says: Showing 1 to 6 of 50 (should say Showing 1 to 5 of 50). -- View this message in context: http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12320251 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12320800 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Palette component, how to populate right box?
that box is populated from the selection model, so make sure the collection in that model has the selected items -igor On 8/25/07, Vatroslav [EMAIL PROTECTED] wrote: Hi, Is it possible to populate both list boxes on Palette component? Or even only right one (Selected)? Usually I only want to change order, and in rare cases to remove some items. So populating only selected box would be preferable. Regards, Vatroslav -- View this message in context: http://www.nabble.com/Palette-component%2C-how-to-populate-right-box--tf4328675.html#a12328238 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alternative to Wicket data binding
On 8/25/07, Eelco Hillenius [EMAIL PROTECTED] wrote: So you write a class with a certain member, but as you don't want people to directly access that member, you don't provide an mutator method. Someone else takes a look at your class and decides to directly access the member using property model regardles. I know people can do it with introspection anyway, but it arguably breaches encapsulation. my point is only that if people wanted to do this they could with or without the propertymodel. and if you really dont like it just go ahead and install a security manater. If you have a component/ page with members and in that component/ page you link a property model to it, I think it is fair to say you'd like to access the property as an implementation detail. But for regular domain objects, I don't see why normal rules of encapsulation wouldn't apply. what if i have a non-public top level class in my ui package sitting next to the component that uses it as a propertymodel object? all im saying is that narrowing it down to a direct property of a component is too narrow. in fact it just makes it more confusing when it does and does not work. Anyway, we built the damn thing so we know about it, though I - as a member of the dev team - didn't even know about this 'feature' until recently, neither did Martijn give this any special mention in his chapter on models so far. Also, this is the second time the topic comes up, so I don't think it is as obvious or intuitive as you are suggesting. yes it is the second time this topic comes up out of how many of thousands of users there are i dont know. i think this feature is very convenient. it is not something you can toggle on and off because 3rd party components might be written with this in mind. so i would say keep it, end of story. but that is just me. -igor Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alternative to Wicket data binding
On 8/25/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Finally, I'd like to hear a good argument why we shouldn't just say: if you want to access members directly, just make them public. If you want to avoid clutter (i.e. writing getters and setters) and you don't care about breaking encapsulation, why not do it the Java-way? Saying that you don't want to expose your members for normal Java programming, but do want to expose those members when using a property model strikes me as having a double standard. first of all the bean spec is _not_ the java way. it is just a spec, widely adopted though it is - just like jsf. second of all we _are_ doing it the java way. reflection has access to private fields and property model uses reflection, that is the java way. and third of all i think this _helps_ preserve encapsulation not break it. this whole argument started because someone _looked_ at the javadoc and said oh crap this can access private fields, oh no this is so anti java!, a purely theoretical concern, that will probably never have a sideeffect in real life while providing significant real life benefits. -igor My 2c, Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Markup of type 'html' for component 'wicket.contrib.gmap.GMap2' not found
either the example is broken or your ide does not copy .html files from the src dir to the classes dir. -igor On 8/25/07, hhuynh [EMAIL PROTECTED] wrote: Hi all, I've tried out the examples of wicket-contrib-gmap2-examples and got this below error. I'm pretty new to Wicket so I'm not sure where to start debugging this error. Anybody has idea? Thank you, Hung- WicketMessage: Markup of type 'html' for component 'wicket.contrib.gmap.GMap2' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried: [MarkupContainer [Component id = topPanel, page = wicket.contrib.examples.gmap.HomePage, path = 0:topPanel.GMap2, isVisible = true, isVersioned = true]] Root cause: org.apache.wicket.markup.MarkupNotFoundException: Markup not found. Component class: wicket.contrib.gmap.GMap2 Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:199) at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream( MarkupContainer.java:331) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup( MarkupContainer.java:601) at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java :107) at org.apache.wicket.Component.renderComponent(Component.java:2114) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1294) at org.apache.wicket.Component.render(Component.java:1941) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1179) at org.apache.wicket.MarkupContainer.renderComponentTagBody( MarkupContainer.java:1349) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java :1284) at org.apache.wicket.Component.renderComponent(Component.java:2114) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1294) at org.apache.wicket.Component.render(Component.java:1941) -- View this message in context: http://www.nabble.com/Markup-of-type-%27html%27-for-component-%27wicket.contrib.gmap.GMap2%27-not-found-tf4329975.html#a12331945 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Markup of type 'html' for component 'wicket.contrib.gmap.GMap2' not found
there is a setting to make it do so, cant quiet remember where it is right now. -igot On 8/25/07, hhuynh [EMAIL PROTECTED] wrote: Thanks for tip. I added this to my pom and it works fine now. Eclipse doesn't copy non-java files over automatically. resources resource directorysrc/main/java/directory includes include**/include /includes excludes exclude**/*.java/exclude /excludes /resource /resources Hung- igor.vaynberg wrote: either the example is broken or your ide does not copy .html files from the src dir to the classes dir. -igor On 8/25/07, hhuynh [EMAIL PROTECTED] wrote: Hi all, I've tried out the examples of wicket-contrib-gmap2-examples and got this below error. I'm pretty new to Wicket so I'm not sure where to start debugging this error. Anybody has idea? Thank you, Hung- WicketMessage: Markup of type 'html' for component 'wicket.contrib.gmap.GMap2' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried: [MarkupContainer [Component id = topPanel, page = wicket.contrib.examples.gmap.HomePage, path = 0:topPanel.GMap2, isVisible = true, isVersioned = true]] Root cause: org.apache.wicket.markup.MarkupNotFoundException: Markup not found. Component class: wicket.contrib.gmap.GMap2 Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java :199) at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream( MarkupContainer.java:331) at org.apache.wicket.MarkupContainer.renderAssociatedMarkup( MarkupContainer.java:601) at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java :107) at org.apache.wicket.Component.renderComponent(Component.java:2114) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java :1294) at org.apache.wicket.Component.render(Component.java:1941) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1179) at org.apache.wicket.MarkupContainer.renderComponentTagBody( MarkupContainer.java:1349) at org.apache.wicket.MarkupContainer.onComponentTagBody( MarkupContainer.java :1284) at org.apache.wicket.Component.renderComponent(Component.java:2114) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java :1294) at org.apache.wicket.Component.render(Component.java:1941) -- View this message in context: http://www.nabble.com/Markup-of-type-%27html%27-for-component-%27wicket.contrib.gmap.GMap2%27-not-found-tf4329975.html#a12331945 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Markup-of-type-%27html%27-for-component-%27wicket.contrib.gmap.GMap2%27-not-found-tf4329975.html#a12331989 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re[2]: Alternative to Wicket data binding
the processing impart would be nil because we cache a lot of the information. however forcing wicket annotations on middle tier objects is not a very good approach. if people really wanted to do this they can create this kind of annotation themselves and then install a security manager that would check it. i really dont think this is breaking encapsulation. i will concede that there is one case where it can break encapsulation and that is when you start out with what is publically accessible and then later you change your mind and make it completely private, but forget to remap the property model. it is a case where it is easy to make the mistake of not updating property models. all other cases i believe are unimportant because you would have to go poke around the class to even know that private field is there to start with. -igor On 8/25/07, Oleg Taranenko [EMAIL PROTECTED] wrote: Hi Igor and Eelco, Sorry, for interventing in your discussion :) May java annotations can help us? Say [EMAIL PROTECTED]/Write or [EMAIL PROTECTED] or ever to protect all bean. It would protect the field from accidently access in Wicket models without any assumption on set/get functions. How it lead to additional lag on processing the model, i can't estimate. Cheers, Oleg all i asked johan to do was to tweak property resolver to allow access to private stuff. i was under the impression that the property resolver always tries to access the getter/setter first, then the field. half of this thread you are arguing that we shouldnt allow access to private fields/methods and half of it you are arguing that we should but try the getter first, so im pretty confused. No, again, I'm arguing to *either* allowing access to all private, or don't allow it at all. I am not against private member access per se, just want it to be consistent. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- С уважением, Oleg mailto:[EMAIL PROTECTED][EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]