Re: Wicket capability for LARGE forms
You are aware of what you are doing to your browser? There is a limit to the pain you can cause. I'm calling the People for the Ethical Treatment of Web Browsers! Seriously: there is a limit to the number of form controls you can put in a page (around ~1000 iirc) Martijn On 8/30/07, Antony Stubbs [EMAIL PROTECTED] wrote: I have a couple of pages with _very large forms_, that are also modified dynamically to set which fields are editable using javascript, dependant on the value of a drop down list. Please see the example image attached. And that's only the first page the application is in - *gasp* - struts. I love what I've seen so far with Wicket, but I'm unsure what it's like to use compared to say, Stripes, Struts 2, Click, Tapestry etc when it comes to very large forms. being that setting up each field in wicket is kinda verbose... What are people's experiences? How do you find Wicket to use in very large forms? Thoughts? Ideas? Alternatives? (disclaimer - I've only written one page in Wicket, and that was just playing around with Ajax (NCE!! :))) http://www.nabble.com/file/p12398507/bigForm.png -- View this message in context: http://www.nabble.com/Wicket-capability-for-LARGE-forms-tf4351285.html#a12398507 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exception
Hi, with the latest snapshot I get the following exception when invalidating a session: ---8--- [09:46:04.142] java.lang.IllegalStateException: Can't call getEntrySet() when session is no longer valid. [09:46:04.142] at com.caucho.server.session.SessionImpl.getEntrySet(SessionImpl.java:1205) [09:46:04.142] at com.caucho.server.session.SessionImpl.store(SessionImpl.java:1134) [09:46:04.142] at com.caucho.server.session.SessionManager.store(SessionManager.java:1583) [09:46:04.142] at com.caucho.server.cluster.ClusterObject.store(ClusterObject.java:402) [09:46:04.142] at com.caucho.server.session.SessionImpl.save(SessionImpl.java:914) [09:46:04.142] at com.caucho.server.connection.AbstractHttpRequest.saveSession(AbstractHttpRequest.java:2375) [09:46:04.142] at com.caucho.server.connection.AbstractHttpResponse.sendRedirect(AbstractHttpResponse.java:611) [09:46:04.142] at org.apache.wicket.protocol.http.WebResponse.redirect(WebResponse.java:214) [09:46:04.142] at org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:67) [09:46:04.142] at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:288) [09:46:04.142] at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:129) [09:46:04.142] at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:73) [09:46:04.142] at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:159) [09:46:04.142] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:175) [09:46:04.142] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:240) [09:46:04.142] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263) [09:46:04.142] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:481) [09:46:04.142] at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:685) [09:46:04.142] at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:607) [09:46:04.142] at java.lang.Thread.run(Thread.java:619) ---8--- What I'm doing on logout is calling the logout-page and there: public LogoutPage() { AuthServiceWebSession.get().logout(); // Invalidates the session setResponsePage( LoginPage.class ); } What change might have caused this and how can I circumvent this? Cheers, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: shopping cart and back button
A twist on this could be to just pass the cart around in constructors... We've done something like that, just not with a real cart but a filter for reporting. regards Nino Scott Swank wrote: I agree, having just helped implement an application with a shopping cart in Wicket. The cart is really an attribute of the session rather than of a particular page. Scott On 8/12/07, Matej Knopp [EMAIL PROTECTED] wrote: Shopping cart is not supposed to be page scoped, so you need to keep it in session. Also if you want page to be refreshed on back button, you need to send the Cache-Control: no-store http header. -Matej On 8/12/07, Artur W. [EMAIL PROTECTED] wrote: 1. User opens products page. 2. User chooses a product. 3. User clicks add product to shopping cart. 4. User is redirected to shopping cart list. 5. User clicks _back button in the browser_. 6. Added product in step 3 disappear from the shopping cart :( Also note that the user will always be shown the empty shopping cart when pressing the backbutton: the page is in the browser cache. Go to amazon and check yourself. I don't know how about amazon but in our current implementation of the e-shop (spring+jsp) when user clicks back button the page is refreshed correctly (the added product is in the cart). Yes, we set headers :) In default wicket settings not only the shopping cart is empty but the product is removed from the cart because of backing previous model state. So the question is what is the best practice to control which state we want to versioning and which not? Could the state be partially versionable? Thanks, Artur -- View this message in context: http://www.nabble.com/shopping-cart-and-back-button-tf4254382.html#a12116192 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to integrate wicket frame work with spring
hi i need help in integrating wicket frame work with spring frame .i am using direct approach for this but my dao object is returning null.and the applicationcontext.xml is bean id=wicketApplication class=project.MyApplication property name=contactDao ref=contactDao/ /bean is throwing exception for undefined bean. can some body help. thanks
Re: How to integrate wicket frame work with spring
property name=contactDao ref=contactDao/ Have u defined contactDao in your xml file Basically there should be a definition in your xml file corresponding to contactDao i.e contactDao should point to a class in ur classpath -swaroop belur
Re: best practice for a header component with links defined by the page
On 8/30/07, Kirk Israel [EMAIL PROTECTED] wrote: Igor, sorry if I've irritated you. I know some of my frustration comes from A. an ugly reluctance to embrace change and B. Wicket is doing great things but it's somewhat early days, and the documentation (tutorial books and recipe collections) is still scanty. Irritated? You obviously lack basic Wicket knowledge even though you claim to be using it for months (Now, after months of using Wicket...). But happily, you don't let that fact hinder you from bitching about Wicket. This certainly isn't the right attitude if you come here for help. Eelco, thanks, your summary was accurate. I thought about a repeater, it seemed like overkill, and I thought maybe there was a third way. (I still have to look into how the encompassing page would feed the links into the component, maybe not that difficult) So am I correct in thinking that, in general, most HTML pages in WIcket will have all possible subcomponents listed, and the visibility will control things that shouldn't be there... Doesn't have to be. You should use panels or fragments for things like this. There is no reason for unused component placeholders. After months of using Wicket, this might be the right time to learn about panels and fragments... -Matej On 8/29/07, Igor Vaynberg [EMAIL PROTECTED] wrote: or just write something in perl and call it a day. -igor On 8/29/07, Eelco Hillenius [EMAIL PROTECTED] wrote: So let me try to rephrase your problem: you have a header component that shows a variable number of components (links). Use a repeater (e.g. list view or repeating view) for the variable number of components, and you probably want to wrap the header component in a panel so that it is easy to move it around, place it on other pages, etc. Think a bit about whether those links should be internal or to bookmarkable pages, and that should do the trick, right? Eelco On 8/29/07, Kirk Israel [EMAIL PROTECTED] wrote: Hey there-- So I came up with a solution to this, but I suspect it's not very Wicket-y, so I'd like some suggestions on best practices: We want a header component that can go on different pages, with 1 2 or 3 links to other pages. (Well, I guess ideally any #, but with my approach it was easier to match it to the maximum shown in the spec). Visually, the end result would be Back to: _LINK1_, _LINK2_ or _LINK3_ As far as i can tell, the links and their labels should be created by the page containing the component. The trouble is, since the HTML and wicket:id for displaying each link is in the HTML for the component, the page has to know what ID to assign its link (and it doesn't seem like you can change the id of a component object after its created, which would have meant the page could just hand a list of un-ID'd labeled links in, and the component could have re-IDed them to match the HTML) So the component has a static callback getIdPrefixForLink() and getIdPrefixForLinkLabel(), and the page uses that, and then uses that string + 0, 1, or 2 for the links its making and handing to the constructor of the Header component. So if the Component only gets 1 Labeled Link, it then creates placeholder objects for the other 2, to make sure the hierarchy as outlined in the HTML is still ok, and then just hides them. And there's a tad more logic for the commas and the or. So, this all seems really hacky to me. What's a better way? In other words: Is having to make place holders for everything that ever MIGHT appear on a page or component, and then making them invisible when you don't need them, the Wicket way, or is there something more direct? And/or is there a standard way of letting parent pages or component make subsubcomponents to be added to a subcomponent (e.g the Page making PageLinks to be added to the Header component -- incidentally I can't just pass in a reference to the class, because of what we had to do to make lazy loading links that don't fully instantiate the page they go to until that link is clicked.) - 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: Best way to add a MarkupFilter
Hi, but the default factory doesn't do much, just creates markup parse. You have to create your own markup factory, it's trivial. IMarkupSettings.setMarkupParserFactory(new IMarkupParserFactory() { public MarkupParser newMarkupParser(final MarkupResourceStream resource) { MarkupParser mp = new MarkupParser(new XmlPullParser(), resource); mp.appendMarkupFilter(yourFilter); return mp; } }); -Matej On 8/30/07, David Leangen [EMAIL PROTECTED] wrote: What's the best way to add a markup filter to my app? I noticed that in the settings I can override the MarkupParserFactory and provide my own filter, but that is not what I want to do. I just want to use the default factory, but add my own filter. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to integrate wicket frame work with spring
which xml file ? web.xml or context.xml, applicationcontext.xml or any other xml which one? On 8/30/07, Swaroop Belur [EMAIL PROTECTED] wrote: property name=contactDao ref=contactDao/ Have u defined contactDao in your xml file Basically there should be a definition in your xml file corresponding to contactDao i.e contactDao should point to a class in ur classpath -swaroop belur
Re: TreeTable...how to refect a label change on TreeNode
It is correct, and there is nothing special you should do, if your TreeModel is correctly implemented (=it reflects the change). If it doesn't, it means that the TreeModel which you set to the tree is holding stale data, you need to correct that. -Matej On 8/30/07, Doug Leeper [EMAIL PROTECTED] wrote: After further evaluating what I need done...I don't believe I need AJAX. The Tree Node needs to be updated to reflect a data change, i.e. name. However, the name change occurs in a page...not in the same page as the tree. Am I correct in this...no AJAX is needed since I am changing Pages? If this is correct (no AJAX)...how to tell the nodes in the TreeTable to update/reload their information? -- View this message in context: http://www.nabble.com/TreeTable...how-to-refect-a-label-change-on-TreeNode-tf4300479.html#a12400148 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: How to integrate wicket frame work with spring
You're missing Spring bean definitions, not really Wicket related. Read Spring's manual: http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-metadata bhupat parmar wrote: which xml file ? web.xml or context.xml, applicationcontext.xml or any other xml which one? On 8/30/07, Swaroop Belur [EMAIL PROTECTED] wrote: property name=contactDao ref=contactDao/ Have u defined contactDao in your xml file Basically there should be a definition in your xml file corresponding to contactDao i.e contactDao should point to a class in ur classpath -swaroop belur -- http://www.ehour.nl/ http://blog.ehour.nl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: VisitChildren bottom-up
The IPostOrderVisitor idea seems to me better than having another method -Matej On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: perhaps you can add an rfe into jira so we dont forget. -igor On 8/29/07, RedFury [EMAIL PROTECTED] wrote: Thanks for the quick reply Igor. For now I'm just going to take your FormComponent visitor example and adapt that to my case since it looks tidy and straightforward. It would be nice if this functionality could somehow find its way into markupcontainer though. Cheers, Dean igor.vaynberg wrote: hrm. i have implemented a postorder traversal for formcomponents (see FormComponent.visitFormComponentsPostOrder) so you can either take that code and use it in your app, or we can bring it up to markupcontainer and generalize it. the problem is that we already have visitComponents, and having a visitComponentsPostOrder next to it seems a little inconsistent. what do other devs think? -igor On 8/29/07, RedFury [EMAIL PROTECTED] wrote: Hi all, I've writing a very heavily javascripted app in wicket and finding wicket handles the complexity wonderfully. I've used VisitChildren(IVisitor) successfully in numerous places but have a problem with a case where I'd like to use it 'backwards'. I'm writing some base components which will be used by our application programmers and our base Panel has an onClose() method which will contribute javascript to a closing panel (rendered on AjaxRequestTarget.prependJavascript()) What I would like to do is have a closing panel's children automatically call onClose(). So I started with: protected final void close() { visitChildren(JumbuckPanel.class, new IVisitor() { public Object component(Component c) { ((JumbuckPanel)c).onClose(); return IVisitor.CONTINUE_TRAVERSAL; } }); } Then I realized that this had a problem - being onClose() I needed the children to be traversed from the bottom-up, whereas visitChildren always seem to go top-down. That is, from looking at VisitChildren() in MarkupContainer, it goes.. -visit this node -if this is a container, visitchildren recursively. wherease I need: -if this is a container, visitchildren recursively -visit this node. So originally I tried to write reverseVisitChildren() in my sublcass of MarkupContainer but then realized all of the access functions (children_size and children_next) are private in markupContainer and my recursive call to reverseVisitChildren would only work on my custom panel, not generic MarkupContainers, if that makes. Is anyone able to suggest a simple solution to this problem, as right now the best solution I can think of is to add that functionality to MarkupContainer as I think it might prove useful for other people at some stage also. Thanks, Dean -- View this message in context: http://www.nabble.com/VisitChildren-bottom-up-tf4351747.html#a12399896 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/VisitChildren-bottom-up-tf4351747.html#a12400529 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Download link from DynamicWebResource?
Hi Anyone ever created that? Problem with the normal download link are that it requires a file, in this case I do not have that. I could create the file but that seems kind of overkill. Would be much nicer if it just took a DynamicWebResource? regards Nino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wizards FeedbackPanel
You can override newFeedbackPanel method of wizard protected FeedbackPanel newFeedbackPanel(String id) { FeedbackPanel fp = super.newFeedbackPanel(id); fp.setVisible(false); return fp; } -Matej On 8/30/07, ivana [EMAIL PROTECTED] wrote: Is there a way to remove/turn off Wizard's own feedbackpanel? Because now i have two and i only want one I have an application that gets user input in a number of WizardSteps. Each wizardstep has its own feedbackpanel. This worked fine until i made the next-step-button the default button for submitting. Now, if the input does not validate *and* the submit was done by pressing enter the wizard's own feedbackpanel is shown as well as our own. If the next-step button is clicked, and the input does not validate, only our own (styled) feedbackpanel shows the errormessages. (But if a previous submit caused the second feedbackpanel to appear, it will still be there). As expected, the second feedbackpanel's messages are updated only on enter. Meaning that if, say 1 of 2 errors is seen to, and the next-step button is clicked, one feedbackpanel shows one error less while the other still shows both. On enter both feedbackpanels are updated. -- View this message in context: http://www.nabble.com/Wizards-FeedbackPanel-tf4352766.html#a12402952 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: Why AJAX call resets the focus on the component?
None worked. Not AjaxRequestTarget.focusComponent(null); nor AjaxRequestTarget.focusComponent(panel); It stills executes: ajax-wicket-call my-focus-on-componen-load ajax-wicket-focus-on-call-end f(t) On 8/29/07, Matej Knopp [EMAIL PROTECTED] wrote: just call AjaxRequestTarget.focuscomponent(null), that should prevent wicket from focusing the element. On 8/29/07, Gerolf Seitz [EMAIL PROTECTED] wrote: you can call AjaxRequestTarget#focusComponent(Component). either you pass the AjaxRequestTarget to the replacing panel and let it set the focus itself or you can have a method which returns the component that should get the focus. gerolf On 8/29/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi, I am changing a panel inside a page with an ajax link, I change them from one to another panels A B C D etc. Inside each of the panels there is a field (textfield, choicefield, etc, depending on which panel) that must have the focus when loaded. I previously built a behavior that can be added to any component that needs the focus. That behavior function is called perfectly but before the pos-handlers for the ajax call end. So what happens is that the ajax functions are putting the focus on the component that had it before the call started, in this case the ajax link. And what is happening due to that call is that my component gets the focus, but immediately after gets blur or the focus is taken away from the field and back to the link. Is there another way? or a form to avoid refocusing of components in ajax calls? f(t)
Re: Download link from DynamicWebResource?
hi nino, i use something like that to download dynamically generated excel-files. to get a resourcestream, i use this class: --- package wicket.util; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Locale; import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.resource.ResourceStreamNotFoundException; import org.apache.wicket.util.time.Time; public class ByteArrayResourceStream implements IResourceStream { private static final long serialVersionUID = 1L; private Locale locale = null; private byte[] content = null; private String contentType = null; public ByteArrayResourceStream( byte[] content, String contentType ) { this.content = content; this.contentType = contentType; } public void close( ) throws IOException { } public String getContentType( ) { return(contentType); } public InputStream getInputStream( ) throws ResourceStreamNotFoundException { return(new ByteArrayInputStream( content )); } public Locale getLocale( ) { return(locale); } public long length( ) { return(content.length); } public void setLocale( Locale locale ) { this.locale = locale; } public Time lastModifiedTime( ) { return null; } } --8--- then i just implement a link to my resource: ---8--- public class XlsLink extends Link { private static final long serialVersionUID = 1L; byte[] xls = null; public XlsLink( String id, byte[] xls ) { super( id ); this.xls = xls; } public void onClick( ) { IResourceStream resourceStream = new ByteArrayResourceStream( xls, application/vnd.ms-excel ); getRequestCycle().setRequestTarget( new ResourceStreamRequestTarget( resourceStream ) { public String getFileName( ) { return(export.xls); } } ); } } ---8-- that's all about it. best regards, --- jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Updating Panels with Ajax (is this a proper way of doing so?)
Hi, I have to update the center of the page on a simple site. An earlier version of this app use frames. I want to use panels and ajax. I did this in the prototype: I have a container, that holds the panels (A or B or C or you catch my drift _ ). private StandardPanel m_cPanelToLoad; //Construct the language panel add(new AjaxLink(link1) { public void onClick(AjaxRequestTarget target) { container.remove(m_cPanelToLoad); m_cPanelToLoad = new StandardPanel(panelContent, ThisForm, ThisTitle); container.add(m_cPanelToLoad); target.addComponent(container); } }); It doesn't seem so right. but works fine... Any sugestions? avoid, If it works don't fix it, please, I hate it... :-) f(t)
not able to get selected ListMultipleChoice values
ERROR - AjaxRequestTarget - Error while responding to an AJAX request: [EMAIL PROTECTED] markupIdToComponent [{tabs=[MarkupContainer [Component id = tabs, page = wicket.quickstart.Index, path = 0:tabs.AjaxTabbedPanel, isVisible = true, isVersioned = false]]}], prependJavascript [[]], appendJavascript [[]] wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = tagList, page = wicket.quickstart.Index, path = 0:tabs:panel:simpleUpload:tagList.ListMultipleChoice, isVisible = true, isVersioned = false]]
Re: How to integrate wicket frame work with spring
Have you read: http://www.wicket-wiki.org.uk/wiki/index.php/Spring http://www.wicket-wiki.org.uk/wiki/index.php/Spring? bhupat parmar wrote: hi i need help in integrating wicket frame work with spring frame .i am using direct approach for this but my dao object is returning null.and the applicationcontext.xml is bean id=wicketApplication class=project.MyApplication property name=contactDao ref=contactDao/ /bean is throwing exception for undefined bean. can some body help. thanks -- View this message in context: http://www.nabble.com/How-to-integrate-wicket-frame-work-with-spring-tf4352831.html#a12406060 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: No localizer has been set
Johan Compagner napsal(a): thats odd on your production machine you have enabled debugging: if (log.isDebugEnabled()) { log.debug(detaching + this + for requestCycle + RequestCycle.get()); } and that code is not executed for development machine? Thats a bit the reverse what it should be.. But the problem is that StringResourceModel.toString() calls getString() thats wrong it shouldn't do that. OK, what's the preferred way to localize data in ListView.populateItem I found this on wicket wiki item.add(new Label(name, new StringResourceModel(wrapper.getValue(), null, null))); after changing to new StringResourceModel(wrapper.getValue(), this, null) it's working on production server too. Martin johan On 8/29/07, Martin Bednář [EMAIL PROTECTED] wrote: I use code below, it works on my development machine (linux, jetty6) but don't work on production server (linux,tomcat-5, tomcat 5.5). Any advice ? public LanguageCheckBoxPanel(String id) { super(id); for (LanguageSelectOption languageOption : LanguageModel.languages) { languages.add(new CheckBoxLanguageWrapper(languageOption)); } add(new ListView(languageList, languages) { protected void populateItem(ListItem item) { CheckBoxLanguageWrapper wrapper = (CheckBoxLanguageWrapper) item .getModelObject(); //On this line code fails item.add(new Label(name, new StringResourceModel(wrapper .getValue(), null, null))); item.add(new CheckBox(check, new PropertyModel(wrapper, selected))); } }); } Stack trace WicketMessage: Exception in rendering component: [Component id = name, page = cz.triax.marathon.statistics.BatchPrintPage, path = 2:navomaticBorder:form:languagePanel:languageList:0:name.Label, isVisible = true, isVersioned = false] Root cause: java.lang.IllegalStateException: No localizer has been set at wicket.model.StringResourceModel.getString(StringResourceModel.java:397) at wicket.model.StringResourceModel.toString(StringResourceModel.java:464) at java.lang.String.valueOf(String.java:2827) at java.lang.StringBuffer.append(StringBuffer.java:219) at wicket.model.AbstractDetachableModel.attach(AbstractDetachableModel.java :60) at wicket.model.AbstractDetachableModel.getObject( AbstractDetachableModel.java:101) at wicket.Component.getModelObject(Component.java:983) at wicket.Component.getModelObjectAsString(Component.java:998) at wicket.markup.html.basic.Label.onComponentTagBody(Label.java:113) at wicket.Component.renderComponent(Component.java:1712) at wicket.markup.html.WebComponent.onRender(WebComponent.java:61) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.Component.render(Component.java:1526) at wicket.markup.html.list.ListView.renderItem(ListView.java:676) at wicket.markup.html.list.ListView.onRender(ListView.java:637) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:571) at wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:108) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917) at wicket.markup.html.form.Form.onComponentTagBody(Form.java:779) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.markup.html.form.Form.onRender(Form.java:850) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.markup.html.border.Border.renderBodyComponent(Border.java:300) at wicket.markup.html.border.Border.resolve(Border.java:215) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1345) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.markup.html.border.Border.renderBodyComponent(Border.java:300) at wicket.markup.html.border.Border.resolve(Border.java:215) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1345) at
Re: Regression in 1.3.0-beta3(?)
We've run into the same issue after upgrading to beta3. We had to replace AjaxFallbackOrderByBorder with a 'normal' OrderByBorder to make our web app work again. Unfortunatly, I haven't been able to come up with a simple example that reproduces the problem. Have you? Johannes Schneider-3 wrote: org.apache.wicket.markup.MarkupException: Expected close tag for -- View this message in context: http://www.nabble.com/Regression-in-1.3.0-beta3%28-%29-tf4346638.html#a12406487 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: not able to get selected ListMultipleChoice values
Hello bhupat, you shows only the the top of the iceberg, better show all, what is under waterline. This error can be initiated by many reasons. Most likely of mismatching in you markup and corresponding declared java objects hierarchy. Write carefully what you want to expect from you code and also how you tied to achive. Welcome are code snippet (not full java codebase, but related to encountered problem), html fragments, exception stack trace, debug messages... With this info locating of your errors might brings pleasure. Short, be more verbose, and people will like you. Cheers, Oleg Thursday, August 30, 2007, 2:10:41 PM, you wrote: ERROR - AjaxRequestTarget - Error while responding to an AJAX request: [EMAIL PROTECTED] markupIdToComponent [{tabs=[MarkupContainer [Component id = tabs, page = wicket.quickstart.Index, path = 0:tabs.AjaxTabbedPanel, isVisible = true, isVersioned = false]]}], prependJavascript [[]], appendJavascript [[]] wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = tagList, page = wicket.quickstart.Index, path = 0:tabs:panel:simpleUpload:tagList.ListMultipleChoice, isVisible = true, isVersioned = false]] -- Best regards, Olegmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: not able to get selected ListMultipleChoice values
It also helps to read [1] and use its lessons and guidance for future questions, it will help us help you much better and quicker. (and add the wicket version to Oleg's list of needed information) Martijn [1] http://catb.org/~esr/faqs/smart-questions.html On 8/30/07, Oleg Taranenko [EMAIL PROTECTED] wrote: Hello bhupat, you shows only the the top of the iceberg, better show all, what is under waterline. This error can be initiated by many reasons. Most likely of mismatching in you markup and corresponding declared java objects hierarchy. Write carefully what you want to expect from you code and also how you tied to achive. Welcome are code snippet (not full java codebase, but related to encountered problem), html fragments, exception stack trace, debug messages... With this info locating of your errors might brings pleasure. Short, be more verbose, and people will like you. -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: best practice for a header component with links defined by the page
Igor, sorry if I've irritated you. I know some of my frustration comes from ... This certainly isn't the right attitude if you come here for help. Well... if it means anything, from my perspective, the more I use Wicket, the more I love it. I'm discovering new, and great things every day. :-) Thanks all for all the great work! :-D Cheers, Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Updating Panels with Ajax (is this a proper way of doing so?)
i usually do it like this: Panel panel = new StandardPanel(m_cPanelToLoad.getId(), ThisForm, ThisTitle); m_cPanelToLoad.replaceWith(panel); m_cPanelToLoad = panel; target.addComponent(m_cPanelToLoad); if you don't want the language panel to decide which component should be created, but rather let the parent of all panels manage the replacements, you could take a look at Thies Edelings blog entry here: http://blog.ehour.nl/index.php/archives/18 gerolf On 8/30/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi, I have to update the center of the page on a simple site. An earlier version of this app use frames. I want to use panels and ajax. I did this in the prototype: I have a container, that holds the panels (A or B or C or you catch my drift _ ). private StandardPanel m_cPanelToLoad; //Construct the language panel add(new AjaxLink(link1) { public void onClick(AjaxRequestTarget target) { container.remove(m_cPanelToLoad); m_cPanelToLoad = new StandardPanel(panelContent, ThisForm, ThisTitle); container.add(m_cPanelToLoad); target.addComponent(container); } }); It doesn't seem so right. but works fine... Any sugestions? avoid, If it works don't fix it, please, I hate it... :-) f(t)
WicketTester, testing Form and SubmitLink
Hi Folks, I'm trying to test a form submission with SubmitLink, test code below: tester.setParameterForNextRequest(numberChangeForm:numberToChangeTo, numberToChangeTo); reset(smsServiceMock); smsServiceMock.sendActivationSms(isA(Subscriber.class)); replay(smsServiceMock); // submit the form //tester.clickLink(numberChangeForm:numberChangeSubmitLink); tester.submitForm(numberChangeForm); // check that the mock was called verify(smsServiceMock); tester.processRequestCycle(); // Verify that the message is displayed, this just checks the expected components have rendered checkRender(numberToChangeTo); Now my SubmitLink has overridden the onSubmit() but when I step through the debug of the test that's actually not getting called. All my validators on the text field are getting called as expected and in fact the form works as expected when deployed so I'm thinking that it might be a WicketTester issue or the more likely scenario that I'm doing something wrong? Things I've tried: - debugging as mentioned, but this just shows me it's not getting called - trying to call the link directly but I just get the below exception which I'm not really surpised about java.lang.IllegalArgumentException: The component class doesn't seem to implement any of the known *Listener interfaces: class com.yeigo.view.wicket.register.RegistrationCheckPage$2 .. - Googled. Many thanks Simon
Re: No localizer has been set
yes then you give the component for which it can get a localizer. But i fixed it already in trunk anyway. toString() won't try to construct the message johan On 8/30/07, Martin Bednář [EMAIL PROTECTED] wrote: Johan Compagner napsal(a): thats odd on your production machine you have enabled debugging: if (log.isDebugEnabled()) { log.debug(detaching + this + for requestCycle + RequestCycle.get()); } and that code is not executed for development machine? Thats a bit the reverse what it should be.. But the problem is that StringResourceModel.toString() calls getString() thats wrong it shouldn't do that. OK, what's the preferred way to localize data in ListView.populateItem I found this on wicket wiki item.add(new Label(name, new StringResourceModel(wrapper.getValue(), null, null))); after changing to new StringResourceModel(wrapper.getValue(), this, null) it's working on production server too. Martin johan On 8/29/07, Martin Bednář [EMAIL PROTECTED] wrote: I use code below, it works on my development machine (linux, jetty6) but don't work on production server (linux,tomcat-5, tomcat 5.5). Any advice ? public LanguageCheckBoxPanel(String id) { super(id); for (LanguageSelectOption languageOption : LanguageModel.languages) { languages.add(new CheckBoxLanguageWrapper(languageOption)); } add(new ListView(languageList, languages) { protected void populateItem(ListItem item) { CheckBoxLanguageWrapper wrapper = (CheckBoxLanguageWrapper) item .getModelObject(); //On this line code fails item.add(new Label(name, new StringResourceModel(wrapper .getValue(), null, null))); item.add(new CheckBox(check, new PropertyModel(wrapper, selected))); } }); } Stack trace WicketMessage: Exception in rendering component: [Component id = name, page = cz.triax.marathon.statistics.BatchPrintPage, path = 2:navomaticBorder:form:languagePanel:languageList:0:name.Label, isVisible = true, isVersioned = false] Root cause: java.lang.IllegalStateException: No localizer has been set at wicket.model.StringResourceModel.getString(StringResourceModel.java :397) at wicket.model.StringResourceModel.toString(StringResourceModel.java:464) at java.lang.String.valueOf(String.java:2827) at java.lang.StringBuffer.append(StringBuffer.java:219) at wicket.model.AbstractDetachableModel.attach( AbstractDetachableModel.java :60) at wicket.model.AbstractDetachableModel.getObject( AbstractDetachableModel.java:101) at wicket.Component.getModelObject(Component.java:983) at wicket.Component.getModelObjectAsString(Component.java:998) at wicket.markup.html.basic.Label.onComponentTagBody(Label.java:113) at wicket.Component.renderComponent(Component.java:1712) at wicket.markup.html.WebComponent.onRender(WebComponent.java:61) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.Component.render(Component.java:1526) at wicket.markup.html.list.ListView.renderItem(ListView.java:676) at wicket.markup.html.list.ListView.onRender(ListView.java:637) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:571) at wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:108) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917) at wicket.markup.html.form.Form.onComponentTagBody(Form.java:779) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.markup.html.form.Form.onRender(Form.java:850) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.markup.html.border.Border.renderBodyComponent(Border.java :300) at
CheckGroup in a DataTable
I am using a Check component inside of a DataTable. The DataTable is surrounded by a CheckGroup. The model on each Check component is the Row Model. This works great to get a list of checked rows. Is there a good way to retain the checks across pages? I created a new Navigator component that uses SubmitLinks instead of the Link component, but he List of models doesn't retain the objects from the previous page. Any suggestions?
Re: Updating Panels with Ajax (is this a proper way of doing so?)
Great Reply. thanks Gerolf. I'll check it out and let you know. f(t) On 8/30/07, Gerolf Seitz [EMAIL PROTECTED] wrote: i usually do it like this: Panel panel = new StandardPanel(m_cPanelToLoad.getId(), ThisForm, ThisTitle); m_cPanelToLoad.replaceWith(panel); m_cPanelToLoad = panel; target.addComponent(m_cPanelToLoad); if you don't want the language panel to decide which component should be created, but rather let the parent of all panels manage the replacements, you could take a look at Thies Edelings blog entry here: http://blog.ehour.nl/index.php/archives/18 gerolf On 8/30/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi, I have to update the center of the page on a simple site. An earlier version of this app use frames. I want to use panels and ajax. I did this in the prototype: I have a container, that holds the panels (A or B or C or you catch my drift _ ). private StandardPanel m_cPanelToLoad; //Construct the language panel add(new AjaxLink(link1) { public void onClick(AjaxRequestTarget target) { container.remove(m_cPanelToLoad); m_cPanelToLoad = new StandardPanel(panelContent, ThisForm, ThisTitle); container.add(m_cPanelToLoad); target.addComponent(container); } }); It doesn't seem so right. but works fine... Any sugestions? avoid, If it works don't fix it, please, I hate it... :-) f(t)
Re: Why AJAX call resets the focus on the component?
Francisco Diaz Trepat - gmail wrote: 1.3 beta 2. I don't think it's a bug. I don't know if it's related, but there's 100% a set focus bug between 1.2.6 and 1.3. I've got a patch that works for me, but it will almost certainly break something else... If you have success with this please report back.. Index: jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js === --- jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (revision 560279) +++ jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (working copy) @@ -1702,6 +1702,7 @@ setFocusOnElements: function (elements) { + /* for (var i=0; i elements.length; i++) { if ( typeof(elements[i].focusSet) == undefined) @@ -1710,6 +1711,7 @@ elements[i].focusSet = true; } } + */ }, attachFocusEvent: function() - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketTester, testing Form and SubmitLink
hmm, dont know if wickettester has support for submitlink because that has to both submit the form/process it and invoke onsubmit on it. please add an rfe into jira. -igor On 8/30/07, wicket user [EMAIL PROTECTED] wrote: Hi Folks, I'm trying to test a form submission with SubmitLink, test code below: tester.setParameterForNextRequest (numberChangeForm:numberToChangeTo, numberToChangeTo); reset(smsServiceMock); smsServiceMock.sendActivationSms(isA(Subscriber.class)); replay(smsServiceMock); // submit the form //tester.clickLink(numberChangeForm:numberChangeSubmitLink); tester.submitForm(numberChangeForm); // check that the mock was called verify(smsServiceMock); tester.processRequestCycle(); // Verify that the message is displayed, this just checks the expected components have rendered checkRender(numberToChangeTo); Now my SubmitLink has overridden the onSubmit() but when I step through the debug of the test that's actually not getting called. All my validators on the text field are getting called as expected and in fact the form works as expected when deployed so I'm thinking that it might be a WicketTester issue or the more likely scenario that I'm doing something wrong? Things I've tried: - debugging as mentioned, but this just shows me it's not getting called - trying to call the link directly but I just get the below exception which I'm not really surpised about java.lang.IllegalArgumentException: The component class doesn't seem to implement any of the known *Listener interfaces: class com.yeigo.view.wicket.register.RegistrationCheckPage$2 .. - Googled. Many thanks Simon
Re: No localizer has been set
or just use the simpler ResourceModel -igor On 8/30/07, Martin Bednář [EMAIL PROTECTED] wrote: Johan Compagner napsal(a): thats odd on your production machine you have enabled debugging: if (log.isDebugEnabled()) { log.debug(detaching + this + for requestCycle + RequestCycle.get()); } and that code is not executed for development machine? Thats a bit the reverse what it should be.. But the problem is that StringResourceModel.toString() calls getString() thats wrong it shouldn't do that. OK, what's the preferred way to localize data in ListView.populateItem I found this on wicket wiki item.add(new Label(name, new StringResourceModel(wrapper.getValue(), null, null))); after changing to new StringResourceModel(wrapper.getValue(), this, null) it's working on production server too. Martin johan On 8/29/07, Martin Bednář [EMAIL PROTECTED] wrote: I use code below, it works on my development machine (linux, jetty6) but don't work on production server (linux,tomcat-5, tomcat 5.5). Any advice ? public LanguageCheckBoxPanel(String id) { super(id); for (LanguageSelectOption languageOption : LanguageModel.languages) { languages.add(new CheckBoxLanguageWrapper(languageOption)); } add(new ListView(languageList, languages) { protected void populateItem(ListItem item) { CheckBoxLanguageWrapper wrapper = (CheckBoxLanguageWrapper) item .getModelObject(); //On this line code fails item.add(new Label(name, new StringResourceModel(wrapper .getValue(), null, null))); item.add(new CheckBox(check, new PropertyModel(wrapper, selected))); } }); } Stack trace WicketMessage: Exception in rendering component: [Component id = name, page = cz.triax.marathon.statistics.BatchPrintPage, path = 2:navomaticBorder:form:languagePanel:languageList:0:name.Label, isVisible = true, isVersioned = false] Root cause: java.lang.IllegalStateException: No localizer has been set at wicket.model.StringResourceModel.getString(StringResourceModel.java :397) at wicket.model.StringResourceModel.toString(StringResourceModel.java:464) at java.lang.String.valueOf(String.java:2827) at java.lang.StringBuffer.append(StringBuffer.java:219) at wicket.model.AbstractDetachableModel.attach( AbstractDetachableModel.java :60) at wicket.model.AbstractDetachableModel.getObject( AbstractDetachableModel.java:101) at wicket.Component.getModelObject(Component.java:983) at wicket.Component.getModelObjectAsString(Component.java:998) at wicket.markup.html.basic.Label.onComponentTagBody(Label.java:113) at wicket.Component.renderComponent(Component.java:1712) at wicket.markup.html.WebComponent.onRender(WebComponent.java:61) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.Component.render(Component.java:1526) at wicket.markup.html.list.ListView.renderItem(ListView.java:676) at wicket.markup.html.list.ListView.onRender(ListView.java:637) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:571) at wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:108) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917) at wicket.markup.html.form.Form.onComponentTagBody(Form.java:779) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.markup.html.form.Form.onRender(Form.java:850) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.markup.html.border.Border.renderBodyComponent(Border.java :300) at wicket.markup.html.border.Border.resolve(Border.java:215) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1345) at
Re: CheckGroup in a DataTable
are you sure they are being submitted properly, meaining does that list make it into checkgroup's model when switch pages? -igor On 8/30/07, Tim Lantry [EMAIL PROTECTED] wrote: I am using a Check component inside of a DataTable. The DataTable is surrounded by a CheckGroup. The model on each Check component is the Row Model. This works great to get a list of checked rows. Is there a good way to retain the checks across pages? I created a new Navigator component that uses SubmitLinks instead of the Link component, but he List of models doesn't retain the objects from the previous page. Any suggestions?
Re: Regression in 1.3.0-beta3(?)
I've been able to reproduce the problem with a these few classes: http://www.nabble.com/file/p12409279/Expected_close_tag.zip Expected_close_tag.zip It seems to be caused by the problem that BorderBodyResolver warns about: Unlike OrderByBorder, AjaxFallbackOrderByBorder doesn't add the BorderBodyContainer so it fits the markup. Now, if AjaxFallbackOrderByBorder is wrapped in another Border (as in my attached example), we don't get that nice log message, instead we get that 'Expected close tag for ...' message. So, it seems https://issues.apache.org/jira/browse/WICKET-166 actually IS relevant for wicket 1.3.0. (Of course the fix looks now different because of the api change) cheers, Jonas igor.vaynberg wrote: hmm, if you could create a quickstart for this it would be very helpful. -igor -- View this message in context: http://www.nabble.com/Regression-in-1.3.0-beta3%28-%29-tf4346638.html#a12409279 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: Regression in 1.3.0-beta3(?)
fixed, thanks -igor On 8/30/07, Jonas-21 [EMAIL PROTECTED] wrote: I've been able to reproduce the problem with a these few classes: http://www.nabble.com/file/p12409279/Expected_close_tag.zip Expected_close_tag.zip It seems to be caused by the problem that BorderBodyResolver warns about: Unlike OrderByBorder, AjaxFallbackOrderByBorder doesn't add the BorderBodyContainer so it fits the markup. Now, if AjaxFallbackOrderByBorder is wrapped in another Border (as in my attached example), we don't get that nice log message, instead we get that 'Expected close tag for ...' message. So, it seems https://issues.apache.org/jira/browse/WICKET-166 actually IS relevant for wicket 1.3.0. (Of course the fix looks now different because of the api change) cheers, Jonas igor.vaynberg wrote: hmm, if you could create a quickstart for this it would be very helpful. -igor -- View this message in context: http://www.nabble.com/Regression-in-1.3.0-beta3%28-%29-tf4346638.html#a12409279 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: RadioChoice and ListView
Thank you Carlos, that fixed the problem! However, I still don't quite understand why. I guess I don't understand PropertyModel as well as I thought I did. What does PropertyModel do that allows the ParticipationList to be referenced across the two requests? Thanks again! -Alex Pine On 8/30/07, Carlos Pita [EMAIL PROTECTED] wrote: This looks wrong too: ListParticipation participationList = exModel.getEx ().getParticipationList(); ListView subjectListView = new ListView(list, participationList) { if your experiment model is intended to be a detachable one, ie. if you are loading it from a database or something, then you shouldn't instantiate the listview with a list but with a model that loads that list (or delegates to another model that eventually loads the entity to which the collection belongs...). If you pass the plain collection you are defeating the entire purpose of having the loadabledetachablemodel in the first place. For example, use new ListView(list, new PropertyModel(exModel, participationList)); Regards, Carlos On 8/29/07, Igor Vaynberg [EMAIL PROTECTED] wrote: break in your onsubmit and look at the list that the listview is pointing to. make sure the data is there, the fact that it isnt being persisted might be a problem outside of wicket's scope. -igor On 8/29/07, Alex Pine [EMAIL PROTECTED] wrote: I'm sorry to spam the list like this, but I really need help on this. Igor's solution doesn't seem to change anything. No information is transferred to the database upon hitting on submit. If no one knows the solution, does anyone have any ideas on how I could debug this? Is there some way I can reference the selections of the radiogroups from the the onSubmit method so I can see what their values are? Thanks for any help you can give, Alex On 8/29/07, Alex Pine [EMAIL PROTECTED] wrote: Thank you for the quick reply, but this fix doesn't seem to work. The selections are never persisted on form submit. Any ideas? On 8/29/07, Igor Vaynberg [EMAIL PROTECTED] wrote: problem is here RadioGroup rg = new RadioGroup(choice); you are not setting the model for the radiogroup choice so your choices go no where RadioGroup rg = new RadioGroup(choice, new PropertyModel( item.getModel(), status)); or leave it as it is and use PropertyListView instead -igor On 8/29/07, Alex Pine [EMAIL PROTECTED] wrote: Hi all, I'm trying to use a Radio Choice component inside a Listview so that each list item has one RadioGroup with three choices. When the form submit button is pressed, each selected choice should set a field in the model object of each list item. The code below should explain the problem more fully: /* The ultimate goal is to set the status field in each Participation object in the participationList of the object below. */ public class Experiment { private String name; private ListParticipation participationList; /* Other fields, constructors, getters, setters, etc */ } public class Participation { public static final int PARTICIPATED = 1; public static final int NO_SHOW = -1; public static final int SHOWED = 0; private User user; private int status; public Participation() { status = SHOWED; // Default value } /* getters, setters, etc */ } /* This is the web page that is supposed to do the setting*/ public class ParticipationPage extends BasePage { private static final long serialVersionUID = 1L; @SpringBean private ExperimentDAO exDAO; private DetachableExperimentModel exModel; public ParticipationPage(Experiment ex) { exModel = new DetachableExperimentModel(ex, exDAO); add(new ParticipationForm(form)); exModel.detach(); } class ParticipationForm extends Form { public ParticipationForm(String id) { super(id); ListParticipation participationList = exModel.getEx ().getParticipationList(); ListView subjectListView = new ListView(list, participationList) { private static final long serialVersionUID = 1L; /* I imagine the correct code should be something like this...? */ public void populateItem(final ListItem item) { Participation participation =
Page aliasing and Request interception
Hi, this is my first post so please take it easy on me! I have two questions: 1) Is there a way to alias the uri which activates a specific Wicket page? I know about mount() and how you can alias a package name, but I don't know how to explicitly alias a page name (instead of /UserLoginPage I would like to alias to /login) 2) Can someone direct me to some sample code that demonstrates how to enforce user authentication checks on any request made to my Wicket app? Basically, I want to do a check to see if a user has logged into the site before any action is executed. This is probably something very well documented, so even if it's a simple RTFM with a pointer to where, I would appreciate it. Thank you, /tataryn:craig -- If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one? --Tom Cargill
Re: CheckGroup in a DataTable
Yes, I added an onSubmit method on the form and it has all the checked models in the List. Then it changes pages and the next time I submit or change pages, they are gone. On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: are you sure they are being submitted properly, meaining does that list make it into checkgroup's model when switch pages? -igor On 8/30/07, Tim Lantry [EMAIL PROTECTED] wrote: I am using a Check component inside of a DataTable. The DataTable is surrounded by a CheckGroup. The model on each Check component is the Row Model. This works great to get a list of checked rows. Is there a good way to retain the checks across pages? I created a new Navigator component that uses SubmitLinks instead of the Link component, but he List of models doesn't retain the objects from the previous page. Any suggestions?
Re: CheckGroup in a DataTable
and whatever that model is it has a proper hashcode/equals implemented? -igor On 8/30/07, Tim Lantry [EMAIL PROTECTED] wrote: Yes, I added an onSubmit method on the form and it has all the checked models in the List. Then it changes pages and the next time I submit or change pages, they are gone. On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: are you sure they are being submitted properly, meaining does that list make it into checkgroup's model when switch pages? -igor On 8/30/07, Tim Lantry [EMAIL PROTECTED] wrote: I am using a Check component inside of a DataTable. The DataTable is surrounded by a CheckGroup. The model on each Check component is the Row Model. This works great to get a list of checked rows. Is there a good way to retain the checks across pages? I created a new Navigator component that uses SubmitLinks instead of the Link component, but he List of models doesn't retain the objects from the previous page. Any suggestions?
Re: VisitChildren bottom-up
On 8/30/07, Matej Knopp [EMAIL PROTECTED] wrote: The IPostOrderVisitor idea seems to me better than having another method Yeah, it would be a bit more elegant. But either works for me. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setEnabled(false) on FocusableTextField breaks persistence
On 8/30/07, janders [EMAIL PROTECTED] wrote: I don't think I'm doing a good job communicating what I'm trying to do. Or maybe it's me not doing a good job explaining what you should do :) The markup looks like this (note there is no attribute readonly for input field with id=label): select wicket:id=type optionhome/option optionwork/option optionother/option /select input wicket:id=label type=text class=label / What I want to do is dynamically set or remove the attribute readonly on the input field (label) depending on the dropdownchoice selection (type). If the user selects home or work I want the attribute readonly to be set. If the user selects other I want the attribute to be removed so that the user can edit label. The Java code looks like: final AttributeModifier rot = new AttributeModifier(readonly, true, new Model(readonly)); // true if (email.getType() != EmailAddress.Type.OTHER) emailLabel.add(rot); // this works, by adding the readonly attribute item.add(emailLabel); item.add(new DropDownChoice(type, emailTypeList) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(final Object newSelection) { if (newSelection == EmailAddress.Type.OTHER) { emailLabel.remove ??? ; // - I can't figure out how to remove the attribute emailLabel.requestFocus(); } else { emailLabel.setModelValue(newSelection.toString()); emailLabel.add(rot); } } }); if (email.getType() != EmailAddress.Type.OTHER) emailLabel.add(rot); item.add(emailLabel); item.add(new DropDownChoice(type, emailTypeList) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(final Object newSelection) { if (newSelection == EmailAddress.Type.OTHER) { rot.setEnabled(false); emailLabel.requestFocus(); } else { emailLabel.setModelValue(newSelection.toString()); rot.setEnabled(false); } } }); This code always adds the attribute modifier. However, it is disabled when your use case happens. Because I have wantOnSelectionChangedNotifications() set to true, the user can select a choice and the label should change accordingly -- i.e., add attribute readonly or remove it for the selection of other. So the problem that I'm having right now is how do I dynamically remove readonly (once added to the input field) when the user selects other from the dropdownchoice? You don't need to remove it. Just turn it off/ on like the code fragment above shows. And for the finale, in Wicket 1.3 (I gather you are using 1.2), you indeed can simply call remove(IBehavior) - attribute modifiers are behaviors. So then emailLabel.remove(rot) should work fine. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Urgent : how can i design get all input of a single form with TextField, ListMultiplechoice and FileUpload components
Hi, Anyone please guide me to fit upload example in Forminput example, my requirement is i want a develop a single form with following components TextField ListMultiplechoice FileUpload i am facing a problem in getting fileupload path data. Thanks in advance Bhupat
Re: Page aliasing and Request interception
mountBookmarkablePage could help you here. Wicket can't help you with autentication, but for authorization, you can implement IAuthorizationStrategy which allows you to protect various bits of wicket. -Matej On 8/30/07, Craig Tataryn [EMAIL PROTECTED] wrote: Hi, this is my first post so please take it easy on me! I have two questions: 1) Is there a way to alias the uri which activates a specific Wicket page? I know about mount() and how you can alias a package name, but I don't know how to explicitly alias a page name (instead of /UserLoginPage I would like to alias to /login) 2) Can someone direct me to some sample code that demonstrates how to enforce user authentication checks on any request made to my Wicket app? Basically, I want to do a check to see if a user has logged into the site before any action is executed. This is probably something very well documented, so even if it's a simple RTFM with a pointer to where, I would appreciate it. Thank you, /tataryn:craig -- If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one? --Tom Cargill
Re: Page aliasing and Request interception
On 8/30/07, Craig Tataryn [EMAIL PROTECTED] wrote: 2) Can someone direct me to some sample code that demonstrates how to enforce user authentication checks on any request made to my Wicket app? Basically, I want to do a check to see if a user has logged into the site before any action is executed. This is probably something very well documented, so even if it's a simple RTFM with a pointer to where, I would appreciate it. see wicket-examples/signin and signin2 examples -igor Thank you, /tataryn:craig -- If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one? --Tom Cargill
Updating FeedbackPanel
I have a scenario where upon submitting the page, a feedback message is added, something like info(Last Saved: {datetime}). I now am working on a different feature that wants to add feedback in the onBeforeRender() method of the page. At first, I was only seeing the original message (Last Saved...) and upon tracing it, I can see that the render process first updates all IFeedback objects and THEN processes the onBeforeRender. This means that my new message wasn't getting set in time to catch where the IFeedback objects were getting init'ed. So, I thought that I would simply call updateFeedback on my panel after I addedmy new message. But this didn't work either. So, upon digging into that, I found that the messages list is cached inside the FeedbackMessagesModel (the default model for the FeedbackPanel). I'm OK with the idea of caching, but I would have expected that calling updateFeedback (cache or otherwise) would have caused my feedback panel to get the latest set of messages. Here's what I did to overcome the problem: final FeedbackPanel feedback = new FeedbackPanel(feedback) { @Override public void updateFeedback() { get(feedbackul:messages).detach(); super.updateFeedback(); } }; Is this acceptable/desirable?If this is acceptable, should the FeedbackPanel be updated with this fix? If so, I can follow up with a JIRA. Or would the recommendation be to use a different FeedbackModel impl that doesn't cache? Chuck -- View this message in context: http://www.nabble.com/Updating-FeedbackPanel-tf4355824.html#a12412455 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 aliasing and Request interception
Igor, Matej thank you both. /tataryn:craig On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: On 8/30/07, Craig Tataryn [EMAIL PROTECTED] wrote: 2) Can someone direct me to some sample code that demonstrates how to enforce user authentication checks on any request made to my Wicket app? Basically, I want to do a check to see if a user has logged into the site before any action is executed. This is probably something very well documented, so even if it's a simple RTFM with a pointer to where, I would appreciate it. see wicket-examples/signin and signin2 examples -igor Thank you, /tataryn:craig -- If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one? --Tom Cargill
Re: hierarchy does not match
Still stuck with the same exception, even after upgrading to beta3. Can you please explain what hierarchy does not match means? On 8/28/07, Kees de Kooter [EMAIL PROTECTED] wrote: The Apache mailing lists don't allow attachments, so that got filtered. Furthermore, a relevant piece of code usually helps us better see what the problem might be. In your code both java code and some of your markup. OK, here are some snippets: My superclass: public abstract class TemplateWebPage extends WebPage { public TemplateWebPage() { super(); add(new Label(pageTitle, new PropertyModel(this, pageTitle))); add(new MenuPanel(menuPanel)); add(new UserPanel(userPanel)); } The main markup of that page: div class=left-column wicket:id=menuPanel /div div class=right-column wicket:child/ /div The code of the MenuPanel: public class MenuPanel extends Panel { public MenuPanel(String id) { super(id); add(new Label(customers, getString(menu.main.customers))); The markup of the panel: wicket:panel xmlns:wicket=http://wicket.sourceforge.net/; div class=menu style=width: 158px; table style=width: 100%; tr class=menuitem td colspan=2 style=width: 160px; a href=company-list.do?relation-type=customer span wicket:id=customerscustomers/span /a /td /tr The first lines of the exception: Unexpected RuntimeException WicketMessage: Unable to find component with id 'customers' in [MarkupContainer [Component id = -relative_path_prefix10, page = nl.boplicity.metronome.wicket.location.LocationListPage, path = 11:menuPanel:-relative_path_prefix10.WebMarkupContainer, isVisible = true, isVersioned = true]]. This means that you declared wicket:id=customers in your markup, but that you either did not add the component to your page at all, or that the hierarchy does not match. [markup = file:/home/kees/eclipse-workspace/metronome/target/classes/nl/boplicity/metronome/wicket/menu/MenuPanel.html -- Cheers, Kees de Kooter http://www.boplicity.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hierarchy does not match
hi kees, i believe i just checked in a fix for this into trunk, mind giving it a go? the error means that the hierarchy between html and java is not in sync for example webmarkupcontainer foo=new webmarkupcontainer(); foo.add(new label(bar)); div wicket:id=foo/divdiv wicket:id=bar/div as you can see the hierarchies are not in sync, html should be div wicket:id=foodiv wicket:id=bar/div/div -igor On 8/30/07, Kees de Kooter [EMAIL PROTECTED] wrote: Still stuck with the same exception, even after upgrading to beta3. Can you please explain what hierarchy does not match means? On 8/28/07, Kees de Kooter [EMAIL PROTECTED] wrote: The Apache mailing lists don't allow attachments, so that got filtered. Furthermore, a relevant piece of code usually helps us better see what the problem might be. In your code both java code and some of your markup. OK, here are some snippets: My superclass: public abstract class TemplateWebPage extends WebPage { public TemplateWebPage() { super(); add(new Label(pageTitle, new PropertyModel(this, pageTitle))); add(new MenuPanel(menuPanel)); add(new UserPanel(userPanel)); } The main markup of that page: div class=left-column wicket:id=menuPanel /div div class=right-column wicket:child/ /div The code of the MenuPanel: public class MenuPanel extends Panel { public MenuPanel(String id) { super(id); add(new Label(customers, getString( menu.main.customers))); The markup of the panel: wicket:panel xmlns:wicket=http://wicket.sourceforge.net/; div class=menu style=width: 158px; table style=width: 100%; tr class=menuitem td colspan=2 style=width: 160px; a href=company-list.do?relation-type=customer span wicket:id=customerscustomers/span /a /td /tr The first lines of the exception: Unexpected RuntimeException WicketMessage: Unable to find component with id 'customers' in [MarkupContainer [Component id = -relative_path_prefix10, page = nl.boplicity.metronome.wicket.location.LocationListPage, path = 11:menuPanel:-relative_path_prefix10.WebMarkupContainer, isVisible = true, isVersioned = true]]. This means that you declared wicket:id=customers in your markup, but that you either did not add the component to your page at all, or that the hierarchy does not match. [markup = file:/home/kees/eclipse-workspace/metronome/target/classes/nl/boplicity/metronome/wicket/menu/MenuPanel.html -- Cheers, Kees de Kooter http://www.boplicity.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Urgent : how can i design get all input of a single form with TextField, ListMultiplechoice and FileUpload components
Hellobhupat, using FileUploadField component in the form, you can get a its model - FileUpload. This fileUpload variable contains _all_data_ of uploaded file, including file name. Then you can save it in any path on your server. this snippet pasted from upload example: In the example it is a system temporary directory protectedvoidonSubmit() { finalFileUpload upload = fileUploadField.getFileUpload(); if(upload !=null) { // Create a new file File newFile =newFile(getUploadFolder(), upload.getClientFileName()); // Check new file, delete if it allready existed checkFileExists(newFile); try { // Save to new file newFile.createNewFile(); upload.writeTo(newFile); UploadPage.this.info("saved file: " + upload.getClientFileName()); } catch(Exception e) { thrownewIllegalStateException("Unable to write file"); } } } Cheers, Oleg Thursday,August30,2007,7:18:06PM,youwrote: bpHi, bpAnyonepleaseguidemetofituploadexampleinForminputexample, bpmyrequirementisiwantadevelop bpasingleformwithfollowingcomponents bpTextField bpListMultiplechoice bpFileUpload bpiamfacingaproblemingettingfileuploadpathdata. bpThanksinadvance bpBhupat -- Bestregards, Olegmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best practice for a header component with links defined by the page
Igor, I'm sorry I've sounded unappreciative to the work the team is doing. Yes, I'm a dumb curmudgeon who is having a lot of problems adjusting to a new approach to things, and who, despite an honest effort to embrace the wicket outlook, may have stumbled, and also dove right in to the code base we started here with not enough in-depth reading of Pro Wicket and fiddling around with more toy examples and then after that, started to get childishly frustrated when things didn't go the way I expected. On slashdot I'm more inclined to state my biases in an extreme way, in part to get some counterargument -- and there actually ended up being some good counterargument there, some wicket fans who expressed how much they dig the approach. My team has decided on wicket as the extensible, page centric approach to the fairly complex app we have to write, and so far I've done a poor job of thinking about Wicket deeply enough to know the best approaches to things. It's why I came here with a question like what would be the better way of doing this. Having had fragments pointed out to me (I knew more about panels, I think... at least to the extent of using them to wrap other components), and possibly thinking in terms of repeaters even though it's only going to be 2 or 3 things, I'll try to find some time and go back over some tutorials. On 8/29/07, Igor Vaynberg [EMAIL PROTECTED] wrote: I just dont understand how you expect us to continue helping you if you go and talk trash about something we invest a lot of time in. Based on the slashdot comments you left I dont really understand why you are using wicket at all. -igor On 8/29/07, Kirk Israel [EMAIL PROTECTED] wrote: Igor, sorry if I've irritated you. I know some of my frustration comes from A. an ugly reluctance to embrace change and B. Wicket is doing great things but it's somewhat early days, and the documentation (tutorial books and recipe collections) is still scanty. Eelco, thanks, your summary was accurate. I thought about a repeater, it seemed like overkill, and I thought maybe there was a third way. (I still have to look into how the encompassing page would feed the links into the component, maybe not that difficult) So am I correct in thinking that, in general, most HTML pages in WIcket will have all possible subcomponents listed, and the visibility will control things that shouldn't be there... On 8/29/07, Igor Vaynberg [EMAIL PROTECTED] wrote: or just write something in perl and call it a day. -igor On 8/29/07, Eelco Hillenius [EMAIL PROTECTED] wrote: So let me try to rephrase your problem: you have a header component that shows a variable number of components (links). Use a repeater (e.g. list view or repeating view) for the variable number of components, and you probably want to wrap the header component in a panel so that it is easy to move it around, place it on other pages, etc. Think a bit about whether those links should be internal or to bookmarkable pages, and that should do the trick, right? Eelco On 8/29/07, Kirk Israel [EMAIL PROTECTED] wrote: Hey there-- So I came up with a solution to this, but I suspect it's not very Wicket-y, so I'd like some suggestions on best practices: We want a header component that can go on different pages, with 1 2 or 3 links to other pages. (Well, I guess ideally any #, but with my approach it was easier to match it to the maximum shown in the spec). Visually, the end result would be Back to: _LINK1_, _LINK2_ or _LINK3_ As far as i can tell, the links and their labels should be created by the page containing the component. The trouble is, since the HTML and wicket:id for displaying each link is in the HTML for the component, the page has to know what ID to assign its link (and it doesn't seem like you can change the id of a component object after its created, which would have meant the page could just hand a list of un-ID'd labeled links in, and the component could have re-IDed them to match the HTML) So the component has a static callback getIdPrefixForLink() and getIdPrefixForLinkLabel(), and the page uses that, and then uses that string + 0, 1, or 2 for the links its making and handing to the constructor of the Header component. So if the Component only gets 1 Labeled Link, it then creates placeholder objects for the other 2, to make sure the hierarchy as outlined in the HTML is still ok, and then just hides them. And there's a tad more logic for the commas and the or. So, this all seems really hacky to me. What's a better way? In other words: Is having to make place holders for everything that ever MIGHT appear on a page or component, and then making them invisible when you don't need them, the Wicket
Re: best practice for a header component with links defined by the page
On 8/30/07, Kirk Israel [EMAIL PROTECTED] wrote: Igor, I'm sorry I've sounded unappreciative to the work the team is doing. Yes, I'm a dumb curmudgeon who is having a lot of problems adjusting to a new approach to things, and who, despite an honest effort to embrace the wicket outlook, may have stumbled, and also dove right in to the code base we started here with not enough in-depth reading of Pro Wicket and fiddling around with more toy examples and then after that, started to get childishly frustrated when things didn't go the way I expected. On slashdot I'm more inclined to state my biases in an extreme way, in part to get some counterargument -- and there actually ended up being some good counterargument there, some wicket fans who expressed how much they dig the approach. My team has decided on wicket as the extensible, page centric approach to the fairly complex app we have to write, and so far I've done a poor job of thinking about Wicket deeply enough to know the best approaches to things. It's why I came here with a question like what would be the better way of doing this. Having had fragments pointed out to me (I knew more about panels, I think... at least to the extent of using them to wrap other components), and possibly thinking in terms of repeaters even though it's only going to be 2 or 3 things, I'll try to find some time and go back over some tutorials. Thanks Kirk. I think we've all had occasions where we put biased opinions in public where we maybe regretted it later. I know I've been there. To the upside: there's never a dull moment on this list. More drama than an average soap opera :) Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best practice for a header component with links defined by the page
interface menuitem extends serializable { imodel getlabel(); abstract void onclick(); } class basepage extends webpage { protected abstract listmenuitem getitems(); public basepage() { add(new listview(menu, new propertymodel(this, items)) { populateitems(item item) { menuitem mi=item.getmodelobject(); link link=new link(link, item.getmodel()) { onclick() { ((menuitem)getmodelobject()).onclick(); } } item.add(link); link.add(new label(label, mi.getlabel()); } } } ulli wicket:id=menua wicket:id=linkspan wicket:id=label/span/a/li/ul -igor On 8/30/07, Kirk Israel [EMAIL PROTECTED] wrote: Igor, I'm sorry I've sounded unappreciative to the work the team is doing. Yes, I'm a dumb curmudgeon who is having a lot of problems adjusting to a new approach to things, and who, despite an honest effort to embrace the wicket outlook, may have stumbled, and also dove right in to the code base we started here with not enough in-depth reading of Pro Wicket and fiddling around with more toy examples and then after that, started to get childishly frustrated when things didn't go the way I expected. On slashdot I'm more inclined to state my biases in an extreme way, in part to get some counterargument -- and there actually ended up being some good counterargument there, some wicket fans who expressed how much they dig the approach. My team has decided on wicket as the extensible, page centric approach to the fairly complex app we have to write, and so far I've done a poor job of thinking about Wicket deeply enough to know the best approaches to things. It's why I came here with a question like what would be the better way of doing this. Having had fragments pointed out to me (I knew more about panels, I think... at least to the extent of using them to wrap other components), and possibly thinking in terms of repeaters even though it's only going to be 2 or 3 things, I'll try to find some time and go back over some tutorials. On 8/29/07, Igor Vaynberg [EMAIL PROTECTED] wrote: I just dont understand how you expect us to continue helping you if you go and talk trash about something we invest a lot of time in. Based on the slashdot comments you left I dont really understand why you are using wicket at all. -igor On 8/29/07, Kirk Israel [EMAIL PROTECTED] wrote: Igor, sorry if I've irritated you. I know some of my frustration comes from A. an ugly reluctance to embrace change and B. Wicket is doing great things but it's somewhat early days, and the documentation (tutorial books and recipe collections) is still scanty. Eelco, thanks, your summary was accurate. I thought about a repeater, it seemed like overkill, and I thought maybe there was a third way. (I still have to look into how the encompassing page would feed the links into the component, maybe not that difficult) So am I correct in thinking that, in general, most HTML pages in WIcket will have all possible subcomponents listed, and the visibility will control things that shouldn't be there... On 8/29/07, Igor Vaynberg [EMAIL PROTECTED] wrote: or just write something in perl and call it a day. -igor On 8/29/07, Eelco Hillenius [EMAIL PROTECTED] wrote: So let me try to rephrase your problem: you have a header component that shows a variable number of components (links). Use a repeater (e.g. list view or repeating view) for the variable number of components, and you probably want to wrap the header component in a panel so that it is easy to move it around, place it on other pages, etc. Think a bit about whether those links should be internal or to bookmarkable pages, and that should do the trick, right? Eelco On 8/29/07, Kirk Israel [EMAIL PROTECTED] wrote: Hey there-- So I came up with a solution to this, but I suspect it's not very Wicket-y, so I'd like some suggestions on best practices: We want a header component that can go on different pages, with 1 2 or 3 links to other pages. (Well, I guess ideally any #, but with my approach it was easier to match it to the maximum shown in the spec). Visually, the end result would be Back to: _LINK1_, _LINK2_ or _LINK3_ As far as i can tell, the links and their labels should be created by the page containing the component. The trouble is, since the HTML and wicket:id for displaying each link is in the HTML for the component, the page has to know what ID to assign its link (and it doesn't seem like you can change the id of a component object after its created, which would have meant the page could just hand a list of un-ID'd labeled links in, and the component could have
Re: best practice for a header component with links defined by the page
+1 here too. Although I am new to Wicket I realized very quickly why it is a great framework. I have developed webapps in Java for 6 years, and this is truly the first framework I've come across where there is no disconnect or learning curve for a Designer to create my screens for me. JSP promissed it, JSF kind-of supported it through Dreamweaver plugins, but Wicket is the win. Craig. On 8/30/07, Justin Morgan (Logic Sector) [EMAIL PROTECTED] wrote: Well... if it means anything, from my perspective, the more I use Wicket, the more I love it. I'm discovering new, and great things every day. :-) Thanks all for all the great work! :-D +1 I feel the same way. There are a lot of us out here on the Internet who really like Wicket, and we really appreciate all that Wicket's developers do for us. I just wanted to say many thanks from all of us. - Justin On Aug 30, 2007, at 6:02 AM, David Leangen wrote: Igor, sorry if I've irritated you. I know some of my frustration comes from ... This certainly isn't the right attitude if you come here for help. Well... if it means anything, from my perspective, the more I use Wicket, the more I love it. I'm discovering new, and great things every day. :-) Thanks all for all the great work! :-D Cheers, Dave - 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: best practice for a header component with links defined by the page
On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: interface menuitem extends serializable { imodel getlabel(); abstract void onclick(); } class basepage extends webpage { protected abstract listmenuitem getitems(); public basepage() { add(new listview(menu, new propertymodel(this, items)) { populateitems(item item) { menuitem mi=item.getmodelobject(); link link=new link(link, item.getmodel()) { onclick() { ((menuitem)getmodelobject()).onclick(); } } item.add(link); link.add(new label(label, mi.getlabel()); } } } Or use bookmarkable links instead of normal links if e.g. you are building a menu bar that needs to be clickable even if the session expires. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best practice for a header component with links defined by the page
right interface menuitem extends serializable { imodel getlabel(); class? extends page getpageclass(); } class basepage extends webpage { protected abstract listmenuitem getitems(); public basepage() { add(new listview(menu, new propertymodel(this, items)) { populateitems(item item) { menuitem mi=item.getmodelobject(); link link=new bookmarkablepagelink(link, mi.getpageclass ()); item.add(link); link.add(new label(label, mi.getlabel()); } } } ulli wicket:id=menua wicket:id=linkspan wicket:id=label/span/a/li/ul On 8/30/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: interface menuitem extends serializable { imodel getlabel(); abstract void onclick(); } class basepage extends webpage { protected abstract listmenuitem getitems(); public basepage() { add(new listview(menu, new propertymodel(this, items)) { populateitems(item item) { menuitem mi=item.getmodelobject(); link link=new link(link, item.getmodel()) { onclick() { ((menuitem)getmodelobject()).onclick(); } } item.add(link); link.add(new label(label, mi.getlabel()); } } } Or use bookmarkable links instead of normal links if e.g. you are building a menu bar that needs to be clickable even if the session expires. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to integrate wicket frame work with spring
On Thursday, August 30, 2007, 1:19:20 PM, Sam [EMAIL PROTECTED] wrote: Have you read: http://www.wicket-wiki.org.uk/wiki/index.php/Spring http://www.wicket-wiki.org.uk/wiki/index.php/Spring? That's http://cwiki.apache.org/WICKET/spring.html now! The www.wicket-wiki.org.uk site has been defunct for a while now and will probably be disappearing shortly as I'm not convinced it's worth renewing the domain, etc. /Gwyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CheckGroup in a DataTable
No, in my test I didn't include the hascode/equals methods. I will give that a try. On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: and whatever that model is it has a proper hashcode/equals implemented? -igor On 8/30/07, Tim Lantry [EMAIL PROTECTED] wrote: Yes, I added an onSubmit method on the form and it has all the checked models in the List. Then it changes pages and the next time I submit or change pages, they are gone. On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: are you sure they are being submitted properly, meaining does that list make it into checkgroup's model when switch pages? -igor On 8/30/07, Tim Lantry [EMAIL PROTECTED] wrote: I am using a Check component inside of a DataTable. The DataTable is surrounded by a CheckGroup. The model on each Check component is the Row Model. This works great to get a list of checked rows. Is there a good way to retain the checks across pages? I created a new Navigator component that uses SubmitLinks instead of the Link component, but he List of models doesn't retain the objects from the previous page. Any suggestions?
Re: hierarchy does not match
Thanks a lot Igor, With the trunk snapshot it is working. Does this mean that a not-matching-hierarchy is not a problem after all? Or should I fix my hierarchy anyway? -Kees On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: hi kees, i believe i just checked in a fix for this into trunk, mind giving it a go? the error means that the hierarchy between html and java is not in sync for example webmarkupcontainer foo=new webmarkupcontainer(); foo.add(new label(bar)); div wicket:id=foo/divdiv wicket:id=bar/div as you can see the hierarchies are not in sync, html should be div wicket:id=foodiv wicket:id=bar/div/div -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hierarchy does not match
your hierarchy was fine the problem was that wicket was inserting a webmarkup container automatically - but was not making it transparent so it was messing up the hierarchy. -igor On 8/30/07, Kees de Kooter [EMAIL PROTECTED] wrote: Thanks a lot Igor, With the trunk snapshot it is working. Does this mean that a not-matching-hierarchy is not a problem after all? Or should I fix my hierarchy anyway? -Kees On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: hi kees, i believe i just checked in a fix for this into trunk, mind giving it a go? the error means that the hierarchy between html and java is not in sync for example webmarkupcontainer foo=new webmarkupcontainer(); foo.add(new label(bar)); div wicket:id=foo/divdiv wicket:id=bar/div as you can see the hierarchies are not in sync, html should be div wicket:id=foodiv wicket:id=bar/div/div -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CheckGroup in a DataTable
and you are sure all links in the navigator are submit links? if so then post a quickstart and we will take a look -igor On 8/30/07, Tim Lantry [EMAIL PROTECTED] wrote: I implemented hascode and equals on the row model object. I still get the same results. I also added the onBeforeRender and onAfterRender to the page to check the contents of the List. From page 1 I checked two boxes. I then hit the next page. before render and after render both and the two Objects in the list. I then hit the previous page link and before render and after render both had an empty list. On 8/30/07, Tim Lantry [EMAIL PROTECTED] wrote: No, in my test I didn't include the hascode/equals methods. I will give that a try. On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: and whatever that model is it has a proper hashcode/equals implemented? -igor On 8/30/07, Tim Lantry [EMAIL PROTECTED] wrote: Yes, I added an onSubmit method on the form and it has all the checked models in the List. Then it changes pages and the next time I submit or change pages, they are gone. On 8/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: are you sure they are being submitted properly, meaining does that list make it into checkgroup's model when switch pages? -igor On 8/30/07, Tim Lantry [EMAIL PROTECTED] wrote: I am using a Check component inside of a DataTable. The DataTable is surrounded by a CheckGroup. The model on each Check component is the Row Model. This works great to get a list of checked rows. Is there a good way to retain the checks across pages? I created a new Navigator component that uses SubmitLinks instead of the Link component, but he List of models doesn't retain the objects from the previous page. Any suggestions?
Re: best practice for a header component with links defined by the page
Ok, thanks... I refactored what i had with this in mind. It was a little more complicated because I want to delegate responsibility for generating the link and caption to the page (some of our links our kind of complex to promote lazy initialization), so the page is still calling into static functions to know what id to give the caption and label. Plus I had to create an additional class to hold that link plus the seperator( to do the comma and or in something like A, B or C) The list is then add(new ListView(linklist, listSepLinks) { private static final long serialVersionUID = 0L; public void populateItem(final ListItem listItem) { CaptionedLinkAndSeperator linkAndSep = (CaptionedLinkAndSeperator)listItem.getModelObject(); listItem.add(linkAndSep.getPageLink()); listItem.add(new Label(sep, linkAndSep.getSeperator())); } }); and the HTML is then span wicket:id=linklist a href=# wicket:id=link class=linkspan wicket:id=caption[LINK CAPTION]/span/aspan wicket:id = sep[,]/span /span So, the complexity isn't too bad despite the inner class and it's less kludgey than what i had earlier. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best practice for a header component with links defined by the page
heh, if you think inner classes are complex you are def using the wrong framework -igor On 8/30/07, Kirk Israel [EMAIL PROTECTED] wrote: Ok, thanks... I refactored what i had with this in mind. It was a little more complicated because I want to delegate responsibility for generating the link and caption to the page (some of our links our kind of complex to promote lazy initialization), so the page is still calling into static functions to know what id to give the caption and label. Plus I had to create an additional class to hold that link plus the seperator( to do the comma and or in something like A, B or C) The list is then add(new ListView(linklist, listSepLinks) { private static final long serialVersionUID = 0L; public void populateItem(final ListItem listItem) { CaptionedLinkAndSeperator linkAndSep = (CaptionedLinkAndSeperator)listItem.getModelObject(); listItem.add(linkAndSep.getPageLink()); listItem.add(new Label(sep, linkAndSep.getSeperator())); } }); and the HTML is then span wicket:id=linklist a href=# wicket:id=link class=linkspan wicket:id=caption[LINK CAPTION]/span/aspan wicket:id = sep[,]/span /span So, the complexity isn't too bad despite the inner class and it's less kludgey than what i had earlier. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best practice for a header component with links defined by the page
http://www.google.com/search?client=safarirls=enq=listview+wicket+site:cwiki.apache.org/wicketie=UTF-8oe=UTF-8 On 8/30/07, Kirk Israel [EMAIL PROTECTED] wrote: Also, not ignoring the fact I needed to have dug in more to the documentation that is there, why doesn't http://wicketstuff.org/wicket13/compref/ mention ListView ? Is there another reference (besides Javadoc) that would discuss more about it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Urgent : how can i design get all input of a single form with TextField, ListMultiplechoice and FileUpload components
Hellobhupat, publicclassMyApplicationextendsWebApplication String rootPath; @Override protectedvoidinit() { //TODOAuto-generated method stub super.init(); // rootPath contains what you want. rootPath = getServletContext().getRealPath("/"); } have I got you? Thursday,August30,2007,7:18:06PM,youwrote: Hi, AnyonepleaseguidemetofituploadexampleinForminputexample, myrequirementisiwantadevelop asingleformwithfollowingcomponents TextField ListMultiplechoice FileUpload iamfacingaproblemingettingfileuploadpathdata. Thanksinadvance Bhupat -- Bestregards, Lobicmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best way to add a MarkupFilter
Ok, thanks! I've been looking for a way to somehow attach a Session to this filter, but can't see one. Essentially, I am trying to grab certain tags (such as p) and add the attribute lang=en (or whatever, according to the current locale). Tried looking at the Page component, too, but didn't see any nice way of doing this. Any suggestions? On Thu, 2007-08-30 at 11:19 +0200, Matej Knopp wrote: Hi, but the default factory doesn't do much, just creates markup parse. You have to create your own markup factory, it's trivial. IMarkupSettings.setMarkupParserFactory(new IMarkupParserFactory() { public MarkupParser newMarkupParser(final MarkupResourceStream resource) { MarkupParser mp = new MarkupParser(new XmlPullParser(), resource); mp.appendMarkupFilter(yourFilter); return mp; } }); -Matej On 8/30/07, David Leangen [EMAIL PROTECTED] wrote: What's the best way to add a markup filter to my app? I noticed that in the settings I can override the MarkupParserFactory and provide my own filter, but that is not what I want to do. I just want to use the default factory, but add my own filter. Thanks! - 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: setEnabled(false) on FocusableTextField breaks persistence
How embarrassing -- I think I'd better keep my day job. I can't believe that I could not grasp that you meant that I should modify rot using rot.setEnabled(true or false) depending on the biz logic. Thanks much, your suggestion worked flawlessly. Here is what I ended up with: protected void populateItem(final ListItem item) { final EmailAddress email = (EmailAddress) item.getModelObject(); final FocusableTextField emailLabel = new FocusableTextField(label, page); final AttributeModifier rot = new AttributeModifier(readonly, true, new Model(readonly)); if (email.getType() == EmailAddress.Type.OTHER) rot.setEnabled(false); emailLabel.add(rot); item.add(emailLabel); item.add(new DropDownChoice(type, emailTypeList) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(final Object newSelection) { if (newSelection == EmailAddress.Type.OTHER) { rot.setEnabled(false); emailLabel.requestFocus(); } else { emailLabel.setModelValue(newSelection.toString()); rot.setEnabled(true); } } }); snip - JA Eelco Hillenius wrote: On 8/30/07, janders [EMAIL PROTECTED] wrote: I don't think I'm doing a good job communicating what I'm trying to do. Or maybe it's me not doing a good job explaining what you should do :) The markup looks like this (note there is no attribute readonly for input field with id=label): select wicket:id=type optionhome/option optionwork/option optionother/option /select input wicket:id=label type=text class=label / What I want to do is dynamically set or remove the attribute readonly on the input field (label) depending on the dropdownchoice selection (type). If the user selects home or work I want the attribute readonly to be set. If the user selects other I want the attribute to be removed so that the user can edit label. The Java code looks like: final AttributeModifier rot = new AttributeModifier(readonly, true, new Model(readonly)); // true if (email.getType() != EmailAddress.Type.OTHER) emailLabel.add(rot); // this works, by adding the readonly attribute item.add(emailLabel); item.add(new DropDownChoice(type, emailTypeList) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(final Object newSelection) { if (newSelection == EmailAddress.Type.OTHER) { emailLabel.remove ??? ; // - I can't figure out how to remove the attribute emailLabel.requestFocus(); } else { emailLabel.setModelValue(newSelection.toString()); emailLabel.add(rot); } } }); if (email.getType() != EmailAddress.Type.OTHER) emailLabel.add(rot); item.add(emailLabel); item.add(new DropDownChoice(type, emailTypeList) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(final Object newSelection) { if (newSelection == EmailAddress.Type.OTHER) { rot.setEnabled(false); emailLabel.requestFocus(); } else { emailLabel.setModelValue(newSelection.toString()); rot.setEnabled(false); } } }); This code always adds the attribute modifier. However, it is disabled when your use case happens. Because I have wantOnSelectionChangedNotifications() set to true, the user can select a choice and the label should change accordingly -- i.e., add attribute readonly or remove it for the selection of other. So the problem that I'm having right now is how do I dynamically remove readonly (once added to the input field) when the user selects other from the dropdownchoice? You don't need to remove it. Just turn it off/ on like the code fragment above shows. And for the finale, in Wicket 1.3 (I gather you are using 1.2), you indeed can simply call remove(IBehavior) - attribute modifiers are behaviors. So then emailLabel.remove(rot) should work fine. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context:
Re: setEnabled(false) on FocusableTextField breaks persistence
How embarrassing -- I think I'd better keep my day job. I can't believe that I could not grasp that you meant that I should modify rot using rot.setEnabled(true or false) depending on the biz logic. Heh, no problem. Good you got it now. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rendering a BoxBorder without the black line border
what exactly is a point of having a border with markup like that if it is basically a noop -igor On 8/30/07, Cristina [EMAIL PROTECTED] wrote: Hi Thies, thanks for your prompt reply. I've created a PlainBorder class which extends Border and provided this empty markup as I'm trying to use CSS-only styling: html head title/title /head body wicket:border wicket:body/ /wicket:border /body /html It's working as expected. Regards, Cristina Thies Edeling wrote: If you look at BoxBorder.html you'll see that the black line is hardcoded. BoxBorder however doesn't contain any functionality, just create your own class extending Border and provide your own style. Cristina wrote: Hello, would it be possible to do that? I've looked at BoxBorder API but I haven't found any method that would set the black line as not visible. [...] -- View this message in context: http://www.nabble.com/Rendering-a-BoxBorder-without-the-black-line-border-tf4357178.html#a12419246 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: Rendering a BoxBorder without the black line border
Hi Igor, I haven't found out a better solution as I don't need any special rendering in this case. On one hand, maybe I could have changed the line color to white, which is the background color right now. Still, since the styling is defined in a CSS file, I don't need to do that... Would you agree with me? On the other hand, if I extend Border in PlainBorder.java I need to provide something in PlainBorder.html... Anyway, if you can figure out a better solution, please let me know. Thank you, Cristina igor.vaynberg wrote: what exactly is a point of having a border with markup like that if it is basically a noop -igor On 8/30/07, Cristina [EMAIL PROTECTED] wrote: Hi Thies, thanks for your prompt reply. I've created a PlainBorder class which extends Border and provided this empty markup as I'm trying to use CSS-only styling: html head title/title /head body wicket:border wicket:body/ /wicket:border /body /html It's working as expected. Regards, Cristina Thies Edeling wrote: If you look at BoxBorder.html you'll see that the black line is hardcoded. BoxBorder however doesn't contain any functionality, just create your own class extending Border and provide your own style. Cristina wrote: Hello, would it be possible to do that? I've looked at BoxBorder API but I haven't found any method that would set the black line as not visible. [...] -- View this message in context: http://www.nabble.com/Rendering-a-BoxBorder-without-the-black-line-border-tf4357178.html#a12419246 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/Rendering-a-BoxBorder-without-the-black-line-border-tf4357178.html#a12420336 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: Rendering a BoxBorder without the black line border
well, judging by your markup i dont see you setting a css class on anything...so it doesnt look like using the border gets you anything -igor On 8/30/07, Cristina [EMAIL PROTECTED] wrote: Hi Igor, I haven't found out a better solution as I don't need any special rendering in this case. On one hand, maybe I could have changed the line color to white, which is the background color right now. Still, since the styling is defined in a CSS file, I don't need to do that... Would you agree with me? On the other hand, if I extend Border in PlainBorder.java I need to provide something in PlainBorder.html... Anyway, if you can figure out a better solution, please let me know. Thank you, Cristina igor.vaynberg wrote: what exactly is a point of having a border with markup like that if it is basically a noop -igor On 8/30/07, Cristina [EMAIL PROTECTED] wrote: Hi Thies, thanks for your prompt reply. I've created a PlainBorder class which extends Border and provided this empty markup as I'm trying to use CSS-only styling: html head title/title /head body wicket:border wicket:body/ /wicket:border /body /html It's working as expected. Regards, Cristina Thies Edeling wrote: If you look at BoxBorder.html you'll see that the black line is hardcoded. BoxBorder however doesn't contain any functionality, just create your own class extending Border and provide your own style. Cristina wrote: Hello, would it be possible to do that? I've looked at BoxBorder API but I haven't found any method that would set the black line as not visible. [...] -- View this message in context: http://www.nabble.com/Rendering-a-BoxBorder-without-the-black-line-border-tf4357178.html#a12419246 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/Rendering-a-BoxBorder-without-the-black-line-border-tf4357178.html#a12420336 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: Rendering a BoxBorder without the black line border
Hi Igor, that's true, but I believe the CSS definition wouldn't be needed here anyway because the Border markup is inserted in a page section that already includes it. Still, you're right... Maybe I've asked the wrong question. Actually, what I need is a navigation menu. So I thought I should follow the Navomatic example, which uses a Border around the Links. Since I don't really need a Border, maybe I should look for another container for the Links, like a Panel. Does this seem more reasonable to you? Thank you, Cristina igor.vaynberg wrote: well, judging by your markup i dont see you setting a css class on anything...so it doesnt look like using the border gets you anything -igor On 8/30/07, Cristina [EMAIL PROTECTED] wrote: Hi Igor, I haven't found out a better solution as I don't need any special rendering in this case. On one hand, maybe I could have changed the line color to white, which is the background color right now. Still, since the styling is defined in a CSS file, I don't need to do that... Would you agree with me? On the other hand, if I extend Border in PlainBorder.java I need to provide something in PlainBorder.html... Anyway, if you can figure out a better solution, please let me know. Thank you, Cristina igor.vaynberg wrote: what exactly is a point of having a border with markup like that if it is basically a noop -igor On 8/30/07, Cristina [EMAIL PROTECTED] wrote: Hi Thies, thanks for your prompt reply. I've created a PlainBorder class which extends Border and provided this empty markup as I'm trying to use CSS-only styling: html head title/title /head body wicket:border wicket:body/ /wicket:border /body /html It's working as expected. Regards, Cristina Thies Edeling wrote: If you look at BoxBorder.html you'll see that the black line is hardcoded. BoxBorder however doesn't contain any functionality, just create your own class extending Border and provide your own style. Cristina wrote: Hello, would it be possible to do that? I've looked at BoxBorder API but I haven't found any method that would set the black line as not visible. [...] -- View this message in context: http://www.nabble.com/Rendering-a-BoxBorder-without-the-black-line-border-tf4357178.html#a12420336 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/Rendering-a-BoxBorder-without-the-black-line-border-tf4357178.html#a12420978 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: Rendering a BoxBorder without the black line border
that's true, but I believe the CSS definition wouldn't be needed here anyway because the Border markup is inserted in a page section that already includes it. Still, you're right... Maybe I've asked the wrong question. Actually, what I need is a navigation menu. So I thought I should follow the Navomatic example, which uses a Border around the Links. Since I don't really need a Border, maybe I should look for another container for the Links, like a Panel. Does this seem more reasonable to you? I can't guess for you Christina, but were you maybe just trying out how borders work so that you can actually do something useful with it in a later stage? I think Igor is mainly wondering why you want to have a border that doesn't seem to do anything (yet). Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]