Re: WicketTester and https
is there a way to test Pages that have the @RequireHttps annotation? You can try http://wicketpagetest.sourceforge.net which should support https testing. -- Kent Tong Useful FREE software at http://www2.cpttm.org.mo/cyberlab/freeware - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: Dynamically invoke a page object (Reflection?)
Page page = new Wicket.createPageSomeHow(pageStr); Try reflection, e.g. Class.forName(pageStr).newInstance() for using a parameterless constructor. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Scripting language
Hi all, Can anyone recommends a scripting language that can be used with Wicket for productivity? Regards, James -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Scripting-language-tp2402957p2402957.html Sent from the Wicket - User 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
DropDownChoice - how to select default item
I am having a problem that my DropDownChoice is not selecting the item I expect, only Choose one. Here is the code: ... private ListLong accountList = new ArrayListLong(); private Long selectedAccount; public AccountsDropDownChoice(String id, final Component component) { super(id); initializeAccounts(); selectedAccount = getDefaultAccount(); final DropDownChoiceLong dropDown = new DropDownChoiceLong(accountsDropDown, new PropertyModel(this, selectedAccount), accountsList) { } The value selectedAccount is being updated correctly when an item in the dropdown is selected, but the dropdown is not defaulting to the value in that field to begin with. If anyone can help it is very appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2402960.html Sent from the Wicket - User 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: DropDownChoice - how to select default item
Should be working fine. Are you sure you're showing the actual code, i.e. accountList vs accountsList ? BTW are you accounts really just represented as Longs? Regards Sven On 09/01/2010 01:15 PM, drf wrote: I am having a problem that my DropDownChoice is not selecting the item I expect, only Choose one. Here is the code: ... private ListLong accountList = new ArrayListLong(); private Long selectedAccount; public AccountsDropDownChoice(String id, final Component component) { super(id); initializeAccounts(); selectedAccount = getDefaultAccount(); final DropDownChoiceLong dropDown = new DropDownChoiceLong(accountsDropDown, new PropertyModel(this, selectedAccount), accountsList) { } The value selectedAccount is being updated correctly when an item in the dropdown is selected, but the dropdown is not defaulting to the value in that field to begin with. If anyone can help it is very appreciated. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DropDownChoice - how to select default item
Thanks No, it does not appear to be working I have an Account object, but for the dropdown display I am just extracting a list of Long values. Is that the correct thing to do? The accountList v accountsList is just a typing error in the email On Wed, Sep 1, 2010 at 2:26 PM, Sven Meier [via Apache Wicket] ml-node+2402968-632920498-65...@n4.nabble.com wrote: Should be working fine. Are you sure you're showing the actual code, i.e. accountList vs accountsList ? BTW are you accounts really just represented as Longs? Regards Sven On 09/01/2010 01:15 PM, drf wrote: I am having a problem that my DropDownChoice is not selecting the item I expect, only Choose one. Here is the code: ... private ListLong accountList = new ArrayListLong(); private Long selectedAccount; public AccountsDropDownChoice(String id, final Component component) { super(id); initializeAccounts(); selectedAccount = getDefaultAccount(); final DropDownChoiceLong dropDown = new DropDownChoiceLong(accountsDropDown, new PropertyModel(this, selectedAccount), accountsList) { } The value selectedAccount is being updated correctly when an item in the dropdown is selected, but the dropdown is not defaulting to the value in that field to begin with. If anyone can help it is very appreciated. - To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] View message @ http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2402968.html To unsubscribe from DropDownChoice - how to select default item, click here. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2402993.html Sent from the Wicket - User mailing list archive at Nabble.com.
RE: Dynamically invoke a page object (Reflection?)
So, just use reflection. OK. I thought there might have been some Wicket oriented utility. But I am OK with reflection. -Original Message- From: Wilhelmsen Tor Iver [mailto:toriv...@arrive.no] Sent: Wednesday, September 01, 2010 4:03 AM To: users@wicket.apache.org Cc: Berlin Brown Subject: SV: Dynamically invoke a page object (Reflection?) Page page = new Wicket.createPageSomeHow(pageStr); Try reflection, e.g. Class.forName(pageStr).newInstance() for using a parameterless constructor. - Tor Iver - 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: Wicket Problem: Ajax request encoding
I found solution for Glassfish just write sun-web.xml this ?xml version=1.0 encoding=UTF-8? !DOCTYPE sun-web-app PUBLIC -//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd; sun-web-app error-url= context-root/cts/context-root class-loader delegate=true/ jsp-config property name=keepgenerated value=true descriptionKeep a copy of the generated servlet class' java code./description /property /jsp-config locale-charset-info default-locale= locale-charset-map charset= locale=/ parameter-encoding default-charset=UTF-8/ /locale-charset-info /sun-web-app Again ISO-8859-1 problem. 01 Eylül 2010 08:22 tarihinde Altuğ Bilgin Altıntaş alt...@gmail.comyazdı: Hi Ronaldo; Did you find any solution on that problem ? Thanks. 2010/7/20 Ronaldo Cisneiros Veras ronaldo.cisnei...@cesar.org.br Hi, We're using Wicket framework (Version 1.4.9) on our systems. Our problem occurs when there is a submission of ajax request in text fields. When you type the word descrição for example by submitting the text by ajax event the word is modified to descrição. This problem only occurs in Internet Explorer and does not occur in Firefox. We are overriding the init () method of WebApplication class and add the following lines for the encoding: getMarkupSettings().setDefaultMarkupEncoding(ISO-8859-1); ((Settings) getMarkupSettings()).setResponseRequestEncoding(ISO-8859-1); Could you tell us a solution for this issue? Systems informations: Windows XP SP2 Windows encoding: UTF-8 Regards, Ronaldo.
Possible serialization issue on a server
We have this code working on jetty but not working on Tomcat. I was thinking there might have been a serialization issue where code is serialized on the server and the class data doesn't get updated. Is it possible that class files are serialized on the Server. How would I check where Wicket serializes those files? This code works fine in one environment but not the other. This is the only error I am getting: 2010-09-01 08:04:15,193 ERROR - RequestCycle - Could not find child with id: theField-radiogroup in the wicket:enclosure org.apache.wicket.WicketRuntimeException: Could not find child with id: theField-radiogroup in the wicket:enclosure at org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enc losure.java:210) at org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresen t(Enclosure.java:249) at org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Encl osure.java:169) at org.apache.wicket.Component.renderComponent(Component.java:2626) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) at org.apache.wicket.Component.render(Component.java:2457) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureRes olver.java:61) at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentRe solvers.java:81) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer .java:1577) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.jav a:1501) at org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:192 6) final RadioChoice radioGroupYesNo = new RadioChoice(theField-radiogroup, new PropertyModel(ibaApplication, field), Arrays.asList(Constants.YES_NO)) { private static final long serialVersionUID = 11L; @Override public boolean isVisible() { return someData; } }; // End of add radio group // radioGroupYesNo.setPrefix(); radioGroupYesNo.setSuffix(); form.add(radioGroupYesNo); Berlin Brown
ajax links produce too long javascript
Consider this javascript generated by AjaxFallbackLink: wicketShow('overlapping-div');var wcall=wicketAjaxGet('../../?x=Gusbl7hNSWOo5OPifLRHlQ',function() { ;wicketHide('overlapping-div');}.bind(this),function() { ;wicketHide('overlapping-div');}.bind(this), function() {return Wicket.$('link8f') != null;}.bind(this));return !wcall; I believe it is worth extracting redudant code from this snipped into a function. The result would take less space: wicketAjaxGet2('../../?x=Gusbl7hNSWOo5OPifLRHlQ', this, 'overlapping-div')
Re: Dynamically invoke a page object (Reflection?)
Use setResponsePage(newPageClassName(params)); params depends on the Constructor of the WebPage class extension. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dynamically-invoke-a-page-object-Reflection-tp2402302p2403066.html Sent from the Wicket - User 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
Radio buttons in modal window in IE6
Hi all, We have few radio buttons put in a form in a modal window. And we have a problem with them. When IN IE6 form in modal window is submitted we always get firstly added radio button to the group. ... From form = new Form(form, new CompoundPropertyModel(new SearchModel())); add(form); RadioGroup choiseGroup = new RadioGroup(searchParam); choiseGroup.add(new Radio(p1, new Model(SearchParams.NAME))); choiseGroup.add(new Radio(p2, new Model(SearchParams.CODE))); choiseGroup.add(new Radio(p3, new Model(SearchParams.CIF))); choiseGroup.add(new Radio(p4, new Model(SearchParams.ACC_NUMBER))); choiseGroup.add(new Radio(p5, new Model(SearchParams.CARD_NUMBER))); form.add(choiseGroup); ... Visually I can switch through radio buttons, but, when I submit form - it's always the same value - NAME. But only on IE6. Everything works on IE7+, FF etc. And of course we need IE6 and nothing else :/ As if other radio buttons does not exist. Am I doing something wrong? Or is there workaround? Or smth? I'm desperate. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Radio-buttons-in-modal-window-in-IE6-tp2403103p2403103.html Sent from the Wicket - User 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: DropDownChoice - how to select default item
Hello, You should use a DropDownChoiceAccount and use the constructor that takes an IChoiceRendererAccount which allows you to define: 1. the text that is output for the account 2. the value that is output in the html for the account. This would be the place to pull out the long. I think the problem with your code is how the selected account is fetched. It looks to me like you are using the value of selectedAccount within the constructor. Since the data backing the value doesn't exist until render time it is always null; and causes the drop down to show Choose One. You should wrap the getDefaultAccount() method with an IModelAccount implementation so that it can return the model value at render time. One method for cases like this if you are using Spring is to inject the accountsService bean using @SpringBean and then get account list using a method like: ListAccountsgetAccountsForUser(...). You set the possibilities of the drop down to be the ListAccounts and you set the current account to be the first item from the list. Regards, Mike No, it does not appear to be working I have an Account object, but for the dropdown display I am just extracting a list of Long values. Is that the correct thing to do? The accountList v accountsList is just a typing error in the email On Wed, Sep 1, 2010 at 2:26 PM, Sven Meier [via Apache Wicket] ml-node+2402968-632920498-65...@n4.nabble.com wrote: Should be working fine. Are you sure you're showing the actual code, i.e. accountList vs accountsList ? BTW are you accounts really just represented as Longs? Regards Sven On 09/01/2010 01:15 PM, drf wrote: I am having a problem that my DropDownChoice is not selecting the item I expect, only Choose one. Here is the code: ... private ListLongaccountList = new ArrayListLong(); private Long selectedAccount; public AccountsDropDownChoice(String id, final Component component) { super(id); initializeAccounts(); selectedAccount = getDefaultAccount(); final DropDownChoiceLongdropDown = new DropDownChoiceLong(accountsDropDown, new PropertyModel(this, selectedAccount), accountsList) { } The value selectedAccount is being updated correctly when an item in the dropdown is selected, but the dropdown is not defaulting to the value in that field to begin with. If anyone can help it is very appreciated. - To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] View message @ http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2402968.html To unsubscribe from DropDownChoice - how to select default item, click here. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DropDownChoice - how to select default item
Mike Thanks - not sure if the problem is with the fact that the code is in the constructor: 1) the In Action book seems to setup dropdowns ect in the constructor - where else would I define the drop down? 2) the debugger and syout both show that selectedAccount has the correct value prior to constructing the dropdown. Re IChoseRenderer, the dropdown is displaying the correct values and also updating selectedAccount correctly. So what does IChoseRenderer apart from saving the effort to extract the raw account numbers - are you brining in IChoseRenderer as good advice or are you saying that the fact I am not using it is part of the issue? I need to understand Models better, but I am wondering - do I have to write another class to wrap Account with a Model implementation just to do this simple thing? Also, if the selectedAccount is correctly set before calling the constructor, will this still help? David -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2403224.html Sent from the Wicket - User 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: Scripting language
It depends, what do you want to do. If you want to develop your site in some scripting language, then use php or rails instead. I have seen groovy in some projects build scripts. Sigmar On Wed, Sep 1, 2010 at 2:10 PM, james yong i_yon...@yahoo.com.sg wrote: Hi all, Can anyone recommends a scripting language that can be used with Wicket for productivity? Regards, James -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Scripting-language-tp2402957p2402957.html Sent from the Wicket - User 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: DropDownChoice - how to select default item
Hi, your dropdown accesses the selected account via a model, so it should work regardless when you initialize the selectedAccount variable. Put a breakpoint on that line and check the return value of getDefaultAccount(). BTW using ModelAccount and IChoiceRenderer gives you some advantages (always up-to-date account list, don't keep selected account in session, ...). Sven On 09/01/2010 04:02 PM, drf wrote: Mike Thanks - not sure if the problem is with the fact that the code is in the constructor: 1) the In Action book seems to setup dropdowns ect in the constructor - where else would I define the drop down? 2) the debugger and syout both show that selectedAccount has the correct value prior to constructing the dropdown. Re IChoseRenderer, the dropdown is displaying the correct values and also updating selectedAccount correctly. So what does IChoseRenderer apart from saving the effort to extract the raw account numbers - are you brining in IChoseRenderer as good advice or are you saying that the fact I am not using it is part of the issue? I need to understand Models better, but I am wondering - do I have to write another class to wrap Account with a Model implementation just to do this simple thing? Also, if the selectedAccount is correctly set before calling the constructor, will this still help? David - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
session timeout notification using cometd
I want to notify clients about their session timeout.If the user is idle and his session is about to expire I want to warn users about this , can I do this with wicket-cometd ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403249.html Sent from the Wicket - User 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: ajax links produce too long javascript
https://cwiki.apache.org/WICKET/wicket-15-ajax.html On Wed, Sep 1, 2010 at 9:32 AM, Vladimir Kovalyuk koval...@gmail.com wrote: Consider this javascript generated by AjaxFallbackLink: wicketShow('overlapping-div');var wcall=wicketAjaxGet('../../?x=Gusbl7hNSWOo5OPifLRHlQ',function() { ;wicketHide('overlapping-div');}.bind(this),function() { ;wicketHide('overlapping-div');}.bind(this), function() {return Wicket.$('link8f') != null;}.bind(this));return !wcall; I believe it is worth extracting redudant code from this snipped into a function. The result would take less space: wicketAjaxGet2('../../?x=Gusbl7hNSWOo5OPifLRHlQ', this, 'overlapping-div') -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: session timeout notification using cometd
You indeed can use wicket-cometd on that, but why not setting a simple Javascript timer on the page (set to your server-timeout configuratin) which get reset on user interaction. On Wed, Sep 1, 2010 at 11:21 AM, fachhoch [via Apache Wicket] ml-node+2403249-1689023062-65...@n4.nabble.comml-node%2b2403249-1689023062-65...@n4.nabble.com wrote: I want to notify clients about their session timeout.If the user is idle and his session is about to expire I want to warn users about this , can I do this with wicket-cometd ? -- View message @ http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403249.html To unsubscribe from Apache Wicket, click herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=. -- Sincerely, JC (http://www.linkedin.com/in/jcgarciam) Work smarter, not harder!. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403283.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: DropDownChoice - how to select default item
have a breakpoint on that line - getDefaultAccount returns what I expect On Wed, Sep 1, 2010 at 5:21 PM, Sven Meier [via Apache Wicket] ml-node+2403250-1365512862-65...@n4.nabble.com wrote: Hi, your dropdown accesses the selected account via a model, so it should work regardless when you initialize the selectedAccount variable. Put a breakpoint on that line and check the return value of getDefaultAccount(). BTW using ModelAccount and IChoiceRenderer gives you some advantages (always up-to-date account list, don't keep selected account in session, ...). Sven On 09/01/2010 04:02 PM, drf wrote: Mike Thanks - not sure if the problem is with the fact that the code is in the constructor: 1) the In Action book seems to setup dropdowns ect in the constructor - where else would I define the drop down? 2) the debugger and syout both show that selectedAccount has the correct value prior to constructing the dropdown. Re IChoseRenderer, the dropdown is displaying the correct values and also updating selectedAccount correctly. So what does IChoseRenderer apart from saving the effort to extract the raw account numbers - are you brining in IChoseRenderer as good advice or are you saying that the fact I am not using it is part of the issue? I need to understand Models better, but I am wondering - do I have to write another class to wrap Account with a Model implementation just to do this simple thing? Also, if the selectedAccount is correctly set before calling the constructor, will this still help? David - To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] View message @ http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2403250.html To unsubscribe from DropDownChoice - how to select default item, click here. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-how-to-select-default-item-tp2402960p2403304.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: DropDownChoice - how to select default item
Mike may have been referring to the usage of this when he was talking about the constructor. I create drop downs in constructors with no issue, I have not however used a this with a property model. Wild guess: possibly java is in the process of constructing the object, but DropDownChoice cannot access the this yet? On occasion I am using drop downs without choice renderer and setting the initial value OK. On Wed, Sep 1, 2010 at 10:20 AM, Sven Meier s...@meiers.net wrote: Hi, your dropdown accesses the selected account via a model, so it should work regardless when you initialize the selectedAccount variable. Put a breakpoint on that line and check the return value of getDefaultAccount(). BTW using ModelAccount and IChoiceRenderer gives you some advantages (always up-to-date account list, don't keep selected account in session, ...). Sven On 09/01/2010 04:02 PM, drf wrote: Mike Thanks - not sure if the problem is with the fact that the code is in the constructor: 1) the In Action book seems to setup dropdowns ect in the constructor - where else would I define the drop down? 2) the debugger and syout both show that selectedAccount has the correct value prior to constructing the dropdown. Re IChoseRenderer, the dropdown is displaying the correct values and also updating selectedAccount correctly. So what does IChoseRenderer apart from saving the effort to extract the raw account numbers - are you brining in IChoseRenderer as good advice or are you saying that the fact I am not using it is part of the issue? I need to understand Models better, but I am wondering - do I have to write another class to wrap Account with a Model implementation just to do this simple thing? Also, if the selectedAccount is correctly set before calling the constructor, will this still help? David - 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: session timeout notification using cometd
I can do that, do you have any examples for java script notification when session is about to timeoout ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403332.html Sent from the Wicket - User 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: Scripting language
You might want to try Scala/Wicket. Do some googling for Scala AND Wicket. On Wed, Sep 1, 2010 at 7:10 AM, james yong i_yon...@yahoo.com.sg wrote: Hi all, Can anyone recommends a scripting language that can be used with Wicket for productivity? Regards, James -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Scripting-language-tp2402957p2402957.html Sent from the Wicket - User 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: DropDownChoice - how to select default item
Of course you can use this inside the constructor. I've thrown together the following example and it works (of course): public class AccountPage extends WebPage { private ListLong accountList = new ArrayListLong(); private Long selectedAccount; public AccountPage() { initializeAccounts(); selectedAccount = getDefaultAccount(); final DropDownChoiceLong dropDown = new DropDownChoiceLong(accountsDropDown, new PropertyModelLong(this, selectedAccount), accountList); add(dropDown); } private Long getDefaultAccount() { return 3l; } private void initializeAccounts() { accountList = Arrays.asList(1L, 2L, 3L, 4L, 5L); } } On 09/01/2010 04:40 PM, T Ames wrote: Mike may have been referring to the usage of this when he was talking about the constructor. I create drop downs in constructors with no issue, I have not however used a this with a property model. Wild guess: possibly java is in the process of constructing the object, but DropDownChoice cannot access the this yet? On occasion I am using drop downs without choice renderer and setting the initial value OK. On Wed, Sep 1, 2010 at 10:20 AM, Sven Meiers...@meiers.net wrote: Hi, your dropdown accesses the selected account via a model, so it should work regardless when you initialize the selectedAccount variable. Put a breakpoint on that line and check the return value of getDefaultAccount(). BTW using ModelAccount and IChoiceRenderer gives you some advantages (always up-to-date account list, don't keep selected account in session, ...). Sven On 09/01/2010 04:02 PM, drf wrote: Mike Thanks - not sure if the problem is with the fact that the code is in the constructor: 1) the In Action book seems to setup dropdowns ect in the constructor - where else would I define the drop down? 2) the debugger and syout both show that selectedAccount has the correct value prior to constructing the dropdown. Re IChoseRenderer, the dropdown is displaying the correct values and also updating selectedAccount correctly. So what does IChoseRenderer apart from saving the effort to extract the raw account numbers - are you brining in IChoseRenderer as good advice or are you saying that the fact I am not using it is part of the issue? I need to understand Models better, but I am wondering - do I have to write another class to wrap Account with a Model implementation just to do this simple thing? Also, if the selectedAccount is correctly set before calling the constructor, will this still help? David - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Remove support for Portlets in Wicket 1.5
-1 On Wed, Aug 11, 2010 at 8:35 PM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, I just created a ticket (https://issues.apache.org/jira/browse/WICKET-2976 ) to remove the support for Portlets in Wicket 1.5. It is currently broken because of the re-work of WicketFilter and request processing. Since none of the active core developers use this technology in his daily job it is hard for us to support it. Now is the time to vote against this decision and give us a hand to improve it or just silently agree. martin-g P.S. I sent this email earlier today but for some reason it was rejected. Excuse me if you receive it for second time. -- Best regards, Paul Szulc http://www.paulszulc..com
Re: Remove support for Portlets in Wicket 1.5
Usually -1 votes should be accompanied by a justification if you want them to be considered seriously. Why are you voting -1? On Wed, Sep 1, 2010 at 11:06 AM, Paul Szulc paul.sz...@gmail.com wrote: -1 On Wed, Aug 11, 2010 at 8:35 PM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, I just created a ticket (https://issues.apache.org/jira/browse/WICKET-2976 ) to remove the support for Portlets in Wicket 1.5. It is currently broken because of the re-work of WicketFilter and request processing. Since none of the active core developers use this technology in his daily job it is hard for us to support it. Now is the time to vote against this decision and give us a hand to improve it or just silently agree. martin-g P.S. I sent this email earlier today but for some reason it was rejected. Excuse me if you receive it for second time. -- Best regards, Paul Szulc http://www.paulszulc..com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: session timeout notification using cometd
Here is a very rough example, keep in mind there a several factors that can reset the timeout to happen in the server and then you need to reset your timer in the client, the most troublesome to handle are ajax interaction and iframe. So assuming you don't have any ajax component or iframe on the page that can actually trigger any server interaction and the user just sit in the page and wait, something like this is the easiest way: setTimeout(showAboutToTimeout(), (1000 * (60 * 28) ); //28min function showAboutToTimeout(){ // Here you can build you message or show floating div, what ever you like alert(Your session may timeout in 2 minutes unless you interact with the page :) ); } On Wed, Sep 1, 2010 at 11:52 AM, fachhoch [via Apache Wicket] ml-node+2403332-1651621642-65...@n4.nabble.comml-node%2b2403332-1651621642-65...@n4.nabble.com wrote: I can do that, do you have any examples for java script notification when session is about to timeoout ? -- View message @ http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403332.html To unsubscribe from Apache Wicket, click herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=. -- Sincerely, JC (http://www.linkedin.com/in/jcgarciam) Work smarter, not harder!. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/session-timeout-notification-using-cometd-tp2403249p2403388.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: Scripting language
On Wed, Sep 1, 2010 at 8:31 PM, James Carman ja...@carmanconsulting.com wrote: You might want to try Scala/Wicket. Do some googling for Scala AND Wicket. Also, there is a Groovy + Wicket version of the hotel booking demo app here (SVN): http://perfbench.googlecode.com/svn/trunk/perfbench/grocket-jpa/ Done as an experiment a long time ago though, in a big hurry. Personally, I didn't like the combination of Groovy + Wicket, for reasons mentioned in the Scala + Wicket StackOverflow link below. Others may have different opinions though. http://stackoverflow.com/questions/2104724/your-experience-with-scalawicket - Peter. On Wed, Sep 1, 2010 at 7:10 AM, james yong i_yon...@yahoo.com.sg wrote: Hi all, Can anyone recommends a scripting language that can be used with Wicket for productivity? Regards, James -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Scripting-language-tp2402957p2402957.html Sent from the Wicket - User 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ajax links produce too long javascript
that should be renamed to wicket-later, not happening in 1.5 -igor On Wed, Sep 1, 2010 at 7:32 AM, Pedro Santos pedros...@gmail.com wrote: https://cwiki.apache.org/WICKET/wicket-15-ajax.html On Wed, Sep 1, 2010 at 9:32 AM, Vladimir Kovalyuk koval...@gmail.com wrote: Consider this javascript generated by AjaxFallbackLink: wicketShow('overlapping-div');var wcall=wicketAjaxGet('../../?x=Gusbl7hNSWOo5OPifLRHlQ',function() { ;wicketHide('overlapping-div');}.bind(this),function() { ;wicketHide('overlapping-div');}.bind(this), function() {return Wicket.$('link8f') != null;}.bind(this));return !wcall; I believe it is worth extracting redudant code from this snipped into a function. The result would take less space: wicketAjaxGet2('../../?x=Gusbl7hNSWOo5OPifLRHlQ', this, 'overlapping-div') -- Pedro Henrique Oliveira dos Santos - 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: Scripting language
On Wed, Sep 1, 2010 at 11:34 AM, Peter Thomas ptrtho...@gmail.com wrote: Done as an experiment a long time ago though, in a big hurry. Personally, I didn't like the combination of Groovy + Wicket, for reasons mentioned in the Scala + Wicket StackOverflow link below. Others may have different opinions though. So, you would recommend using Scala as opposed to Groovy, then? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Scripting language
On Wed, Sep 1, 2010 at 9:08 PM, James Carman ja...@carmanconsulting.com wrote: On Wed, Sep 1, 2010 at 11:34 AM, Peter Thomas ptrtho...@gmail.com wrote: Done as an experiment a long time ago though, in a big hurry. Personally, I didn't like the combination of Groovy + Wicket, for reasons mentioned in the Scala + Wicket StackOverflow link below. Others may have different opinions though. So, you would recommend using Scala as opposed to Groovy, then? Yes. - 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: Scripting language
It depends how much time you want to take to learn the language. With Groovy you don't have to know anything but Java to start with and can learn more about the language as needed or interested. Scala is nothing like Java or any other language. The issues Groovy had with inner classes almost all been fixed since the Stack Overflow posting so as long as your using 1.7.x you should be good there. Whats better is going to come down to what your comfortable with, willing to learn, and if squeezing a couple milliseconds of performance matters or not. On Wed, Sep 1, 2010 at 11:38 AM, James Carman ja...@carmanconsulting.comwrote: On Wed, Sep 1, 2010 at 11:34 AM, Peter Thomas ptrtho...@gmail.com wrote: Done as an experiment a long time ago though, in a big hurry. Personally, I didn't like the combination of Groovy + Wicket, for reasons mentioned in the Scala + Wicket StackOverflow link below. Others may have different opinions though. So, you would recommend using Scala as opposed to Groovy, then? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Scripting language
On Wed, Sep 1, 2010 at 11:50 AM, Ben Tilford bentilf...@gmail.com wrote: Whats better is going to come down to what your comfortable with, willing to learn, and if squeezing a couple milliseconds of performance matters or not. That's one of the key points I think folks need to think about when it comes to considering Groovy for something like this. It has had a bad reputation for being slow (so did Java back in the day). Scala is pretty fast from what I understand. Although Scala, as you pointed out, has a higher learning curve. It does seem to be a more cerebral programming language. When I read the Scala book, I was left scratching my head on some of the topics. I've been studying new programming languages a lot lately and Scala is definitely one of the ones I like, but I can see where it would be difficult to grasp for the less-experienced folks. Some of the others seem a bit more intuitive. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Scripting language
On Wed, Sep 1, 2010 at 9:20 PM, Ben Tilford bentilf...@gmail.com wrote: It depends how much time you want to take to learn the language. With Groovy you don't have to know anything but Java to start with and can learn more about the language as needed or interested. Scala is nothing like Java or any other language. The issues Groovy had with inner classes almost all been fixed since the Stack Overflow posting so as long as your using 1.7.x you should be good there. I actually used 1.7.0 the moment it was released because until then inner classes in Groovy were not supported at all. You can look at the code / pom.xml and see for yourself. I didn't bother trying any later versions though. - Peter Whats better is going to come down to what your comfortable with, willing to learn, and if squeezing a couple milliseconds of performance matters or not. On Wed, Sep 1, 2010 at 11:38 AM, James Carman ja...@carmanconsulting.comwrote: On Wed, Sep 1, 2010 at 11:34 AM, Peter Thomas ptrtho...@gmail.com wrote: Done as an experiment a long time ago though, in a big hurry. Personally, I didn't like the combination of Groovy + Wicket, for reasons mentioned in the Scala + Wicket StackOverflow link below. Others may have different opinions though. So, you would recommend using Scala as opposed to Groovy, then? - 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: Scripting language
Just curious: what makes you think that using a scripting language makes you more productive than using Java? Do you mean productivity in the first two days or in the long run? Tom On 01.09.2010 13:10, james yong wrote: Hi all, Can anyone recommends a scripting language that can be used with Wicket for productivity? Regards, James - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Scripting language
I would like to point out that Scala is far from what one might consider a dynamic scripting language. I haven't tried it, but you may see if Clojure works with Wicket. That has some of the attributes where you can embed clojure into a java application and change code on the fly. Scala would require that you code be recompiled. -Original Message- From: Thomas Singer [mailto:wic...@regnis.de] Sent: Wednesday, September 01, 2010 12:34 PM To: users@wicket.apache.org Subject: Re: Scripting language Just curious: what makes you think that using a scripting language makes you more productive than using Java? Do you mean productivity in the first two days or in the long run? Tom On 01.09.2010 13:10, james yong wrote: Hi all, Can anyone recommends a scripting language that can be used with Wicket for productivity? Regards, James - 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: ajax links produce too long javascript
https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax+rewriting On Wed, Sep 1, 2010 at 12:34 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: that should be renamed to wicket-later, not happening in 1.5 -igor On Wed, Sep 1, 2010 at 7:32 AM, Pedro Santos pedros...@gmail.com wrote: https://cwiki.apache.org/WICKET/wicket-15-ajax.html On Wed, Sep 1, 2010 at 9:32 AM, Vladimir Kovalyuk koval...@gmail.com wrote: Consider this javascript generated by AjaxFallbackLink: wicketShow('overlapping-div');var wcall=wicketAjaxGet('../../?x=Gusbl7hNSWOo5OPifLRHlQ',function() { ;wicketHide('overlapping-div');}.bind(this),function() { ;wicketHide('overlapping-div');}.bind(this), function() {return Wicket.$('link8f') != null;}.bind(this));return !wcall; I believe it is worth extracting redudant code from this snipped into a function. The result would take less space: wicketAjaxGet2('../../?x=Gusbl7hNSWOo5OPifLRHlQ', this, 'overlapping-div') -- Pedro Henrique Oliveira dos Santos - 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 -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DropDownChoice - how to select default item
Hi drf! Have you checked the generated HTML? Is there any 'selected' attribute in your option tags? I am having a problem that my DropDownChoice is not selecting the item I expect, only Choose one. Here is the code: ... private ListLong accountList = new ArrayListLong(); private Long selectedAccount; public AccountsDropDownChoice(String id, final Component component) { super(id); initializeAccounts(); selectedAccount = getDefaultAccount(); final DropDownChoiceLong dropDown = new DropDownChoiceLong(accountsDropDown, new PropertyModel(this, selectedAccount), accountsList) { } The value selectedAccount is being updated correctly when an item in the dropdown is selected, but the dropdown is not defaulting to the value in that field to begin with. If anyone can help it is very appreciated. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
any examples for nexus like tabs
the nexus repository browsers has all tabs any link opens in a new tab are there any examples of that kind in wicket? here a link for nexus repossitory https://repository.jboss.org/nexus/index.html#view-repositories -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/any-examples-for-nexus-like-tabs-tp2403699p2403699.html Sent from the Wicket - User 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: Scripting language
Try scala. Some people tried and it work. -original message- Subject: Re: Scripting language From: Sigmar Muuga meedi...@gmail.com Date: 01/09/2010 10:08 PM It depends, what do you want to do. If you want to develop your site in some scripting language, then use php or rails instead. I have seen groovy in some projects build scripts. Sigmar On Wed, Sep 1, 2010 at 2:10 PM, james yong i_yon...@yahoo.com.sg wrote: Hi all, Can anyone recommends a scripting language that can be used with Wicket for productivity? Regards, James -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Scripting-language-tp2402957p2402957.html Sent from the Wicket - User 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to get form submit to return to previous page?
I have a form/page that can be invoked from different pages so I can't easily specify which page should be returned to after submit. Given that the simple javascript code: history.go(-1) takes the user 'back' to the previous page I was wondering if I could somehow set up an IRequestTarget that would execute that javascript after the form is successfully submitted. Eg., public void onSubmit() { IRequestTarget rt = new some appropriate IRequestTarget class rt.add the javascript code getRequestCycle().setRequestTarget(rt); } Which IRequestTarget implementation class would I use for that, if any? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get form submit to return to previous page?
you would create one that would write out some html like htmlheadscripthistory.go(-2);/script/headbody//html -igor On Wed, Sep 1, 2010 at 4:26 PM, Chris Colman chr...@stepaheadsoftware.com wrote: I have a form/page that can be invoked from different pages so I can't easily specify which page should be returned to after submit. Given that the simple javascript code: history.go(-1) takes the user 'back' to the previous page I was wondering if I could somehow set up an IRequestTarget that would execute that javascript after the form is successfully submitted. Eg., public void onSubmit() { IRequestTarget rt = new some appropriate IRequestTarget class rt.add the javascript code getRequestCycle().setRequestTarget(rt); } Which IRequestTarget implementation class would I use for that, if any? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get form submit to return to previous page?
On 9/1/2010 7:26 PM, Chris Colman wrote: I have a form/page that can be invoked from different pages so I can't easily specify which page should be returned to after submit. When I needed to do this, I passed the original page into the page constructor where it was passed to the onSubmit() handler. Then the onSubmit() method set it as the return page: getRequestCycle().setResponsePage(_return_to_page); -- - Chris Merrill | Web Performance, Inc. ch...@webperformance.com| http://webperformance.com 919-433-1762| 919-845-7601 Web Performance: Website Load Testing Software Services - - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get form submit to return to previous page?
do not pass the page, pass the page reference, see page#getpagereference() -igor On Wed, Sep 1, 2010 at 6:21 PM, Chris Merrill ch...@webperformance.com wrote: On 9/1/2010 7:26 PM, Chris Colman wrote: I have a form/page that can be invoked from different pages so I can't easily specify which page should be returned to after submit. When I needed to do this, I passed the original page into the page constructor where it was passed to the onSubmit() handler. Then the onSubmit() method set it as the return page: getRequestCycle().setResponsePage(_return_to_page); -- - Chris Merrill | Web Performance, Inc. ch...@webperformance.com | http://webperformance.com 919-433-1762 | 919-845-7601 Web Performance: Website Load Testing Software Services - - 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