Re: Problem with RadioGroup / Radio / TextField
On Tue, Dec 21, 2010 at 1:44 AM, Ioannis Canellos ioca...@gmail.com wrote: Sorry but I received delivery failure both times I sent the email. No worries. It may have been a notification that your message needed to be moderated through. When I moderated your message, I also made it so that all messages from your address are automatically allowed through now. -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DropDownChoice, AjaxFormComponentUpdatingBehavior and dijit.form.FilteringSelect
On Mon, Dec 20, 2010 at 11:47 PM, Jeremy Thomerson jer...@wickettraining.com wrote: On Mon, Dec 20, 2010 at 4:41 PM, hok ivanvasi...@gmail.com wrote: Jeremy, thanks for the fast response. However my problem is not the same as described in the other topic. I'm using DropDownChoice, so I cannot use AjaxFormChoiceComponentUpdatingBehavior (it throws an exception that it's supposed to be used with RadioChoice/CheckboxChoice/RadioGroup/CheckGroup). When I use the regular AjaxFormComponentUpdatingBehavior without dojo FilteringSelect the behavior works normal and the value is transferred. The problem occurs when I use FilteringSelect. Sorry, both Martin and I had our quick trigger fingers ready with the (almost auto-) reply. :) Although I am not familiar with dojo, from your description of the problem I would suspect that Dojo is modifying the this.value of the select box. Looking at the description that you linked to, this seems correct. It mentions immediately that it works with an input box and a hidden text value. I suspect that there is a hidden field that contains the value of your select box. The description of the filtering select using a native select box confirms this: the OPTION's child text node is used as the displayed value and the OPTION's value attribute is used as *the hidden submit value*. You'll need to write some custom JS (probably as an IAjaxCallDecorator) that sets the value of the select input to the value of the hidden field before Wicket does its thing, or else that does custom submission altogether. -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Here is a custom behavior that I wrote once for Dojo's form components (dijit.form.**): http://pastie.org/1394480 The usage is: dropDownChoice.add(new DojoFormComponentUpdatingBehavior(dijit.form.FilteringSelect, true)); The idea is that dijit.form.** components must have onChange attribute and the new value comes in arguments[0]
Re: Problem with RadioGroup / Radio / TextField
Thanks On Tue, Dec 21, 2010 at 9:59 AM, Jeremy Thomerson jer...@wickettraining.com wrote: On Tue, Dec 21, 2010 at 1:44 AM, Ioannis Canellos ioca...@gmail.com wrote: Sorry but I received delivery failure both times I sent the email. No worries. It may have been a notification that your message needed to be moderated through. When I moderated your message, I also made it so that all messages from your address are automatically allowed through now. -- Jeremy Thomerson http://wickettraining.com Need a CMS for Wicket? Use Brix! http://brixcms.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- *Ioannis Canellos* http://iocanel.blogspot.com Integration Engineer @ Upstream S.A. http://www.upstreamsystems.com
Visibility setting with Ajax
Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; @Override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true) is executed, but the panel is still not visible. What else i have to do? thanks! __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Visibility setting with Ajax
Hi, What it looks to me that the panel of which visibility has been set is not added to the target. So, IMHO *target.add(uploadPanel2)* should do. Regards On Tue, Dec 21, 2010 at 6:09 PM, Duro develma...@yahoo.com wrote: Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; @Override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true) is executed, but the panel is still not visible. What else i have to do? thanks! __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Visibility setting with Ajax
Make sure of set the OutputMarkupPlaceholderTag to true in uploadPanels also On Tue, Dec 21, 2010 at 10:46 AM, Tejash Tarun ttej...@educator.eu wrote: Hi, What it looks to me that the panel of which visibility has been set is not added to the target. So, IMHO *target.add(uploadPanel2)* should do. Regards On Tue, Dec 21, 2010 at 6:09 PM, Duro develma...@yahoo.com wrote: Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; @Override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true) is executed, but the panel is still not visible. What else i have to do? thanks! __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
Visibility setting with Ajax
Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; @Override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true) is executed, but the panel is still not visible. What else i have to do? thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Visibility setting with Ajax
solved, thanks a lot Make sure of set the OutputMarkupPlaceholderTag to true in uploadPanels also On Tue, Dec 21, 2010 at 10:46 AM, Tejash Tarunttej...@educator.eu wrote: Hi, What it looks to me that the panel of which visibility has been set is not added to the target. So, IMHO *target.add(uploadPanel2)* should do. Regards On Tue, Dec 21, 2010 at 6:09 PM, Durodevelma...@yahoo.com wrote: Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; @Override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true) is executed, but the panel is still not visible. What else i have to do? thanks! __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Visibility setting with Ajax
1-Put uploadPanel2.setOutputMarkupId(true); uploadPanel2.setOutputMarkupPlaceholderTag(true); uploadPanel2.setVisible(false); when you create the panel. 2- on public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); target.addComponent(uploadPanel2); } Ernesto On Tue, Dec 21, 2010 at 1:38 PM, Juraj Petko juraj.pe...@gmail.com wrote: Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; �...@override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true) is executed, but the panel is still not visible. What else i have to do? thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Visibility setting with Ajax
thanks, setOutputMarkupId(true) is probably not necessary., but adding the component to target and setOutputMarkupPlaceholderTag(true) is. Now i tried to mak eit work even better and removed the panels from the site. i want to add them just on time, when the user request it. so site looks now like this: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=panel/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and i try to create the panel dynamically: public void onClick(AjaxRequestTarget target) { panel.setOutputMarkupPlaceholderTag(true); target.addComponent(panel); panel.add(new UploadFilePanel(filePanel)); the markup of UploadFilePanel: wicket:panel table style=padding-bottom:5px tr td width=180pxTyp/td tdselect wicket:id=type //td tdTitel/td tdinput type=text wicket:id=title //td /tr tr tdJahr/td tdinput type=text wicket:id=year //td tdAusgabe Nummer/td tdinput type=text wicket:id=issueNumber //td /tr tr tdDatei/td tdinput wicket:id=fileUploadField type=file //td td colspan=2 valign=bottomIch bin Inhaber des Mediensinput type=checkbox wicket:id=ownerCheckbox//td /tr /table /wicket:panel this all end in the error: WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = panelX]] 2. [MarkupContainer [Component id = type]] 3. [MarkupContainer [Component id = title]] 4. [MarkupContainer [Component id = year]] 5. [MarkupContainer [Component id = issueNumber]] 6. [MarkupContainer [Component id = fileUploadField]] 7. [MarkupContainer [Component id = ownerCheckbox]] i understand that i didnt declare the things in the markup, but thats what i want (create them not at the start, but never or later, when the user clicks on the link). So what is needed to create the UploadFilePanel dynamically? thanks for help 1-Put uploadPanel2.setOutputMarkupId(true); uploadPanel2.setOutputMarkupPlaceholderTag(true); uploadPanel2.setVisible(false); when you create the panel. 2- on public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); target.addComponent(uploadPanel2); } Ernesto On Tue, Dec 21, 2010 at 1:38 PM, Juraj Petkojuraj.pe...@gmail.com wrote: Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; @Override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true) is executed, but the panel is still not visible. What else i have to do? thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Visibility setting with Ajax
I think you are correct, calling setOutputMarkupId(true) is not necessary when calling setOutputMarkupPlaceholderTag(true). If I remember correctly from looking at the code for setOutputMarkupPlaceholderTag(), this will call setOutputMarkupId(true) for you. From: Duro develma...@yahoo.com To: users@wicket.apache.org Date: 12/21/2010 08:24 AM Subject:Re: Visibility setting with Ajax thanks, setOutputMarkupId(true) is probably not necessary., but adding the component to target and setOutputMarkupPlaceholderTag(true) is. Now i tried to mak eit work even better and removed the panels from the site. i want to add them just on time, when the user request it. so site looks now like this: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=panel/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and i try to create the panel dynamically: public void onClick(AjaxRequestTarget target) { panel.setOutputMarkupPlaceholderTag(true); target.addComponent(panel); panel.add(new UploadFilePanel(filePanel)); the markup of UploadFilePanel: wicket:panel table style=padding-bottom:5px tr td width=180pxTyp/td tdselect wicket:id=type //td tdTitel/td tdinput type=text wicket:id=title //td /tr tr tdJahr/td tdinput type=text wicket:id=year //td tdAusgabe Nummer/td tdinput type=text wicket:id=issueNumber //td /tr tr tdDatei/td tdinput wicket:id=fileUploadField type=file //td td colspan=2 valign=bottomIch bin Inhaber des Mediensinput type=checkbox wicket:id=ownerCheckbox//td /tr /table /wicket:panel this all end in the error: WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = panelX]] 2. [MarkupContainer [Component id = type]] 3. [MarkupContainer [Component id = title]] 4. [MarkupContainer [Component id = year]] 5. [MarkupContainer [Component id = issueNumber]] 6. [MarkupContainer [Component id = fileUploadField]] 7. [MarkupContainer [Component id = ownerCheckbox]] i understand that i didnt declare the things in the markup, but thats what i want (create them not at the start, but never or later, when the user clicks on the link). So what is needed to create the UploadFilePanel dynamically? thanks for help 1-Put uploadPanel2.setOutputMarkupId(true); uploadPanel2.setOutputMarkupPlaceholderTag(true); uploadPanel2.setVisible(false); when you create the panel. 2- on public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); target.addComponent(uploadPanel2); } Ernesto On Tue, Dec 21, 2010 at 1:38 PM, Juraj Petkojuraj.pe...@gmail.com wrote: Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; @Override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true) is executed, but the panel is still not visible. What else i have to do? thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Notice: This communication, including any attachments, is intended solely
Re: Visibility setting with Ajax
panel.setOutputMarkupPlaceholderTag(true); should be done on panel creation: this is needed to tell wicket that even when the component is not visible it should render an empty div with a is set, so that it can be later used to plugin the panel contents via AJAX when you do setVisible(true). So, putting that on the onClick will not help you (I guess:-). Ernesto On Tue, Dec 21, 2010 at 2:23 PM, Duro develma...@yahoo.com wrote: thanks, setOutputMarkupId(true) is probably not necessary., but adding the component to target and setOutputMarkupPlaceholderTag(true) is. Now i tried to mak eit work even better and removed the panels from the site. i want to add them just on time, when the user request it. so site looks now like this: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=panel/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and i try to create the panel dynamically: public void onClick(AjaxRequestTarget target) { panel.setOutputMarkupPlaceholderTag(true); target.addComponent(panel); panel.add(new UploadFilePanel(filePanel)); the markup of UploadFilePanel: wicket:panel table style=padding-bottom:5px tr td width=180pxTyp/td tdselect wicket:id=type //td tdTitel/td tdinput type=text wicket:id=title //td /tr tr tdJahr/td tdinput type=text wicket:id=year //td tdAusgabe Nummer/td tdinput type=text wicket:id=issueNumber //td /tr tr tdDatei/td tdinput wicket:id=fileUploadField type=file //td td colspan=2 valign=bottomIch bin Inhaber des Mediensinput type=checkbox wicket:id=ownerCheckbox//td /tr /table /wicket:panel this all end in the error: WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = panelX]] 2. [MarkupContainer [Component id = type]] 3. [MarkupContainer [Component id = title]] 4. [MarkupContainer [Component id = year]] 5. [MarkupContainer [Component id = issueNumber]] 6. [MarkupContainer [Component id = fileUploadField]] 7. [MarkupContainer [Component id = ownerCheckbox]] i understand that i didnt declare the things in the markup, but thats what i want (create them not at the start, but never or later, when the user clicks on the link). So what is needed to create the UploadFilePanel dynamically? thanks for help 1-Put uploadPanel2.setOutputMarkupId(true); uploadPanel2.setOutputMarkupPlaceholderTag(true); uploadPanel2.setVisible(false); when you create the panel. 2- on public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); target.addComponent(uploadPanel2); } Ernesto On Tue, Dec 21, 2010 at 1:38 PM, Juraj Petkojuraj.pe...@gmail.com wrote: Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; �...@override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true) is executed, but the panel is still not visible. What else i have to do? thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Visibility setting with Ajax
div with a is set == div with the ID attribute set On Tue, Dec 21, 2010 at 2:36 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: panel.setOutputMarkupPlaceholderTag(true); should be done on panel creation: this is needed to tell wicket that even when the component is not visible it should render an empty div with a is set, so that it can be later used to plugin the panel contents via AJAX when you do setVisible(true). So, putting that on the onClick will not help you (I guess:-). Ernesto On Tue, Dec 21, 2010 at 2:23 PM, Duro develma...@yahoo.com wrote: thanks, setOutputMarkupId(true) is probably not necessary., but adding the component to target and setOutputMarkupPlaceholderTag(true) is. Now i tried to mak eit work even better and removed the panels from the site. i want to add them just on time, when the user request it. so site looks now like this: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=panel/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and i try to create the panel dynamically: public void onClick(AjaxRequestTarget target) { panel.setOutputMarkupPlaceholderTag(true); target.addComponent(panel); panel.add(new UploadFilePanel(filePanel)); the markup of UploadFilePanel: wicket:panel table style=padding-bottom:5px tr td width=180pxTyp/td tdselect wicket:id=type //td tdTitel/td tdinput type=text wicket:id=title //td /tr tr tdJahr/td tdinput type=text wicket:id=year //td tdAusgabe Nummer/td tdinput type=text wicket:id=issueNumber //td /tr tr tdDatei/td tdinput wicket:id=fileUploadField type=file //td td colspan=2 valign=bottomIch bin Inhaber des Mediensinput type=checkbox wicket:id=ownerCheckbox//td /tr /table /wicket:panel this all end in the error: WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = panelX]] 2. [MarkupContainer [Component id = type]] 3. [MarkupContainer [Component id = title]] 4. [MarkupContainer [Component id = year]] 5. [MarkupContainer [Component id = issueNumber]] 6. [MarkupContainer [Component id = fileUploadField]] 7. [MarkupContainer [Component id = ownerCheckbox]] i understand that i didnt declare the things in the markup, but thats what i want (create them not at the start, but never or later, when the user clicks on the link). So what is needed to create the UploadFilePanel dynamically? thanks for help 1-Put uploadPanel2.setOutputMarkupId(true); uploadPanel2.setOutputMarkupPlaceholderTag(true); uploadPanel2.setVisible(false); when you create the panel. 2- on public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); target.addComponent(uploadPanel2); } Ernesto On Tue, Dec 21, 2010 at 1:38 PM, Juraj Petkojuraj.pe...@gmail.com wrote: Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; �...@override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true) is executed, but the panel is still not visible. What else i have to do? thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com -
Re: Visibility setting with Ajax
Yep. public final Component setOutputMarkupPlaceholderTag(final boolean outputTag) { if (outputTag != getFlag(FLAG_PLACEHOLDER)) { if (outputTag) { setOutputMarkupId(true); setFlag(FLAG_PLACEHOLDER, true); } else { setFlag(FLAG_PLACEHOLDER, false); // I think it's better to not setOutputMarkupId to false... // user can do it if we want } } return this; } But typing an extra line of code will not necessarily kill you;-) Ernesto On Tue, Dec 21, 2010 at 2:32 PM, mzem...@osc.state.ny.us wrote: I think you are correct, calling setOutputMarkupId(true) is not necessary when calling setOutputMarkupPlaceholderTag(true). If I remember correctly from looking at the code for setOutputMarkupPlaceholderTag(), this will call setOutputMarkupId(true) for you. From: Duro develma...@yahoo.com To: users@wicket.apache.org Date: 12/21/2010 08:24 AM Subject: Re: Visibility setting with Ajax thanks, setOutputMarkupId(true) is probably not necessary., but adding the component to target and setOutputMarkupPlaceholderTag(true) is. Now i tried to mak eit work even better and removed the panels from the site. i want to add them just on time, when the user request it. so site looks now like this: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=panel/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and i try to create the panel dynamically: public void onClick(AjaxRequestTarget target) { panel.setOutputMarkupPlaceholderTag(true); target.addComponent(panel); panel.add(new UploadFilePanel(filePanel)); the markup of UploadFilePanel: wicket:panel table style=padding-bottom:5px tr td width=180pxTyp/td tdselect wicket:id=type //td tdTitel/td tdinput type=text wicket:id=title //td /tr tr tdJahr/td tdinput type=text wicket:id=year //td tdAusgabe Nummer/td tdinput type=text wicket:id=issueNumber //td /tr tr tdDatei/td tdinput wicket:id=fileUploadField type=file //td td colspan=2 valign=bottomIch bin Inhaber des Mediensinput type=checkbox wicket:id=ownerCheckbox//td /tr /table /wicket:panel this all end in the error: WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = panelX]] 2. [MarkupContainer [Component id = type]] 3. [MarkupContainer [Component id = title]] 4. [MarkupContainer [Component id = year]] 5. [MarkupContainer [Component id = issueNumber]] 6. [MarkupContainer [Component id = fileUploadField]] 7. [MarkupContainer [Component id = ownerCheckbox]] i understand that i didnt declare the things in the markup, but thats what i want (create them not at the start, but never or later, when the user clicks on the link). So what is needed to create the UploadFilePanel dynamically? thanks for help 1-Put uploadPanel2.setOutputMarkupId(true); uploadPanel2.setOutputMarkupPlaceholderTag(true); uploadPanel2.setVisible(false); when you create the panel. 2- on public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); target.addComponent(uploadPanel2); } Ernesto On Tue, Dec 21, 2010 at 1:38 PM, Juraj Petkojuraj.pe...@gmail.com wrote: Hi, i have 3 panels on my page: wicket:extend div align=center style=background-color:red;padding:20px h2Epubs upload/h2 form wicket:id=form div style=background-color:#304050 span wicket:id=uploadPanel1/ span wicket:id=uploadPanel2/ span wicket:id=uploadPanel3/ a href=# wicket:id=addLinkAdd next file/a br/ input wicket:id=submitButton type=submit value=Datei(en) laden/ /div div wicket:id=feedback class=error style=background-color:yellow/ /form /div /wicket:extend and only after clicking addLink, the user should see the uploadPanel2. So i coded this: add(new AjaxFallbackLink(addLink) { private static final long serialVersionUID = -4427831923318024979L; @Override public void onClick(AjaxRequestTarget target) { uploadPanel2.setVisible(true); } }); When i debug, the method onClick() is really entered and uploadPanel2.setVisible(true)
Set Current DropDownChoice Item (Selected)
How do I set the DropDownChoice to a particular choice (item) of the list? My DropDownChoice has items X,Y,Z. I would like to set the currently selected item to Y. I have the method setChoices(..) which lets me initialize the list, but is there a method to select an item by index? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Set-Current-DropDownChoice-Item-Selected-tp3154886p3154886.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Set Current DropDownChoice Item (Selected)
Hello. Use setModel() in this case. Best regards, Alexander. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Set Current DropDownChoice Item (Selected)
HI, suppose that your choices list is called choicesList and your DropDownChoice is called options you should write something like: options.setModelObject(choicesList.get(i)); How do I set the DropDownChoice to a particular choice (item) of the list? My DropDownChoice has items X,Y,Z. I would like to set the currently selected item to Y. I have the method setChoices(..) which lets me initialize the list, but is there a method to select an item by index? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Nested Forms and Multipart Fileupload Issue
Hi, WICKET-2779 seems to be related to modal windows with upload and ajax but jcorbins original post was about a nested form in a modal window within a multipart form. Are both issues fixed or does the problem from jcorbins first post persist? thanks Christian -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3159359.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Set Current DropDownChoice Item (Selected)
Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Set-Current-DropDownChoice-Item-Selected-tp3154886p3159534.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
target.addComponent(Field) in Ajax erases that Field's values
I have a piece of Ajax code, attached to some field (let's call it sourceField), which looks like this: sourceField.add(new AjaxFormChoiceComponentUpdatingBehavior() { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(Field2); } } As you can see, Field2 is not changed in any way, it is not cleared or modified (so this code shouldn't really do anything). However, when this Ajax runs on changing the sourceField, the Field2's values get erased! Field2 is actually a CheckBoxMultipleChoice, and all the checkbox selections get erased as soon as I do target.addComponent(). Why does this happen? Any ideas on what's causing this? (Field2 is a CheckBoxMultipleChoice, initially initialized with some list, and its outputMarkerId = true, to make it work with Ajax.) Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-addComponent-Field-in-Ajax-erases-that-Field-s-values-tp3159543p3159543.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: target.addComponent(Field) in Ajax erases that Field's values
im going to guess that the field is repainted with the values the serverside thinks should be selected. if the values from the clientside are not processed by the serverside before the ajax update they will be different, and so the serverside state overrides the clientside state. -igor On Tue, Dec 21, 2010 at 9:50 PM, eugenebalt eugeneb...@yahoo.com wrote: I have a piece of Ajax code, attached to some field (let's call it sourceField), which looks like this: sourceField.add(new AjaxFormChoiceComponentUpdatingBehavior() { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(Field2); } } As you can see, Field2 is not changed in any way, it is not cleared or modified (so this code shouldn't really do anything). However, when this Ajax runs on changing the sourceField, the Field2's values get erased! Field2 is actually a CheckBoxMultipleChoice, and all the checkbox selections get erased as soon as I do target.addComponent(). Why does this happen? Any ideas on what's causing this? (Field2 is a CheckBoxMultipleChoice, initially initialized with some list, and its outputMarkerId = true, to make it work with Ajax.) Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-addComponent-Field-in-Ajax-erases-that-Field-s-values-tp3159543p3159543.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: target.addComponent(Field) in Ajax erases that Field's values
On Tue, Dec 21, 2010 at 1:50 PM, eugenebalt eugeneb...@yahoo.com wrote: I have a piece of Ajax code, attached to some field (let's call it sourceField), which looks like this: sourceField.add(new AjaxFormChoiceComponentUpdatingBehavior() { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(Field2); } } As you can see, Field2 is not changed in any way, it is not cleared or modified (so this code shouldn't really do anything). However, when this Ajax runs on changing the sourceField, the Field2's values get erased! Field2 is actually a CheckBoxMultipleChoice, and all the checkbox selections get erased as soon as I do target.addComponent(). Why does this happen? Any ideas on what's causing this? (Field2 is a CheckBoxMultipleChoice, initially initialized with some list, and its outputMarkerId = true, to make it work with Ajax.) Because you're doing this in an AJAX request that is only submitting the value(s) of sourceField, and not Field2. Then you repaint Field2, and it has no values, and gets replaced on the client side. You need to submit the whole form or at least both fields. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: target.addComponent(Field) in Ajax erases that Field's values
Did the field2 have an initial value or did you set the value in your browser and then let the ajax run? Hielke On 21 Dec 2010 20:51, eugenebalt eugeneb...@yahoo.com wrote: I have a piece of Ajax code, attached to some field (let's call it sourceField), which looks like this: sourceField.add(new AjaxFormChoiceComponentUpdatingBehavior() { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(Field2); } } As you can see, Field2 is not changed in any way, it is not cleared or modified (so this code shouldn't really do anything). However, when this Ajax runs on changing the sourceField, the Field2's values get erased! Field2 is actually a CheckBoxMultipleChoice, and all the checkbox selections get erased as soon as I do target.addComponent(). Why does this happen? Any ideas on what's causing this? (Field2 is a CheckBoxMultipleChoice, initially initialized with some list, and its outputMarkerId = true, to make it work with Ajax.) Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-addComponent-Field-in-Ajax-erases-that-Field-s-values-tp3159543p3159543.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: target.addComponent(Field) in Ajax erases that Field's values
Awesome! I love the Wicket community. 11 minutes after the initial post, there are three very helpful answers. Great work everyone! On Tue, Dec 21, 2010 at 2:01 PM, Hielke Hoeve hielke.ho...@gmail.comwrote: Did the field2 have an initial value or did you set the value in your browser and then let the ajax run? Hielke On 21 Dec 2010 20:51, eugenebalt eugeneb...@yahoo.com wrote: I have a piece of Ajax code, attached to some field (let's call it sourceField), which looks like this: sourceField.add(new AjaxFormChoiceComponentUpdatingBehavior() { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(Field2); } } As you can see, Field2 is not changed in any way, it is not cleared or modified (so this code shouldn't really do anything). However, when this Ajax runs on changing the sourceField, the Field2's values get erased! Field2 is actually a CheckBoxMultipleChoice, and all the checkbox selections get erased as soon as I do target.addComponent(). Why does this happen? Any ideas on what's causing this? (Field2 is a CheckBoxMultipleChoice, initially initialized with some list, and its outputMarkerId = true, to make it work with Ajax.) Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-addComponent-Field-in-Ajax-erases-that-Field-s-values-tp3159543p3159543.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: target.addComponent(Field) in Ajax erases that Field's values
On Tue, Dec 21, 2010 at 5:50 PM, eugenebalt eugeneb...@yahoo.com wrote: I have a piece of Ajax code, attached to some field (let's call it sourceField), which looks like this: sourceField.add(new AjaxFormChoiceComponentUpdatingBehavior() { protected void onUpdate(AjaxRequestTarget target) { target.addComponent(Field2); } } As you can see, Field2 is not changed in any way, it is not cleared or modified (so this code shouldn't really do anything). However, when this Ajax runs on changing the sourceField, the Field2's values get erased! Field2 is actually a CheckBoxMultipleChoice, and all the checkbox selections get erased as soon as I do target.addComponent(). Why does this happen? Any ideas on what's causing this? Actually I have, but very unlikely: sourceField = new CheckBoxMultipleChoice(id, new MyModel(){ getObject{ return new ArrayList();} }, choiceList); this would generate your problem :-) (Field2 is a CheckBoxMultipleChoice, initially initialized with some list, and its outputMarkerId = true, to make it work with Ajax.) Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-addComponent-Field-in-Ajax-erases-that-Field-s-values-tp3159543p3159543.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
Re: adding sub rows to AjaxFallbackDefaultDataTable
First, I never used the tree table from wicket-extensions. But i had a very quick look at the code and had the following idea. You could try to extend the TreeTable so you can provide your own TreeFragment. This ExtendedTreeFragment could render different components depending on the 'level' parameter (e.g. the default TreeFragment for level 1 and a special details table component for level 2). 2010/12/21 fachhoch fachh...@gmail.com: tree table will not work , I need a table in the sub row,if I use tree table I cannot have header for the table. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/adding-sub-rows-to-AjaxFallbackDefaultDataTable-tp3095096p3112645.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: target.addComponent(Field) in Ajax erases that Field's values
Thanks for the fast replies, much appreciated, but what should I change in my code? I'm still not clear. Yes, the Field2 had some initial values with which it was constructed. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-addComponent-Field-in-Ajax-erases-that-Field-s-values-tp3159543p3159605.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: target.addComponent(Field) in Ajax erases that Field's values
s/AjaxFormChoiceComponentUpdatingBehavior/AjaxFormSubmittingBehavior/ so all values are propagated -igor On Tue, Dec 21, 2010 at 10:24 PM, eugenebalt eugeneb...@yahoo.com wrote: Thanks for the fast replies, much appreciated, but what should I change in my code? I'm still not clear. Yes, the Field2 had some initial values with which it was constructed. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-addComponent-Field-in-Ajax-erases-that-Field-s-values-tp3159543p3159605.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: target.addComponent(Field) in Ajax erases that Field's values
But I can't use AjaxFormSubmittingBehavior (correct me if I'm wrong). I need to make some changes to Field2 prior to any form submission, they have to be made as soon as the sourceField has changed in any way. I just don't want the Field2's values to get erased without me even doing anything. I was going to make some other changes to Field2, but noticed the values were getting erased. So I can't wait till form submission. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-addComponent-Field-in-Ajax-erases-that-Field-s-values-tp3159543p3159666.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: target.addComponent(Field) in Ajax erases that Field's values
It looks like I fixed it by adding new Ajax code to Field2. The Field2's Ajax code does nothing, it just calls target.addComponent() on itself: target.addComponent(Field2). This got rid of the values getting erased. So whenever you update something via Ajax, it has to be 2-way? You need to attach Ajax not just to the caller but also to the target? thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/target-addComponent-Field-in-Ajax-erases-that-Field-s-values-tp3159543p3159688.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Oracle Wicket Starter Application Project
Hi, I've put together a project based on Wicket Oracle which I'd hope could serve as a good starting point for applications based on these 2 technologies. My background is in writing large applications based upon Oracle I wrote this to learn about Wicket Java and also to prove to myself that best practices from the database world - which sadly I've rarely seen implemented in modern web applications! - such as: - using individual database users to represent real users - giving end-to-end authentication allowing the use of features such as SQL Trace fine grained auditing - using database roles to restrict access to data, and not relying wholly on application enforced security are compatible with modern web application frameworks. Wicket definitely didn't give me too many headaches! It's on github at: https://github.com/andrewah/Wicket---Oracle-Template It'd be fair to say that some of my Java may not be of the highest standard, so if anyone has the inclination to look at this, any constructive feedback would be appreciated. Cheers, Andrew.
Re: Oracle Wicket Starter Application Project
- using individual database users to represent real users - giving end-to-end authentication allowing the use of features such as SQL Trace fine grained auditing Does that mean that the number of open connections always equals the number of signed in users? - using database roles to restrict access to data, and not relying wholly on application enforced security So if you want to determine whether user X can see button Y, you have to query the database for particular role membership? Cheers, Eelco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Oracle Wicket Starter Application Project
Let me guess, you're a dba? On Dec 21, 2010 5:14 PM, Andrew Hall andre...@hotmail.com wrote: Hi, I've put together a project based on Wicket Oracle which I'd hope could serve as a good starting point for applications based on these 2 technologies. My background is in writing large applications based upon Oracle I wrote this to learn about Wicket Java and also to prove to myself that best practices from the database world - which sadly I've rarely seen implemented in modern web applications! - such as: - using individual database users to represent real users - giving end-to-end authentication allowing the use of features such as SQL Trace fine grained auditing - using database roles to restrict access to data, and not relying wholly on application enforced security are compatible with modern web application frameworks. Wicket definitely didn't give me too many headaches! It's on github at: https://github.com/andrewah/Wicket---Oracle-Template It'd be fair to say that some of my Java may not be of the highest standard, so if anyone has the inclination to look at this, any constructive feedback would be appreciated. Cheers, Andrew.
Re: Oracle Wicket Starter Application Project
You shouldn't need a connection per user with Oracle's Universal Connection Pool jar. e.g. in his AbstractOracleDAO UCPMgr.getLabelledConnection( pUsername , pPassword ); Scott On Tue, Dec 21, 2010 at 4:12 PM, Eelco Hillenius eelco.hillen...@gmail.com wrote: - using individual database users to represent real users - giving end-to-end authentication allowing the use of features such as SQL Trace fine grained auditing Does that mean that the number of open connections always equals the number of signed in users? - using database roles to restrict access to data, and not relying wholly on application enforced security So if you want to determine whether user X can see button Y, you have to query the database for particular role membership? Cheers, Eelco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Oracle Wicket Starter Application Project
On Dec 21, 2010, at 5:14 PM, Andrew Hall wrote: It'd be fair to say that some of my Java may not be of the highest standard, so if anyone has the inclination to look at this, any constructive feedback would be appreciated. I've thought about how to use the database this way as well. Eelco has a great question about database connection pooling, and I thought I would browse the source to see what was going on in there. DBA or not, if the application could be made scalable this way, I'd be down (at least on PostgreSQL). Unfortunately, the project is using Gradle, which does not import into my IDE (IntelliJ IDEA). It probably doesn't make sense to start that particular religious war in this thread, but practically, if I can't pull in the project and all it's dependencies very easily, I'm going to be less inclined to put any effort into it Right Now. If some percentage of users think like me, then that is a percentage of users that will come very late to your ideas. $0.02... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
saving uploaded file to temp folder best practices
I am want to save the uploaded file in temp folder till its persisted in database along with some other fields. I have a page with a form and a uploadpanel which is ajaxfileupload. User 1 open this page uploaded a file with name test.pdf and filing up other fields in the form. at this time user2 with a different session opens this page and uploaded the file with the same name . uploaded files are saved to java.io.temp here is my upload folder uploadFolder = new Folder(System.getProperty(java.io.tmpdir), wicket-uploads); uploadFolder.mkdirs(); so in my case user2 has replaced the file uploaded by user1, now when user1 persists the file and other fields to database he is persisting wrong file . Please suggest me what is the best practice to handle such situations , best practice to save files to temp folder in multi threaded application ? I thought of using a database sequence.nextval as appender to filename so that I uniquely identify the file, please suggest best practice ? a user open my page uploaded file my concern is suppose user uploads a file with filename -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/saving-uploaded-file-to-temp-folder-best-practices-tp3160036p3160036.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: saving uploaded file to temp folder best practices
Have you verified that this is what happens? On Dec 21, 2010 10:00 PM, fachhoch fachh...@gmail.com wrote: I am want to save the uploaded file in temp folder till its persisted in database along with some other fields. I have a page with a form and a uploadpanel which is ajaxfileupload. User 1 open this page uploaded a file with name test.pdf and filing up other fields in the form. at this time user2 with a different session opens this page and uploaded the file with the same name . uploaded files are saved to java.io.temp here is my upload folder uploadFolder = new Folder(System.getProperty(java.io.tmpdir), wicket-uploads); uploadFolder.mkdirs(); so in my case user2 has replaced the file uploaded by user1, now when user1 persists the file and other fields to database he is persisting wrong file . Please suggest me what is the best practice to handle such situations , best practice to save files to temp folder in multi threaded application ? I thought of using a database sequence.nextval as appender to filename so that I uniquely identify the file, please suggest best practice ? a user open my page uploaded file my concern is suppose user uploads a file with filename -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/saving-uploaded-file-to-temp-folder-best-practices-tp3160036p3160036.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: saving uploaded file to temp folder best practices
No i have not tried yet , I will try it , but this is what should happen right ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/saving-uploaded-file-to-temp-folder-best-practices-tp3160036p3160091.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: saving uploaded file to temp folder best practices
Why don't you try an upload and see what the file name is in the temp folder. On Tue, Dec 21, 2010 at 11:18 PM, fachhoch fachh...@gmail.com wrote: No i have not tried yet , I will try it , but this is what should happen right ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/saving-uploaded-file-to-temp-folder-best-practices-tp3160036p3160091.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Oracle Wicket Starter Application Project
On Tue, Dec 21, 2010 at 6:12 PM, Eelco Hillenius eelco.hillen...@gmail.comwrote: - using database roles to restrict access to data, and not relying wholly on application enforced security So if you want to determine whether user X can see button Y, you have to query the database for particular role membership? Since he says wholly, I'm assuming he means that the DB stands as the last resort security. Ideally your application rules will apply the security constraints correctly. But, if someone finds a way to punch a hole in that security (i.e. change a primary key in the URL, which shouldn't be there anyway without security around it, but sometimes people do this, which leaves an app-level security vulnerability), the DB rules should kick in and disallow what you were trying (hacking) to do. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*