Show html help page from dropdown
Hi, I would like to show an external html page with help information depending on a choice of an DropDownChoice. With ExternalLinks I managed to do this, but I'm missing an example like opening a modal window. Regards, Peter PETER DIEFENTHÄLER Technology Architect CSC Barthstr. 4, 80339 München, Germany Payments Solutions | p: +49.89.5908.6441 | f: +49.89.5908.6499 | m: +49 172 8865632 | pdief...@csc.com | www.csc.com/de CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Deutschland Solutions GmbH • Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany • Board of Directors: Claus Schünemann • Chairman of the Supervisory Board: William L. Deckelman, Jr. • Registered in Germany: HRB 22374
Wicket 6 trees
Hallo, I would like to use the new wicket tree model to build a tree with different node and leaf objects. If I use an ITreeProvider I can only use one type for nodes and leaves. Is there a best practice to build a tree constisting of nodes (i.e. bag, sack) and leaves (i.e. apple, pear). Thanks, Peter
Error with tree component with 1.5.2
Hallo, I tried to upgrade my wicket projects to the new wicket 1.5.2 release and now my tree component crashes. Any Idea? Thanks, Peter ERROR [http-bio-8037-exec-9]: Connection lost, give up responding. at org.apache.wicket.DefaultExceptionMapper.internalMap(DefaultExceptionMapper.java:105) org.apache.wicket.protocol.http.servlet.ResponseIOException: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error at org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:254) at org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:92) at org.apache.wicket.request.resource.AbstractResource.setResponseHeaders(AbstractResource.java:611) at org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:485) at org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:77) at org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:105) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:333) at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:299) at org.apache.catalina.connector.Response.flushBuffer(Response.java:560) at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:303) at org.apache.wicket.protocol.http.servlet.ServletWebResponse.flush(ServletWebResponse.java:250) ... 28 more Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(Unknown Source) at java.net.SocketOutputStream.write(Unknown Source) at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:216) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:437) at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:119) at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:758) at org.apache.coyote.Response.action(Response.java:170) at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:328) ... 32 more - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Customize AjaxEditableLabel
Hallo, is it possible to customize AjaxEditableLabel in a way that I can replace the TextEditField with a panel? I have to display a little Form with a text area component and some buttons. A modal window doesn't work for me because I want to show the panel exactly at the position of the label. Thanks, Peter
OrderByBorder Markup
Hi, I'm using the OrderByBorder feature and it works well for rows without stylesheet classes. Unfortunately it fails if the already has a stylesheet class: Wicket replaces the class="MandateEntityTypeField"with the class="wicket_orderUp" and my field width properties will be lost. It would be better, if Wicket would add his style class instead of replacing it ( class="MandateEntityTypeField,wicket_orderUp") Is this an error or is it my fault? Thanks, Peter
Resource Link Problem
Hi all, I'm using a Resource Link with a WebResource to show a PDF Document in the browser. This works fine for Websphere 6.1.0.2 on Windows 2003 Server but fails on WebSphere 6.1.0.2 on Solaris: [03.12.10 08:59:32:930 CET] 0024 SystemOut O 2010-12-03 08:59:32,929 returning fileResource ... at com.csc.pts.mmg.web.panels.mandate.MandateLinksPanel$1.getResourceStream(MandateLinksPanel.java:95) [03.12.10 08:59:32:935 CET] 0024 SystemOut O 2010-12-03 08:59:32,931 String index out of range: -1 at org.apache.wicket.RequestCycle.logRuntimeException(RequestCycle.java:1529) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1768) at java.lang.String.substring(String.java:1735) at com.ibm.ws.webcontainer.webapp.WebApp.getMimeType(WebApp.java:2109) at com.ibm.ws.webcontainer.facade.ServletContextFacade.getMimeType(ServletContextFacade.java:84) at org.apache.wicket.Response.detectContentType(Response.java:358) at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.configure(ResourceStreamRequestTarget.java:236) at org.apache.wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:150) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1267) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1334) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510) The code in Wicket: WebResource pdfSignatureDocument = new WebResource() { private static final long serialVersionUID = 1L; @Override protected void setHeaders(WebResponse response) { super.setHeaders(response); response.setAttachmentHeader( "signature.pdf"); } @Override public IResourceStream getResourceStream() { log.debug("Printing mandate PDF for mandate" + selectedMandate .getReference()); ArrayList list = new ArrayList(); list.add(selectedMandate); MmgReportManager rm = new MmgReportManager(); File pdfMandate = null; try { pdfMandate = rm.exportReportAsFile(ReportTypes.SELECTED_MANDATE, list, SupportedFileTypes.PDF); } catch (PtsException e) { log.error(e);
Bug in StyleDateConverter?
Hello, I'm using DateTextFields with new StyleDateConverter("M-", true). If I enter a new date 29.03.10, the result is 29.03.0010 instead of 29.03.2010!!! If I use the Styleformat "S-", I get the correct date. Unfortunately I need the date fields initially formatted as dd.mm. when they are initialized ... Peter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Ajax refresh problem with WebMarkupContainer and CSS class in DeploymentMode
Hi Wicket Folks, I have a little problem using a WebMarkupContainer with Ajax refresh in Deployment Mode. The page shows a table like the sorting data view example in the Wicket Examples. The table resides in a div section with a y-Scrollbar and a ButtonPagingNavigator. My IE7 doesn't show the view in Deployment Mode, while in Development Mode the page works fine. If I delete the class attribute in the DIV tag, the page works fine in both modes. Adding the CSS class in HTML or as a AttributeModifier in the java code makes no difference. Also using a style attribute or using inside the DIV tag doesn't help. Markup: [cnfBTest] [Yes] Java code: private final WebMarkupContainer configView = new WebMarkupContainer( "configView"); ... configView.setOutputMarkupId(true); add(configView); configView.add(dataView); Deployment mode: (Embedded image moved to file: pic08363.gif) Development mode: (Embedded image moved to file: pic04651.gif) Thanks in advance, Peter Diefenthäler - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Example for Combobox wanted
Hi, I'm looking for an example of a ComboBox which is a combination of a textfield and DropDownChoice. It should be possible to type in a new value and submit it, or to select from the values in the DropDownChoice and submit it. The AJAX autocomplete example seems to be good, but you have to type in one character to get a choice ... Thanks, Peter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to simulate browser back button?
Hallo Wicket users. is there an easy way to simulate the browsers back button with an own button in a form? Thank in advance Peter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
container based authentication
Hello, I try to secure my wicket appication with container based authentication. The problem is, that all users can log also if they don't have the right role. In my login.html I use following form action: If I change the security-constraint - url-pattern from "/login" to "/*", the security check works, but I don't get any page displayed (images/leer.gif not found). Also the login page doesn't render complete because all images are blocked. It would be nice if their is an example for the correct use of the container based authentication. The often statet example in http://cwiki.apache.org/WICKET/servlet-container-authentication.html doesn't work! The configuration for Apache Tomcat 6.xx: <>tomcat-users> The deployment descriptor: http://java.sun.com/dtd/web-app_2_3.dtd";> MyWeb wicket.wicket org.apache.wicket.protocol.http.WicketServlet applicationClassName com.csc.pts.aar.web.application.AarWebApplication. 1 wicket.wicket /* MyWeb /login GET POST MyWeb FORM /login /loginerror The role that is required to log in to the Manager Application MyWeb The login.html: Username: Password: - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Ajax Tree Table
Hi every one, I tried the tree table example and get stuck with two problems. How can I avoid links in the tree leavlets? How can I update the tree on a new model. I've generated the tree information on a database query with a search field. When I press the search button, I expected the tree to be updated with the new model, but it doesn't work. suchform.add(new AjaxButton("search") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form form) { suchliste = new SucheDao().search(suchfeld); log.debug("#Treffer: " + suchliste.size());; tm = createTreeModel(suchliste); tree.updateTree(); target.addComponent(tree); } }); tm = createTreeModel(suchliste); tree = new Tree("tree", tm); tree.setRootLess(true); tree.getTreeState().collapseAll();); add(tree.setOutputMarkupId(true));); Wicket Version 1.3.6 Thanx. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Tree Table - Update Model
Hi every one, I tried the tree table example and get stuck with two problems. How can I avoid links in the tree leavlets? How can I update the tree on a new model. I've generated the tree information on a database query with a search field. When I press the search button, I expected the tree to be updated with the new model, but it doesn't work. suchform.add(new AjaxButton("search") { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form form) { suchliste = new SucheDao().search(suchfeld); log.debug("#Treffer: " + suchliste.size());; tm = createTreeModel(suchliste); tree.updateTree(); target.addComponent(tree); } }); tm = createTreeModel(suchliste); tree = new Tree("tree", tm); tree.setRootLess(true); tree.getTreeState().collapseAll();); add(tree.setOutputMarkupId(true));); Wicket Version 1.3.6 Thanx. PETER DIEFENTHÄLER CSC Sandstr. 7, 80335 München, Germany CIS Payments & Integration | office: +49 89 5908 6441 | mobile: +49 172 886 5632 | fax: +49 89 5908 6499 | pdief...@csc.com | www.csc.com CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Deutschland Solutions GmbH • Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany • Board of Directors: Gerhard Fercho (Chairman), Thomas Nebe, Peter Schmidt • Chairman of the Supervisory Board: Guy Hains • Registered in Germany: HRB 22374
Localize AjaxSubmitLink
Hi, is it possible to localize a AjaxSubmitLink? I would like to replace "Speichern" with a localized value from a properties file ... HTML: Java:; form.add(new AjaxSubmitLink("save") { ... }); Thanx, Peter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Update DropDownChoice
Hallo, I'm trying to update a DropDownChoice from a Ajax Callback. The new value is correctly added to the choice of selectable values, but I can't set the new added value as the selected value, only new choice is shown ... Any ideas are welcome. Thanks, Peter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DropDownChoice and AJAX
Hallo, I have a little problem with updating a DropDownChoice in a separate panel with information coming from a modal window. The new value is not updated in the DropDownChoice, only "new choice" is displayed when I come back from the modal window. Can you help me on this issue? Thanks, Peter P.S.: Here is the code of of a short example, in real life I would like to use objects from a database ... >>>TestAppl.java public class TestAppl extends WebApplication { @Override public Class getHomePage() { return Test.class; } } >>>Test.html http://www.w3.org/TR/html4/loose.dtd";> Wicket Test > > Test.java public class Test extends WebPage {>> public Test() { add(new Label("textLabel1","WicketTest - DropDownChoice")); Form testForm = new Form("testForm"); add(testForm); testForm.add(new NamePanel("namePanel")); add(new FeedbackPanel("feedback")); } } NamePanel.html Peter new NamePanel.java public class NamePanel extends Panel { private static final long serialVersionUID = 1L; private static final Log log = LogFactory.getLog(NamePanel.class); private ArrayList names = new ArrayList(Arrays.asList ("Peter","Stephan")); private String selName = "Peter"; public NamePanel(String id) { super(id); final DropDownChoice ddc = new DropDownChoice("nameSelect", new Model(selName), names);); ddc.setOutputMarkupId(true); add(ddc); final ModalWindow modalInput; add(modalInput = new ModalWindow("modalNameInput")); modalInput.setContent(new ModalNameInputPanel (modalInput.getContentId(),modalInput,NamePanel.this)); modalInput.setTitle("Neuer Name ..."); modalInput.setInitialWidth(200);... modalInput.setInitialHeight(100);); modalInput.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { private static final long serialVersionUID = 1L; public boolean onCloseButtonClicked(AjaxRequestTarget target) { log.debug("CloseButton: " + selName); return true; } }); modalInput.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { private static final long serialVersionUID = 1L; public void onClose(AjaxRequestTarget target) { target.addComponent(ddc); log.debug("CloseCallback: " + selName); } }); add(new AjaxLink("new") { private static final long serialVersionUID = 1L; public void onClick(AjaxRequestTarget target) { modalInput.show(target); } }); } public void setSelName(String selName) { this.selName = selName; } } ModalNameInputPanel.html Name: . . ModalNameInputPanel.java public class ModalNameInputPanel extends Panel { private static final long serialVersionUID = 1L; private static final Log log = LogFactory.getLog (ModalNameInputPanel.class); private ModalWindow window; private NamePanel namePanel; private String nameIn = "Knut"; public ModalNameInputPanel(String id, final ModalWindow win, NamePanel np) { super(id); this.window = win; this.namePanel = np; PropertyModel nameModel = new PropertyModel(this, "nameIn"); Form nameForm = new Form("nameForm"); add(nameForm); nameForm.add(new TextField("nameIn",nameModel));, nameForm.add(new NameSubmitLink("ok",true)); nameForm.add(new NameSubmitLink("cancel",false)); } private class NameSubmitLink extends AjaxSubmitLink { private static final long serialVersionUID = 1L; private boolean save = false; public NameSubmitLink(String id,boolean save) {; super(id); this.save = save; if (!save) setDefaultFormProcessing(false); } @Override protected void onSubmit(AjaxRequestTarget target, Form form) { if (save) { log.debug("New Name: " + nameIn); namePanel.setSelName(nameIn); } window.close(target); } }} }}} - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...