HTML validation
Hello *, I'm new to wicket. I use NetBeans 7.2/Linux. I'm trying to follow some examples, but NB doesn't validate wicket HTML files. Now I could live without validating them. However the NetBeans editor highlights syntax errors and that's a desirable feature, but it becomes an annoyance if any wicket string is seen as an error. For example, this file I copied from wicket examples: html xmlns:wicket=http://wicket.apache.org; head titleWicket Examples - Authentication/title link rel=stylesheet type=text/css href=style.css/ /head body span wicket:id=mainNavigation/ wicket:child / /body /html scores 3 errors in Netbeans plus some warnings. By the way, the w3c validator [1], fed with the same HTML files, reports the same errors of the Netbeans editor and then some. Both autodetect wicket HTML files as HTML 5. If I force them as XHTML 1.0 Transitional, by adding !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; at the top and xmlns=http://www.w3.org/1999/xhtml; in the html tag, w3c validator finds only two errors and NetBeans takes it showing only a couple of warnings. This could be an acceptable workaround for me, but I wonder if I'm doing something basically wrong. Is there a way to write valid HTML in wicket? [1]. http://validator.w3.org/check - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HTML validation
In data martedì 2 ottobre 2012 15:01:28, Martin Grigorov ha scritto: Hi, I use Intellij IDEA and here is what I did to suppress those errors: File - Settings - DTDs and Schemas - External DTDs and Schemas - Add button (+) - URI = http://wicket.apache.org , Location: /path/to/wicket-core.jar#META-INF/wicket-1.5.xsd Thanks, it was actually a farly logic solution... however in Netbeans the dialog window that appears after clicking DTDs and Schemas/Add Local DTD or Schema looks like this: http://www.virtual-bit.com/download/sparsi/adddtdschema.png What PUBLIC ID or SYSTEM ID should I enter? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
getInitParameter returns null
Hello *, I'm having troubles with WebApplication.getInitParameter() method. In the init() method of MyApp I call getInitParameter(myPar); It returns null. in web.xml I have filter filter-namewicket.MyApp/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter- class init-param param-nameapplicationClassName/param-name param-valueexample.MyApp/param-value /init-param init-param param-namemyPar/param-name param-valuemyValue/param-value /init-param [...] Why getInitParameter returns null instead of myValue? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getInitParameter returns null
In data sabato 13 ottobre 2012 11:53:54, vineet semwal ha scritto: i can't reproduce ,which wicket version and servlet container are you on? Wicket version 6.0 and not sure about the servlet container, because what's failing is the automatic tests Netbeans runs before running the app. My unit test creates the application instance, the instance calls init(), init() calls getInitParameter and then it throws an exception after the received null. No worries about the exception, it's correct it is being thrown on nulls, but that's making my unit test fail. I don't know what servlet container Netbeans uses when it runs tests. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getInitParameter returns null
In data sabato 13 ottobre 2012 12:37:33, Lucio Crusca ha scritto: I don't know what servlet container Netbeans uses when it runs tests. Btw, mvn test from command line fails also in the same way. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getInitParameter returns null
Ivineet semwal writes: i think others will tell if a jira ticket for this should be created or if i have overlooked something ;) https://issues.apache.org/jira/browse/WICKET-3099 Resolution: Won't fix (not a bug, it's so by design). Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket version
Hello *, I'm moving my first steps in wicket. Great framework btw, though it lacks a bit of fresh howtos for version 6.x. Never mind, let's go straigh to my questions: 1. API docs for 6.4-SNAPHOST are hosted at a http://.../6.0.x; url (or the other way around, API docs for 6.0.x are titled 6.4.0). How does 6.4 release relate to 6.0.x release? Is it a minor release and replaces 6.0.x transparently? 2. Assuming the reply to the previous question was yes, what should I put in my pom.xml to have my project depend on the latest 6.x available release? Is it a good idea to configure the wicket dependency that way? Thanks in advance Lucio. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket-library.com session expiring too early
Hello *, I try filing this bug (whishlist) here, because I haven't found any contact email on the wicket-library.com website. As a wicket newbie, I use wicket-library.com examples a lot. However reading through Java/HTML code, understanding what's going on, identifying relevant lines of code, copying them in your own project and testing them takes quite a bit of time. That time usually exceeds the configured time for the user session at wicket-library.com, at least for a newbie like me. That results in page expired messages when you go back to your browser window and click another source file to look at. You then have to go back to the website home, choose your example again and walk through the links to reach the source file you were looking for. All this makes the already steep (*) wicket learning curve even harder, because it breaks concentration while studying examples. Would it be possible to raise the session timeout at wicket-library.com? (*) in general pull-MVC frameworks are harder to learn than push-MVC ones, I don't mean to say it's a wicket specific challenge. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-library.com session expiring too early
In data lunedì 3 dicembre 2012 14:51:35, Martin Grigorov ha scritto: You can always download the .war file from http://central.maven.org/maven2/org/apache/wicket/wicket-examples/ and run them locally with as big session timeout as you need. Thanks, I've deployed locally. How do I raise the session timeout? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-library.com session expiring too early
In data lunedì 3 dicembre 2012 19:58:55, Lucio Crusca ha scritto: Thanks, I've deployed locally. How do I raise the session timeout? Never mind, I've found it: session-config session-timeout5/session-timeout in web.xml. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
what is Wicket 2.x?
Hello *, while reading this page https://cwiki.apache.org/WICKET/working-with-wicket-models.html I stumbled upon the following sentence: «NOTE: this page is about models like they exist for Wicket 1.x. The IModel interface is slightly changed in Wicket 2.x» What version of Wicket is 2.x? I'm aware of 1.x and 6.x, but never heard about 2.x... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: what is Wicket 2.x?
In data venerdì 7 dicembre 2012 20:06:45, Jeremy Thomerson ha scritto: Yep. There was a big change to constructors IIRC, although I can't remember exactly what the change was. Next came 1.3.0 with generics. Can I (we, you, ...) edit that sentence from the wiki pages then? It's confusing for newcomers like me. Does the IModel interface work as described in that page also in 6.x, except for generics? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Failed to execute goal
Hello there, today, trying to build my project, I get: [ERROR] Failed to execute goal on project SalixWeb: Could not resolve dependencies for project com.virtual_bit.salix.web:SalixWeb:war:1.0-SNAPSHOT: The following artifacts could not be resolved: javax.sql:jdbc-stdext:jar:2.0, javax.transaction:jta:jar:1.0.1B: Could not find artifact javax.sql:jdbc- stdext:jar:2.0 in wicket-menu-release (http://wicket- menu.googlecode.com/svn/maven/repo) - [Help 1] As I understand it, the problem seems related to wicket-menu, but that's all I understand. And I have no clue about what to do next... My pom.xml snippet: dependency groupIdcom.cooldatasoft/groupId artifactIdwicket-menu/artifactId version6.3.0/version typejar/type scopecompile/scope /dependency [...] repository idwicket-menu-release/id urlhttp://wicket-menu.googlecode.com/svn/maven/repo/url /repository repository idwicket-menu-snapshot/id urlhttp://wicket-menu.googlecode.com/svn/maven/snapshot- repo/url /repository repository Hints? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
JPA annotations
Hello *, I've started this short thread on the tomEE users ml: http://markmail.org/message/3asqvvptnkieknq5 The final answer sounds to me like if you want to use resources injection through JPA annotations in a wicket application, your best bet is Java-EE- Inject https://github.com/wicketstuff/core/wiki/Java-EE-Inject which in turn states that: With JavaEE Inject you can use in your wicket components three annotations: @EJB, @PersistenceUnit, @Resource. What about @Entity, @Table, @Id, @GeneratedValue and friends? What's the simplest way to use JPA annotations and dependency injection threreof in a wicket application? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: JPA annotations
In data venerdì 21 dicembre 2012 13:41:36, Martin Grigorov ha scritto: Hi, The page cannot be a bean, so it cannot be @Stateless. Better create a stateless EJB which has a reference to @PersistenceUnit: Thanks for pointing that out. class MyPage extends WebPage { @EJB private MyBean ejb; ejb.store(entity) } interface MyBean { void store(Entity entity) } @Stateless class MyBeanImpl implements MyBean { @PersistenceUnit private EntityManagerFactory emf; @Override public void store(Entity entity) { emf.getEntityManager().persist(entity); } } Ok, but what about Java-EE-Inject? Is that the standard (most widely used) way to integrate JPA (or hibernate) into wicket applications? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: JPA annotations
In data venerdì 21 dicembre 2012 15:10:11, Martin Grigorov ha scritto: I think Spring is still dominant in this area. Hmm, I've had a look, too much xml for my taste... what about Guice? Can it be used as alternative to Spring to have JPA annotations working with Wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: JPA annotations
In data venerdì 21 dicembre 2012 17:01:59, Martin Grigorov ha scritto: Spring Java Config, @Configuration, @Bean Ok thanks, but there are other things that make me prefer Guice over Spring, if possible. Is it possible? Can Guice be used to make JPA annotations work in wicket apps? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket examples: repeaters
Hello *, I'm trying to understand repeaters and DataTable from WicketExamples. I'm definitely having a hard time... http://www.wicket-library.com/wicket-examples-6.0.x/repeater/ The running example shows a nice table with sorting column headers. However looking at what pretends to be the corresponding source code, I can't find where the DataTablePage code adds the sorting table headers, nor where any third parties eventually refer to both DataTablePage and SortingPage, the latter being the only place where I see the headers being added. Likewise, DataTablePage is the only place where I see the CSV exporter being added, but the running example has both sorting columns and CSV exporter in the same table. I've tried copying DataTable.java in my application and adapting it, but (as expected) the resulting table has no sorting headers, though it does use a SortableDataProvider (same provider being used by SortingPage). Please help... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Unable to find property
Thanks to Sven, now my DataTable has sorting columns! However my next step is to add CSV export. I copied the code from the examples and added CSVDataExporter c_exp = new CSVDataExporter(); ExportToolbar et = new ExportToolbar(dataTable); et.addDataExporter(c_exp); dataTable.addBottomToolbar(new ExportToolbar(dataTable).addDataExporter(c_exp)); but when I try the app I get the following in the browser window: java.util.MissingResourceException: Unable to find property: 'datatable.export-file-name'. Locale: null, style: null at org.apache.wicket.Localizer.getString(Localizer.java:237) at org.apache.wicket.Localizer.getString(Localizer.java:149) at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java:76) at org.apache.wicket.model.ResourceModel.getObject(ResourceModel.java:33) at org.apache.wicket.extensions.markup.html.repeater.data.table.export.ExportToolbar.createExportLink(ExportToolbar.java:202) ... What part of the examples code did I miss this time? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Unable to find property
In data domenica 20 gennaio 2013 17:16:48, Sven Meier ha scritto: If you don't provide a filename to the ExportToolbar constructor, a String resource with key datatable.export-file-name is used. Normally a default is provided here: /wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.p roperties I'm not sure why this is not present in your setup. My project was depending on wicket-examples-6.0-SNAPSHOT, which in turn depends on wicket-extensions-6.0-SNAPSHOT, which in turn lacks that default in the above properties file. My final war was being built with both wicket-extensions-6.4.0 and wicket-extensions-6.0-SNAPSHOT and the latter eventually took precedence. It now works, except it exports only the first column of my DataTable... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Where did those CSS declarations come from?
Hello *, looking at wicket-examples sources I see a style.css that contains a few declarations (the whole file is 68 lines in my downloaded wicket-examples sources). After looking at the source code, I followed the repeater examples, built my own DataTablePage and copied style.css over into my project. The DataTable works like a charm, but the style is completely messed up (mostly absent). Looking at the page source in Firefox a reference to style.css shows up and clicking that reference it opens a file of 68 lines, just the same I have in my project sources, which, in turn, is a verbatim copy of what I can find in wicket examples sources. However when running the DataTable wicket example, in the page source from Firefox the reference to the css is just the same as mine (except a ../ less, but that's expected, my package name is shorter), but the same file is much longer (500 lines of CSS code), as if wicket added a bunch of declarations to it dynamically. How do I have wicket do the same in my project? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Where did those CSS declarations come from?
In data venerdì 25 gennaio 2013 13:36:57, Martin Grigorov ha scritto: https://github.com/apache/wicket/blob/master/wicket-examples/src/main/webap p/style.css#L500 I don't quite get it, can you please elaborate? My copy of wicket-examples source code has the 68-lines version of style.css. How come it uses the 500- lines version at runtime? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Where did those CSS declarations come from?
In data venerdì 25 gennaio 2013 15:13:12, Martin Grigorov ha scritto: The link I gave you shows that style.css has 500 lines. I'm not sure what file you copied and where you got it from. Now I'm not sure myself anymore... as it turns out it's plain false that my wicket-examples are using anything different from the 500-lines version. I have two copies of wicket-examples, one deployed and the other in source form, now I guess they do not match and I wonder where did I get the sources myself. Where can I download the source code for these wars? http://central.maven.org/maven2/org/apache/wicket/wicket-examples/ In data venerdì 25 gennaio 2013 15:14:04, Ernesto Reinaldo Barreiro ha scritto: Why don't you simply grab the one at https://github.com/apache/wicket/blob/master/wicket-examples/src/main/webap p/style.css ? I wasn't doing that because I was assuming the file was being generated runtime by wicket somehow... now I've grabbed it. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
FormComponent markup
Hello *, I have two classes, along the lines of: class A { String id; } class B { A manyBToOneA; String description; } I want to provide a single form such as: Id: Default description: [Submit] I plan to use two subclasses of FormComponent, so that one uses IModelA, the other usaes IModelB and they are reusable in other forms. What would be the HTML markup for the main form? Should I use two wicket:panel also if FormComponent is not a Panel? Should I use two div wicket:id=...? What if I prefer to avoid div-ing the different fields of the form? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FormComponent markup
In data sabato 2 febbraio 2013 14:54:41, Andrea Del Bene ha scritto: Hi, if you are planning to subclass a FormComponent (let's say a TextField for the id and a TextArea for the description) you don't need to use panels and you will bind your custom components to standard form's tags input type=text/ and texarea.../textarea Does that mean I'll have A.html like form input type=text ... / textarea.../textarea /form and then add my FormComponentA and FormComponentB instances directly to that Form? And that I won't have any FormComponentA.html / FormComponentB.html? IMHO the second component should uses both models: IModelB as main model and IModelA to retrieve the A object to assign to manyBToOneA. Makes sense. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FormComponent markup
In data sabato 2 febbraio 2013 22:28:11, Lucio Crusca ha scritto: Does that mean I'll have A.html like form input type=text ... / textarea.../textarea /form and then add my FormComponentA and FormComponentB instances directly to that Form? And that I won't have any FormComponentA.html / FormComponentB.html? Probably not, I suspect I haven't understood. I tried doing like stated above, but the FormComponent constructor wants an id, so now I assume that each FormComponent subclass instance has to provide a different id. That makes me wonder again how should I write the html files. I'm not able to explain why, but the following solutions seems wrong to me: form div wicket:id=formcomponentA input type=text ... / /div div wicket:id=formcomponentB textarea.../textarea /div form
Re: FormComponent markup
In data domenica 3 febbraio 2013 13:17:13, Andrea Del Bene ha scritto: To clarify a bit more, you should end up writing something like: form wicket:id=form input type=text wicket:id=formcomponentA / textarea wicket:id=formcomponentB.../textarea /form and Java code Form form = new Form(form); form.add(new FormComponentA(formcomponentA)); form.add(new FormComponentB(formcomponentB)); Thanks, now it seems clear. Last doubt, what if I have two or more texts in either FormComponent? Shouls I repeat wicket:id=FormComponentA for each one?
Re: FormComponent markup
In data domenica 3 febbraio 2013 14:57:46, Lucio Crusca ha scritto: In data domenica 3 febbraio 2013 13:17:13, Andrea Del Bene ha scritto: To clarify a bit more, you should end up writing something like: form wicket:id=form input type=text wicket:id=formcomponentA / textarea wicket:id=formcomponentB.../textarea /form and Java code Form form = new Form(form); form.add(new FormComponentA(formcomponentA)); form.add(new FormComponentB(formcomponentB)); Thanks, now it seems clear. Last doubt, what if I have two or more texts in either FormComponent? Shouls I repeat wicket:id=FormComponentA for each one? No, it's not clear to me once again, sorry, but the above suggestion does not fit the real case. Let's make a more concrete example. class Person { String firstname; String lastname; } class PhoneNumber { Person person; String dial; boolean mobile; } class PersonFormComponent extends FormComponentPerson { PersonFormComponent(Person p) { super(personFormComponent, new CompoundPropertyModel(p)); add(new TextField(firstname)); add(new TextField(lastname)); } } class PhoneNumberComponent extends FormComponentModelPhoneNumber { PhoneNumberComponent(PhoneNumber n) { super(phoneNumberFormComponent, new CompoundPropertyModel(n)); add(new TextField(dial)); add(new CheckBox(mobile)); } } class PersonForm { PersonForm(Person p) { super(personForm); add(new PersonFormComponent(personFormComponent, new CompoundPropertyModel(model)); PhoneNumber pn = findOrCreatePhoneNumber(p); add(new PhoneNumberFormComponent(phoneNumberComponent, pn); } } PersonForm.html: form wicket:id=personForm First Name:input type=text size=20 wicket:id=/ Last Name:input type=text size=20 wicket:id=/ ... Phone Number:input type=text size=20 wicket:id= / Mobile?input type=checkbox wicket:id= / /form What should I write in place of ? If I put the FormComponents IDs then the CompoundPropertyModels won't find the fields to bind. If I put the beans fields names, then the PersonForm constructor won't find the IDs to bind the whole FormComponent subclasses. Can you please show me the markup needed for the above example?
DropDownChoice not updating model
Hello *, I have a FormComponentPanel derived class that uses a DropDownChoice with a ChoiceRenderer. The DropDownChoice id matches the field name in my model class and I use a CompountPropertyModel wrapping my model instance for the component. Code snippets: class StreetAddress ... private String address; @ManyToOne private District idDistrict; ... usual getters and setters class StreetAddressFormCP extends FormComponentPanelStreetAddress ... super(myCompountPropertyModel)); add(new TextField(address)); add(new DropDownChoice(idDistrict, ...)); class StreetAddressForm extends FormStreetAddress ... super(myCompoundPropertyModel); add(new StreetAddressFormCP(myCompoundPropertyModel)); ... All seems to work except that when I edit an address and change district in the dropdown, my onSubmit receives a model with the old value for idDistrict (but new edited value for address), so that part of the edit is lost. Isn't DropDownChoice supposed to always update the model when the user selects an item/submits the form? P.S. onSubmit overridden on a Button behaves like stated above, while onSubmit overridden on the Form behaves differently: it receives a model with a null target... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DropDownChoice not updating model
In data giovedì 14 febbraio 2013 12:21:58, Sven Meier ha scritto: On 02/14/2013 12:01 PM, Ernesto Reinaldo Barreiro wrote: I don't know if this has anything to do... but make sure class StreetAddress implements equals If you use objects without overriden #equals() and #hashcode() and DropDownChoice you have several options: My StreetAddress and District classes DO have #equals() and #hashcode() overridden. Both #equals() check against the id (coming from the database) and their code has been generated by hibernate tools automatically. They contain a warning about cases where the id is not set (new District()...), but I think that could not do any harm to DropDownChoice in my case, since all the items are being loaded from the database and they have an id set for sure (it's the primary key). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DropDownChoice not updating model
In data Thursday 14 February 2013 12:59:05, Sven Meier ha scritto: Then the DropDownChoice should work fine. Try to create a quickstart please. You are so f***ing smart :) The quickstart just worked and showed me what I was doing wrong, basically this: District currentSelection = ... // retrieve current district from database if (currentSelection != null) myDropDownChoice.setModel(new CompoundPropertyModel(currentSelection)); which is a plain blunder because I was changing the model under the hood. The fix was quite easy: cut away those lines, since DropDownChoice already takes care of showing the currently selected item. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RepeatingView and FormComponentPanels
I've created three subclasses of FormComponentPanel, e.g. TextFormComponentPanel, CheckBoxFormComponentPanel and DropDownChoiceFormComponentPanel. They all share some markup logic in that they all have an enclosing label and a span for the text to use as label. However each class has its own markup file, because each one needs a different input type=... or select instead. Here is for example TextFormComponentPanel markup: wicket:panel label for=input wicket:id=inputLabelspan wicket:id=inputSpan[label text]/span input wicket:id=input id=input type=text size=50 //label /wicket:panel Then I created a FormComponentPanel derived class that uses a RepeatingView, and expects its derived classes to fill in the RepeatingView with instances of the three classes above. Those derived classes are the detail forms corresponding to my domain model beans. The problem is that TextFormComponentPanel, CheckBoxFormComponentPanel and DropDownChoiceFormComponentPanel html markup have fixed IDs for the input tags (I mean html id attributes, the ones referenced by label for=input). That's the recipe for a mess, because I end up with multiple html elements that have the same html id. I googled around and found AutoLabelResolver and AutoLabelTextResolver. I suspect those classes could help me, because they generate dynamic html IDs, but I failed to find an example that shows me how to use them. While it's clear to me how the markup should look, I can't get the java side. Any help?
CompoundPropertyModel binding direction
I'm trying to use CompoundPropertyModel in a form I dynamically create with a RepeatingView. I use the CompoundPropertyModel#bind method to bind each input tag to the corresponding java bean property. Binding from java bean to html does work (the fields get filled), while the other way around (onSubmit) does break... the reported error is no get method defined ... singlePanelForCurrentRow, where singlePanelForCurrentRow is the wicket:id I use to attach the repeating input tags. I don't know what to search for on Google, because searching obvious terms (CompoundPropertyModel binding and the like) yelds trivial examples, but nothing similar to my needs. Here is a quickstart demonstrating the issue, try clicking submit: http://www.virtualbit.it/download/sparsi/example.zip Thanks in advance Lucio. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: CompoundPropertyModel binding direction
In data Tuesday 19 March 2013 09:42:54, Sven Meier ha scritto: Hi Lucio, FormComponentPanels are an advanced concept and I'd recommend you extend org.apache.wicket.markup.html.panel.Panel until you really need the features of a FormComponentPanel. Thanks that solved the problem. BTW your HomePage shouldn't keep a reference to another page (i.e. DetailPage), since Wicket serialized pages separately. Well, to be honest I don't understand the full meaning of the sentence (why my design conflicts with Wicket serialization), but let's leave that to Google, I'll have a look. However I'm curious to know if a possible solution would be to create the DetailPage instance inside the onClick method of the Link, so that it becomes a local variable that gets collected asap. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
anything like AjaxEditableCheck?
I have a DataTable and I want to add a clickable checkbox to the rows. I've tried adding an AbstractColumn and a plain CheckBox in the cellItem along with its AjaxEventBehavior onclick, but the rendering process complains that Component [cell] (path = [51:table:body:rows:1:cells:5:cell]) must be applied to a tag of type [input], not: 'div wicket:id=cell' (line 0, column 0) I see there exists AjaxEditableLabel in wicket extensions, but no AjaxEditableCheck... I guess the problem is that DataTable assumes to output strings of text, not checkboxes... so any AjaxEditableFoo must comply with the underlying model, e.g. strings, not booleans... anyway, how do I add a clickable checkbox in populateItem of my AbstractColumn? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DataTable multiple sort columns
Hello *, is there a way/what's the cleaner way to support multiple sort columns with DataTable? I know it's up to the SortableDataProvider to provide sorted rows, no matter how, but the SortParam class seems to support only one sort criterium at a time. e.g. the DataTable is aware only of the *last* sorted column. Even if I kept track of other columns (e.g. previously clicked for sorting), I still have no clue about how to provide a visual feedback to the user about what columns are being included in the sort criteria. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable multiple sort columns
In data Tuesday 30 April 2013 19:14:12, Jesse Long ha scritto: Hi Lucio, Its something I'd be interested in pursuing myself, but the real problem is how to display the sort state to the user. How about this? ascii-art font=monospaced | |^ | ^ | | | Name 2 | Color 3 | Price | Available 1 | | v | | v | v | /ascii-art That would mean the primary sorting is by availability descending (1), then by name (2) descending and finally by color (3) ascending. Price is unsorted. Clicking a column, instead of only toggling direction, could switch between ascending, descending and unsorted. Clicking unsorted columns could make them be the primary sort column and shift other sort columns priority by 1. A more intuitive alternative would be to make the single arrows clickable, in addition to columns names, and clicking columns names would only toggle between sorted/unsorted states, with unsorted-sorted transition moving the column to the primary sort criteria as above. Would it be hard to obtain that with current wicket components? You could use a Palette type component as a top toolbar, allowing the user to add from available columns in the left to the sort columns in the right, and sort them in the order that they were added to the right hand side of the palette. That's another way to do it. I don't like it very much to be honest, but I guess it's only a matter of taste. You dont need to use SortableDataProvider (which supports SingleSortState), you can use any subclass of ISortableDataProvider and you can support whatever ISortState you want. Thanks for the hint, I hadn't realized that before. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Page expired and concurrent links
Hello *, I have a DataTable with a column of clickable checkboxes. Each time the user clicks a checkbox the server does some stuff on the database. If the user clicks another checkbox before the server finished processing the previous, he receives a Page Expired error. The behaviour is understandable, since the user obviously clicked a checkbox that was on a page that was being recreated, however I don't know how to avoid or workaround the problem. Any suggestions? Thanks in advance Lucio. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page expired and concurrent links
In data Friday 31 May 2013 17:34:31, Lucio Crusca ha scritto: Hello *, I have a DataTable with a column of clickable checkboxes. Each time the user clicks a checkbox the server does some stuff on the database. If the user clicks another checkbox before the server finished processing the previous, he receives a Page Expired error. The behaviour is understandable, since the user obviously clicked a checkbox that was on a page that was being recreated, however I don't know how to avoid or workaround the problem. I've partially solved the problem: it was being caused by an anonymous inner class in the page (CheckboxClickManager) that wasn't serializable. However making it serializable led to a different problem: now the user does not receive errors anymore, but the page he finally receives sometimes takes into account only a subset of the clicks. In other words, say the users clicks rows 1,2,3,4,5,6,7, then he waits for the server to finish processing all the clicks, and finally he receives a page where only rows 1 to 5 are checked (for example, maybe it's 1 to 3 or something). However I suspect this new problem is caused by hibernate not being able to lock database pages within 1 minute, though I'm not sure. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
cryptic error messages
Hi *, I have the following markup snippet: div wicket:id=repeatingDocTypes span wicket:id=docTypeNameOrders/spanbr/ hr/ div wicket:id=repeatingDocRef a href=# wicket:id=doclinkspan wicket:id=docid/span/abr/ /div /div which is bound to this code snippet: [...] RepeatingView rv = new RepeatingView(repeatingDocTypes); for (...) addDocTypeBox(rv, docs); private void addDocTypeBox(RepeatingView rv, ListDocument docs) { AbstractItem i = new AbstractItem(rv.newChildId()); i.add(new Label(docTypeName, getDocTypeDescription()); RepeatingView rdr = new RepeatingView(repeatingDocRef); i.add(rdr); for (Document d: docs) { AbstractItem docsummary = new AbstractItem(rdr.newChildId()); Link l = new Link(doclink) { ... }; docsummary.add(l); l.add(createSummaryPanel(docid, d)); rdr.add(docsummary); } rv.add(i); } Please note that the two for loops execute just 1 iteration each with my current test data. I get the following exception: Last cause: Unable to find component with id 'docTypeName' in [AbstractItem [Component id = 1]] Expected: 'footerPanel:repeatingDocTypes:1.docTypeName'. Found with similar names: 'footerPanel:repeatingDocTypes:2:docTypeName' which does shed some light on what's going on, but I find it hard to understand what do 1.docTypeName and 2:docTypeName mean. Where did those 1 and 2 come from? What information do they give me in order to spot the bug? Why is 1 followed by a dot while 2 is followed by a column? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: cryptic error messages [SOLVED]
I've found that between this line of code: RepeatingView rv = new RepeatingView(repeatingDocTypes); and these ones: for (...) addDocTypeBox(rv, docs); I actually had an extra rv.newChildId() hidden in calls which obviously bumped the next id value... Still I can't understand the dot Vs/ column reason, but I guess I can consider them equivalent, right? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Updating form fields on dropdown selection change
I have a DropDownChoice that should update some form fields when the user selects an item. My selection-changed-listener code is along the lines of: form.modelChanging(); T obj = model.getObject(); obj.setFoo(newSelection.getFoo()); obj.setBar(newSelection.getBar()); form.modelChanged(); form.clearInput(); form.visitChildren(); The problem is that without clearInput() the form fields do not update, while with clearInput they do update, but I loose any input also in fields other than FOO and BAR. I need a way to update only FOO and BAR fields and let other fields alone so that they keep their current user input. Thanks in advance for your help. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Updating form fields on dropdown selection change
Take a look at how one drop-down updates the other via Ajax in the Wicket Examples at: http://www.wicket-library.com/wicket-examples/ajax/choice Thanks for the suggestion, that code looks good. However I don't understand a number of things: 1. where wicket is made aware of the fact that the target is actually the models dropdown and not something else in the form? 2. the constructor 'new AjaxFormComponentUpdatingBehavior(onchange)' does not seem to exist in Wicket 6. Can I just use the no args constructor? 3. Can I use the AjaxRequestTarget to update a text field also, even if in the example it updates a dropdownchoice? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Updating form fields on dropdown selection change
I wrote: 2. the constructor 'new AjaxFormComponentUpdatingBehavior(onchange)' does not seem to exist in Wicket 6. Can I just use the no args constructor? Please ignore this one, I was using AjaxFormChoiceComponentUpdatingBehavior instead by mistake. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Updating form fields on dropdown selection change
1. where wicket is made aware of the fact that the target is actually the models dropdown and not something else in the form? I'm not sure I understand this question but I think the answer you're looking for is: because it has a behavior attached to a component to which you can gain access to its model. I would suggest you take a look over chapter 16 Working with AJAX of the Wicket Free Guide (http://wicket.apache.org/learn/books/freeguide.html). Sorry, it was so obvious that I didn't notice it, I'm not surprised you aren't sure to understand... the place where wicket is being made aware of what it should update is just inside the inner class in the only single method that's being called: target.add(models). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Updating form fields on dropdown selection change
Take a look at how one drop-down updates the other via Ajax in the Wicket Examples at: http://www.wicket-library.com/wicket-examples/ajax/choice I suggest you do something similar instead of trying to re-implement part of the form processing in your code. I've tried to follow that example and implement something similar in my code, however I had hard time in making it work (I didn't manage to) and I found there are two differences between sample code and my code that make me suspect it can't apply to my case. First, I use CompundPropertyModels instead of AbstractReadonlyModels, and they are so handy that it would be a real pity having to write models myself, but I hope that's doesn't make a real difference. Second I have a CompoundPropertyModel that manages the whole bean: the bean fields match the form fields, and one of those fields is the @ManyToOne (DropDownChoice) and it should update (onchange) a few other fields of the same bean, but not all of them. In the sample code there are two different models instead, one for each form field. For the DropDownChoice I create a PropertyModel on demand just for it, but I don't keep a reference to it. My code is: DropDownChoiceQ ddc = new DropDownChoice(id, new PropertyModelQ(instanceOfTheMany, manyToOneFieldName), elementsList, choiceRenderer); Please note that instanceOfTheMany is my bean with the @ManyToOne field and that the same bean is being managed by the CompoundPropertyModel in the form. Now changing that logic in my case is possible but quite troublesome, so I'd go down that path only if you tell me my current code is broken and it's the cause of my problems. Just in case you tell me that, if you could add some hint about how to make it correct it would be very appreciated. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Updating form fields on dropdown selection change
No replies... that must mean something... let's try rewording. I need to build several forms with: 1. Several text fields each, bound to several String properties of a single bean through a CompoundPropertyModel. This is a requirement unless it renders all the rest impossible to implement. 2. One DropDownChoice each, bound to a field of the same bean, likely through a PropertyModel, but this model type is not a requirement. 3. The DropDownChoice must update some of the text fields when the user selects an item while keeping input in other text fields intact. Is that possible at all with wicket? If yes, how? I've already tried adding an AjaxFormComponentUpdatingBehavior(onchange) to the DropDownChoice and, meanwhile, updating the bean String properties in the onSelectionChanged method, but doing so the text fields do not get updated in the form (or the update is reverted so fast I can't see it actually happened). The onSelectionChanged method is being called after the onUpdate method. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Updating form fields on dropdown selection change
Everything is possible. Just different tasks take different time to implement. What did you try and what issues you faced so far ? Please see my previous message. To recap, I tried a mix you just told me it can't work: I added the TextFields to the AjaxRequestTarget while updating the bean in the onSelectionChanged method. I didn't know they could not work together. onSelectionChanged() is non-Ajax update. Using AjaxFormComponentUpdatingBehavior(onchange) is Ajax update. Ok, but I need to know the selected item in order to update the String properties accordingly. AjaxFormComponentUpdatingBehavior(onchange) doesn't tell me the selected item, while onSelectionChanged seems to be the wrong way to accomplish what I'm trying to do (see the first post of Paul Bors in this thread). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Styling label tags
I need to dynamically set class=cssClassName to some label tags. Just now I set the label text with: myFormComponent.setLabel(...) but how do I change its css class? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Styling label tags
In data lunedì 26 agosto 2013 11:28:27, francois meillet ha scritto: have a look to http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup /html/form/FormComponentLabel.html and http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup /html/form/SimpleFormComponentLabel.html François I've had a look, but I'm afraid I need a little example. I have the following markup: wicket:panel label wicket:for=input span wicket:id=inputSpan[label text]/span input wicket:id=input type=checkbox / /label /wicket:panel and the following (simplified) java code: public class LabeledCheckbox extends Panel { public LabeledCheckbox(String id, String uiText, IModelBoolean model) { super(id); Label spanLabel = new Label(inputSpan, uiText); add(spanLabel.setRenderBodyOnly(false)); CheckBox cb = new checkBox(input, model); cb.setLabel(Model.of(uiText)); add(cb); setRenderBodyOnly(true); } } If I add a FormComponentLabel then I need to specify its wicket:id attribute, but I can't use both wicket:id and wicket:for attributes together. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: Styling label tags
In data martedì 27 agosto 2013 13:30:43, Collinson, Alasdair ha scritto: I would go a completely different route: add an AttributeModifier [1]. It should look something like this: Label label = new Label(label, Model.of(Text)); label.add(new AttributeModifier(class, Model.of(cssClassName))); But that route doesn't lead me to add the class attribute to the label tag, right? If wrong, can you please show me the corresponding markup? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: AW: Styling label tags
In data martedì 27 agosto 2013 14:46:03, Collinson, Alasdair ha scritto: It does. I don't agree: I can't see any label tags in your markup. I don't need to remove my label tags (and I don't want to), I need to dynamically add a class=cssClassName to them instead. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: AW: AW: Styling label tags
In data martedì 27 agosto 2013 15:12:01, Collinson, Alasdair ha scritto: So if you change the markup in my example to Do you see the following? -gt;label wicket:id=version1.5-SNAPSHOT/labellt;- It still works with the same Java-Code. Unfortunately not, because my label tags are part of a form, they have a wicket:for attribute referring to the corresponding input tags, and they can't have a wicket:id also. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AW: AW: AW: Styling label tags
In data martedì 27 agosto 2013 15:58:52, francois meillet ha scritto: try that form wicket:id=form label wicket:id=label_tag for=anything span wicket:id=label_tag_Text /span /label input wicket:id=name type=text size=40 id=anything /form Maybe that would work to some extent, but it would have at least the following issues: 1. it wouldn't pass HTML validation (label for=... must refer to an existing input id=...) 2. Given 1 above, it wouldn't be possible to reuse the panel in a RepeatingView and obtain valid HTML anymore, because in RepeatingViews Wicket needs wicket:for attribute in order to generate valid for=... and id=... pairs. 3. it wouldn't pass to the browser the information about what label matches what input field (the fact they invented the label tag must mean something, right?) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Styling label tags
In data mercoledì 28 agosto 2013 08:59:56, Lucio Crusca ha scritto: Maybe that would work to some extent, but it would have at least the following issues: [...] No more replies. Should I deduce there's no known solution? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Styling label tags
In data venerdì 30 agosto 2013 10:48:35, Martin Grigorov ha scritto: Hi Lucio, The suggested solution should work. Which one? I think I've tried all of them and reported issues here, but maybe I missed one. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Styling label tags
On Monday 02 September 2013 10:12:25 Martin Grigorov wrote: On Sat, Aug 31, 2013 at 10:18 AM, Lucio Crusca lu...@sulweb.org wrote: In data venerdì 30 agosto 2013 10:48:35, Martin Grigorov ha scritto: Hi Lucio, The suggested solution should work. Which one? I think I've tried all of them and reported issues here, but maybe I missed one. FormComponentLabel + AttributeModifier I didn't understand how I'm supposed to use the FormComponentLabel class, since wicket:id and wicket:for cannot be put together in the same label tag and I need a reusable and repeatable panel with a styled label tag inside. I asked for an example and Francois Meillet provided one, but his example didn't use the wiket:for attribute, which I need, and using a dummy for=anything is invalid HTML. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
filtering html proxy
Hello *, I need to build a page (maybe with Wicket, but not sure yet) that proxies another page on a different server that I do not own nor control in any way. Some background: let's call proxy my (wicket?) page, let's call backend the other page. Backend has a HTML form with three input fields and a submit button. When submitted, it shows a new form with two more input fields and a new submit button. The action URL of this second form changes with the previous three input fields. There are some fixed rules for this URL, but I don't know them. I only know that the same input values always yield the same action URL. When this second form is submitted, it shows a result from its database with a link. I need to take that link and save it in my database, in order to avoid filling in the two forms manually every time I need the link. Now my idea is to create a proxy page that loads the backend html, filters it changing all the action=... links and making them point to itself, so that it can intercept the form submission, act on its behalf, intercept the reply, save the result URL and show it to the final user. It would probably easier to do that with some scripting language, but this toy will grow up and become something serious, so I'd prefer starting off with some serious tool... I already have my Wicket-centric codebase and I'd like to reuse it, you see, so many things already done, but I fail to understand how to generate HTML code in Wicket the way it's needed for this pourpose, and I wonder if Wicket makes sense at all in this case. Any suggestions? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Make a Panel draggable
Hi everybody, I have a panel that contains a RepeatingView, which in turns generates a number of links. The links are generated based on the context (defined as current page and previous user actions). Just now the panel shows up in the top right corner of my webapp and it's above other things, and I'd like to let users move it where they want. My code now is: public class DataContextPanel extends Panel { public DataContextPanel(String id) { super(id); add(new Label(contextTitle, Context)); RepeatingView sels = new RepeatingView(repeating); fill(sels); add(sels); ... wicket:panel span wicket:id=contextTitle /span table cellspacing=0 class=dataview tr thType/th thValue/th thInhibit/th thForget/th /tr tr wicket:id=repeating tdspan wicket:id=tablenameDitta/spana href=# wicket:id=openDetailrArr;/a/td tdspan wicket:id=selectedrow/span/td tda href=# wicket:id=inhibitempty;/a/td tda href=# wicket:id=forgettimesb;/a/td /tr /table /wicket:panel and, in the page, I have a simple div as placeholder for it. I've tried to change the class and make it extend Draggable from wicket-jquery-ui instead of Panel, and changed wicket:panel to wicket:extend, but I got the following exception: org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. Possible reasons could be that: 1) you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered), 2) if your components were added in a parent container then make sure the markup for the child container includes them in wicket:extend. 1. [Component id = contextTitle] 2. [RepeatingView [Component id = repeating]] at org.apache.wicket.Page.checkRendering(Page.java:661) at org.apache.wicket.Page.onAfterRender(Page.java:818) at org.apache.wicket.markup.html.WebPage.onAfterRender(WebPage.java:215) at org.apache.wicket.Component.afterRender(Component.java:892) at org.apache.wicket.Component.render(Component.java:2319) at org.apache.wicket.Page.renderPage(Page.java:1010) ... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Teaming up remotely
Hello everybody, today I need to begin a project where, for the 1st time in my life, the team members won't work close to each other, and, again for the 1st time, I'm going to use Wicket in such a project. I'm in charge of writing all the code (mostly Java with Wicket being the framework of choice for the UI). The rest of the team is located about 700km from me and they're going to take care of HTML and CSS development. Are there any recognized best practices I should suggest them in HTML/CSS production in order to avoid problems on my side? E.g. is it usual asking for HTML files split into common header for all pages, common footer, common whatever and page specific content apart? Or is it more common to split them myself? How should we manage revisions? I could arrange for a bazaar server or the like, but how are those tools understood by web designers? Or should I take their files and manage conflicts and commits on my side without even telling them? But, then again, revision control works best on a line by line based comparison, and with Wicket I suspect conflicts will be the norm. E.g. suppose they change anything on their side in a HTML file that I already edited with wicket tags and committed to bzr: --- Their HTML file old: span class=myclass new: span class=myclass2 -- My HTML file committed: span class=myclass wicket:id=myid new: span class=myclass2 -- conflict (because they aren't aware of my edits and they can't be, unless they split HTML files in header, footer, whatever and use bzr themselves). I'm puzzled, that has to be a so common problem I hardly believe there's no standardized solution. Please advice. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Teaming up remotely
In data mercoledì 29 gennaio 2014 19:06:09, Steve ha scritto: The difficulty I would think is when you start to split up html files to seperate sections into their own panels. If the designer only has a view of the markup it may not be obvious to them where the subsection of the html has gone. Sure you can explain the concept of Panels to them but to be certain that a certain wicked:id equates to particular panel type and find the right markup file you need to look at the java code. The problem is actually even worse than that: the moment I start splitting up HTML files, their web design suite stops recognizing them (I think this is common to every web design suite out there, no matter which one). So they are somewhat forced to work without my revision control system, because they just can't use the files anymore after my edits (unless someone suggests a better solution). Maybe I should impose a rigid deadline on HTML modifications, after which they must ask me to edit anything? E.g. they must work on HTML before giving it to me. After that they can work only on CSS and ask me to edit class=... attributes as needed. Is this a reasonable solution? Is that even acceptable for designers? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Teaming up remotely
In data mercoledì 29 gennaio 2014 10:57:59, tho...@jarnot.de ha scritto: Is there really a need of splitting up the markup files? Well, I don't know, I mean, I've always split them up because a Wicket webapp is typically a collection of {1 java file, 1 html file by the same name} tuples. However I have to admit that I had already broke that pattern over time and it actually worked (e.g. derived java class but html file only for the base class). Do you think it's feasible to drive that practice to the extreme of having only 1 html file per page and several derived java classes? I'm afraid that model would suffer from a serious impedance mismatch against the OOP pattern, because you can't have one single MyAppPage java base class, but you are forced to create several java classes for each HTML page and use just panels inclusion in each one. I'm not saying that's not possible, but seems to me it's not very OOP-ish. Am i wrong? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
adding Foundation
Hello all, it's the 1st time I try to use Wicket with the Foundation Framework [1] (or any other css/js framework for that matter). Being one server side and the other client side I assumed there wasn't anything special to do in order to make them play toghether. I was wrong. I get: Unexpected RuntimeException Last cause: Tag does not have a close tag in a HTML5 file that otherwise (without wicket) passes W3C validation. The code: script $(document).foundation(); /script /body /html is being rendered by Wicket this way (btw why the hell is wicket touching that at all?): script /*![CDATA[*/ $(document).foundation(); /*]]*/ /script /body /html with /body and /html marked red in the output page. While searching for the possible cause, I found [2]: I don't know if the problem is because I did none of those steps, which seem needed to integrate jQuery and Foundation, but even if that were the cause, I need your help to understand how can I follow those instructions in the Wicket case. Thanks in advance, Lucio. 1. http://foundation.zurb.com/ 2. http://foundation.zurb.com/docs/javascript.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: adding Foundation
In data lunedì 12 maggio 2014 00:00:37, Martin Grigorov ha scritto: Hi, On Sun, May 11, 2014 at 11:50 PM, Lucio Crusca lu...@sulweb.org wrote: Hello all, it's the 1st time I try to use Wicket with the Foundation Framework [1] (or any other css/js framework for that matter). Being one server side and the other client side I assumed there wasn't anything special to do in order to make them play toghether. I was wrong. I get: Unexpected RuntimeException Last cause: Tag does not have a close tag This is an error at the server, right ? Which tag is not closed ? It does not tell me. It just tells that few words I already posted. in a HTML5 file that otherwise (without wicket) passes W3C validation. The code: script $(document).foundation(); /script /body /html There are no opening tags for body and html. I don't see how it is W3C valid! I posted only the last lines of a 690 lines W3C valid html file. I chose to post those lines because Wicket seems to fiddle with those and it marks the last two closing tags red. with /body and /html marked red in the output page. While searching for Marked red where ?! The browsers won't render them at all, colored or not! Again there are no opening tags for body and html, so it is normal to see them red if you paste this snippet in any HTML editor. In the output page I get an exception report, not the real page. Just below the exception (the two lines that do not tell which tag is open), before the stack trace, wicket reports the full html source code and /body and /html are red. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: adding Foundation
In data lunedì 12 maggio 2014 10:46:28, Martin Grigorov ha scritto: Please create a quickstart app demonstrating the issue. http://www.sulweb.org/download/sparsi/Quickstart.zip - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: adding Foundation
There are no opening tags for body and html. I don't see how it is W3C valid! I posted only the last lines of a 690 lines W3C valid html file. Anyway, if you need the whole file here it is: http://hastebin.com/ubuwodevet.xml - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
NPE in AbstractSingleSelectChoice
I'm pretty sure it's my fault, but I can't spot it. I'm trying to use a DropDownChoice with custom renderer and a PropertyModel, without a Form. I get a NullPointerException in AbstractSingleSelectChoice, here is the quickstart: http://www.sulweb.org/download/sparsi/quickstart.zip - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hard time with repeaters
In data sabato 24 maggio 2014 04:50:56, kumar ramanathan ha scritto: a beginner to learn how the flow works. Also I would like to know where to get the complete codes of examples discussed in the above books to practically try it in home. No idea where to get the code for those examples, since you don't even tell us exactly what examples you are interested in, however at the time I learnt repeaters I looked at Wicket Examples source code a lot and it proved very useful for me: http://www.wicket-library.com/wicket-examples/index.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hard time with repeaters
In data domenica 25 maggio 2014 21:11:49, kumar ramanathan ha scritto: Thanks Lucio. I have tried the example repeaters in wicket library site. In that if we try to open a source code for simple data view , many classes and files are coming , i am not able to try it in my desktop. Then I suspect you need to learn from the beginning, repeaters come later: http://wicket.apache.org/guide/guide/index.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hard time with repeaters
In data domenica 25 maggio 2014 21:11:49, kumar ramanathan ha scritto: Thanks Lucio. I have tried the example repeaters in wicket library site. In that if we try to open a source code for simple data view , many classes and files are coming , i am not able to try it in my desktop. Btw, you can download the whole wicket-examples package with source code here: http://central.maven.org/maven2/org/apache/wicket/wicket-examples/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
OnChangeAjaxBehavior.onUpdate() not called
I need to make a calculator like this: input text field x some fixed float value = the result input text field x some other fixed float value = the other result ... and so on for a variable number of rows... I need the user to input a number in one of the input text fields. I need the other input text fields to update themselves while the user types the number digits, so that all input fields show exactly the same number at any time. I need the results to update themselves also while the user types the digits. here is my html snippet wicket:container wiker:id=repeating input name=num type=text wicket:id=num value=10,00/input x span wicket:id=fixed5.2/span = span name=total wicket:id=total52/span /wicket:container and Java code: Label fixed = new Label(fixed, myFixedNumber); add(fixed); final TextField input = new TextField(input); add(input); input.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { // this never gets called } }); Label total = new Label(total); add(total); The problem is that onUpdate() never gets called. Please note that I'm not using any form because I do not need any (I don't need the user to submit anything), but I need to make calculations server side because the fixed value is known there. Is it possible to have onUpdate() called without using a form? if yes, what am I doing wrong? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: OnChangeAjaxBehavior.onUpdate() not called
everything looks OK to me check whether there are any JS errors in the browser's Dev Tools console. No errors. Can the fact that the input fields are inside a div that is initially hidden and then slid down via jQuery make a difference? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: OnChangeAjaxBehavior.onUpdate() not called
Well, by hidden do you mean an input type of hidden or not present on the DOM? I mean that I used jQuery to slideUp() the containing div in the $(document).ready(), so that when the page loads the div is not visible to the user and it becomes visible on some other event. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: OnChangeAjaxBehavior.onUpdate() not called [SOLVED]
Martin was right, there were Javascript errors, but for some reason the webconsole didn't display them the first time I looked at it. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: OnChangeAjaxBehavior.onUpdate() not called [PARTIALLY SOLVED]
Martin was right, there were Javascript errors, but for some reason the webconsole didn't display them the first time I looked at it. However the problem is only partially solved. onUpdate() now gets called, but only when the TextField looses focus. I need it to be called on every single keypress... is there anything I should do for that? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Empty FeedbackPanel
Here is a form: http://158.58.168.198/quotaly/wicket/bookmarkable/it.quotaly.web.Register here is the relevant html snippet: form class=inputForm wicket:id=registrationform fieldset legendInserisci i tuoi dati/legend div id=feedbackPanel span wicket:id=feedback/ /div div class=campoform label wicket:for=nome span class=inputformlabelspanNome */span span class=inputWrapper input type=text class=text_reg placeholder=nome wicket:id=nome /span /label /div [...] and java code: registrationform.add(new TextField(nome).setRequired(true)); registrationform.add(new FeedbackPanel(feedback)); If you click the Invia button (italian for Submit), the validation takes place (in fact my onSubmit() does not get called since many required fields are not filled in), but the FeedbackPanel remains empty (take a look at generated html). Similar code works in other wicket projects I've done, so I don't know what I'm doing different/wrong here... any clue? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: OnChangeAjaxBehavior.onUpdate() not called [PARTIALLY SOLVED]
How about an AjaxBehavior with the onChange event? Assuming you mean AjaxEventBehavior (because I couldn't find any AjaxBehavior class), I tried with change, onChange and onchange strings as event, but none of them seemed to work: the onEvent method was never called. On Jun 11, 2014, at 9:10 AM, Lucio Crusca lu...@sulweb.org wrote: Martin was right, there were Javascript errors, but for some reason the webconsole didn't display them the first time I looked at it. However the problem is only partially solved. onUpdate() now gets called, but only when the TextField looses focus. I need it to be called on every single keypress... is there anything I should do for that? - 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: Empty FeedbackPanel
Hi, Do you use Ajax submit ? If YES then you need to override #onError(AjaxRequestTarget, Form) add add the feedback to the target manually. What is Ajax submit? How do I check whether I'm using it? (I suspect the reply is no, you're not using it since you do not even know what it is). However I have a suspect, there's another strange thing in that form, maybe the two things are related: look at the five check boxes down the form, one of them doesn't show the image: http://158.58.168.198/quotaly/wicket/bookmarkable/it.quotaly.web.Register but if you look at the generated HTML, the image is actually there, and if you click the link in img src=... you actually see the image. Now, how that could be a cause or consequence of missing FeedbackPanel is beyond any stretch of my imagination, but those two things share a common fact: both do not show up when they should. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: OnChangeAjaxBehavior.onUpdate() not called [PARTIALLY SOLVED]
OnChangeAjaxBehavior is the right way. It uses either 'input' event when supported or 'cut'+'paste'+'keydown' when 'input' is not supported by the browser. Which browser do you use ? Tested with IceWeasel 24.4.0, Chrome 33 for Linux and Firefox 27 for Windows. You can always use AjaxFormComponentUpdatingBehavior(keyup) but it will fire even when you use keys like ESC, F2, etc. You can filter those with AjaxCallListener's precondition. But I haven't any forms. May I use AjaxFormComponentUpdatingBehavior nevertheless? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: rant level=8/10 Empty FeedbackPanel
Wow! IMHO your answer is very un-respectful even if you don't notice it. Your first message to this list is from January 2013... and you still don't know what is an AJAX submit? Time to start reading a bit about the framework you are using? Instead of expecting people to solve your problems ;-) *MY* reply is un-respectful? Did you really say *THAT*? FYI: I've been using wicket since then and I never needed an Ajax submit (I still don't need it now). Why should I study something I don't need? And, while I'm at it, Wicket is well known for being powerful but poorly documented. Wicket enthusiasts reply saying that Wicket has a wonderful active community that can help you and provide for the lack of documentation, hence people is more inclined to ask the community rather than to study a sub-optimal documentation. Moreover I don't expect anyone doing anything: I just ask, if someone is so kind as to reply, so good. If no one replies it means I asked in the wrong place or in the wrong way. But if I get such harsh replies like yours, I assume either you are a troll or you've had a bad day, now you choose, I suspect the latter, since you are into wicket much more than many others on this list. However please take note: I'm sorry for you but I'm not guilty for your bad day. And, while you spend your valuable time into looking at my past messages, please observe that I even tried to help others at least once I remember of, maybe a few times, the few times I felt like I could actually help. I know, you've done much more than me for this community, and I hope one day I will have your reputation and deserve your respect, but that day, if it ever comes, I'll try to be kind to others too, which is not an optional behavior even when you are a wicket expert. That being said, I wish you all the best nevertheless. /rant - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Empty FeedbackPanel
Ajax submit is when you use AjaxSubmitLink or AjaxButton for the input type=submit I just checked and it seems you don't use any of these. Do you override Form#onError() or Button#onError() and what do you do there ? None of them. I only override Button#onSubmit(). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Empty FeedbackPanel
If you are able to reproduce this in a mini application (a quickstart app) then please attach it to a ticket in Jira and we will see what is going wrong. Thanks: https://issues.apache.org/jira/browse/WICKET-5614 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket-jquery-ui DatePicker JS problems
Hi all, I'm trying to add a (kendo?) DatePicker to my form, in other words this one: http://www.7thweb.net/wicket-jquery-ui/datepicker/DefaultDatePickerPage I think I've done everything listed here, adapting things to my needs: http://www.7thweb.net/wicket-jquery-ui/ but the javascript console is showing this error and the DatePicker doesn't show up: TypeError: jQuery(...).datepicker is not a function This makes me suspect I haven't linked all the necessary js files to my HTML code and, to be honest, I'm afraid it's more than a suspect: I know I haven't, because the instructions do not tell to do that, and I assumed that was going to happen automagically... More precisely, I didn't download nor link the jquery-ui js files, nor the kendo ones. I only dowloaded, copied and linked the jquery-ui and kendo css files. Should I provide for the js files also? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-jquery-ui DatePicker JS problems
In data lunedì 23 giugno 2014 14:41:37, Sebastien ha scritto: Hi Lucio, You guessed right, JS libraries are embedded in the jar(s), and attached to the page as soon as you use a jquery-ui/kendo component. Please check either: - the wicket-jquery-ui jars are well deployed. What should I do to check that? I've already looked at page source and the js links are working (see below). - the js are well included in the page's head I have this right after head script type=text/javascript src=../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0- ver-139768759.js/script script type=text/javascript src=../resource/com.googlecode.wicket.jquery.core.resource.JQueryUIResourceReference/jquery- ui-1.10.4.custom-ver-1398510244000.js/script script type=text/javascript id=jquery-datepicker-1401590941 /*![CDATA[*/ jQuery(function() { jQuery('#datanascita3f').datepicker({ }); }); /*]]*/ /script If I remember correctly, somebody had a similar problem (I dont remember what was the issue), please have a look in the archives... Already tried, but I haven't found anything similar, maybe it's not immediately obvious from the message subject that the issue is what I'm looking for. Google didn't help either. However I have (another) suspect: could my custom ready() function conflict with jquery-ui/kendo/whatever? $(document).ready(function(){ $(.euro1).next(ul).slideUp(1); $(.tab_schedina).slideUp(1); $(.tab_quotemigliori).slideUp(1); $(.compara_link).slideUp(1); $(.euro1).click(function(){ $(this).next(ul).slideToggle(1000); }); $(.dic_schedina).click(function(){ $(.tab_schedina).slideToggle(600); $(.tab_quotemigliori).slideToggle(600); $(.compara_link).slideToggle(600); }); }); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow positioning
Hi *, In a long page I need a ModalWindow to position itself at the center of the browser window even when the page is scrolled way down, so that the ModalWindow always pops up in front of the user. I've found this [1], but it dates back to 2009, and it refers to an old versions of Wicket (1.3.x). I've tried nevertheless (I'm using 1.6.15), but the JS code seems to be just ignored and nothing happens, e.g. the ModalWindow still shows in the usual position near the top of the page, so the user has to scroll back up to understand why the page stopped processing his input. Can you please provide up to date hints? [1] http://apache-wicket.1842946.n4.nabble.com/Modal-window-position-always-centred-even-on-long-page-td1889257.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
In data mercoledì 25 giugno 2014 09:49:51, Martin Grigorov ha scritto: Hi, What exactly you tried and it didn't work ? I added the code below, but please note that I'm no JS wizard, so it's likely my code wouldn't work anyway, but the point is I don't even get JS errors and the ModalWindow behaves just like my code wasn't there, so either my code is being actually skipped or it is the exact equivalent of what the default wicket code does (unlikely): Wicket.Window.prototype.center = function() { var myWindow = Wicket.Window.get(); if (myWindow) { myWindow.css(position, fixed); myWindow.css(top, Math.max(0, (($(window).height() - $(myWindow).outerHeight()) / 2)) + px); myWindow.css(left, Math.max(0, (($(window).width() - $(myWindow).outerWidth()) / 2)) + px); } }; I add this code in by including a js file in renderHead of my page and I confirm the code is there when I look at page source in the browser. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
In data mercoledì 25 giugno 2014 11:09:42, Martin Grigorov ha scritto: Make sure that your code appears *after* the script src=.../modal.js. With the browser Dev Tools you can put a breakpoint inside your function and see whether it is called/used. I couldn't manage to set a breakpoint with Firebug, so I added two window.alert(). The first, before the if, gets hit, not the second, so now I wonder what's the code that is centering the window, since my code is executed but it does absolutely nothing... And, I obviously don't know what to write instead of Wicket.Window.get() in order to make the if condition true. Wicket.Window.prototype.center = function() { window.alert(!!); var myWindow = Wicket.Window.get(); if (myWindow) { window.alert(); myWindow.css(position, fixed); myWindow.css(top, Math.max(0, (($(window).height() - $(myWindow).outerHeight()) / 2)) + px); myWindow.css(left, Math.max(0, (($(window).width() - $(myWindow).outerWidth()) / 2)) + px); } }; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning [SOLVED]
In data mercoledì 25 giugno 2014 14:54:23, Martin Grigorov ha scritto: also try: this.window Ok thanks, this.window seems to be the correct one in my case, but I suspect other variants are needed to be as much cross browser as possible. Just in case others need it, my current working code is: Wicket.Window.prototype.center = function() { var myWindow = this.window; if (!myWindow) myWindow = Wicket.Window.current; if (!myWindow) myWindow = Wicket.Window.get(); if (myWindow) { $(myWindow).css(position, fixed); $(myWindow).css(top, Math.max(0, ((window.innerHeight - $(myWindow).outerHeight) / 2)) + px); $(myWindow).css(left, Math.max(0, ((window.innerWidth - $(myWindow).outerWidth) / 2)) + px); } }; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
I always forget I should not change the subject, sorry... I send the message again with the unchanged subject so that it remains attached to the rest of this thread. In data mercoledì 25 giugno 2014 14:54:23, Martin Grigorov ha scritto: also try: this.window Ok thanks, this.window seems to be the correct one in my case, but I suspect other variants are needed to be as much cross browser as possible. Just in case others need it, my current working code is: Wicket.Window.prototype.center = function() { var myWindow = this.window; if (!myWindow) myWindow = Wicket.Window.current; if (!myWindow) myWindow = Wicket.Window.get(); if (myWindow) { $(myWindow).css(position, fixed); $(myWindow).css(top, Math.max(0, ((window.innerHeight - $(myWindow).outerHeight) / 2)) + px); $(myWindow).css(left, Math.max(0, ((window.innerWidth - $(myWindow).outerWidth) / 2)) + px); } }; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
In data mercoledì 25 giugno 2014 18:05:54, Lucio Crusca ha scritto: Just in case others need it, my current working code is: Wicket.Window.prototype.center = function() { var myWindow = this.window; if (!myWindow) myWindow = Wicket.Window.current; if (!myWindow) myWindow = Wicket.Window.get(); if (myWindow) { $(myWindow).css(position, fixed); $(myWindow).css(top, Math.max(0, ((window.innerHeight - $(myWindow).outerHeight) / 2)) + px); $(myWindow).css(left, Math.max(0, ((window.innerWidth - $(myWindow).outerWidth) / 2)) + px); } }; No, this code works only in my development environment (localhost:8084). Once deployed to the real domain, the screen dims but the ModalWindow does not show up, even using the same browser I use in development tests (I guess it actually shows up but it falls outside the browser window, but I'm not sure). There's no noticeable difference between development and production environments, except the Tomcat and Apache versions, but I fail to see how those could interfere with javascript. The only strange thing is that the JS console is showing an error in both cases, but in development it seems harmless: Error: Permission denied to access property 'toString' and this error has no reference to any particular line of code in any particular js file, so I don't even know if it is my mistake and where. Any clues about why my code could behave differently in the same browser between development and deployment environments? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AuthenticatedWebSession.authenticate() not being called
Hi all, in a webapp that worked until yesterday (and that has worked for the last 2 years), the AuthenticatedWebSession.authenticate() method is not being called anymore. I have MySession class that extends AuthenticatedWebSession. The MySession constructor gets called correctly. I use a standard SignInPanel: when I click Sign in the page reloads but the code execution doesn't reach the breakpoint at the first line of authenticate() in MySession. The authenticate() method does have the @Override annotation, so I'm sure it has the correct signature. Changes I've made since yesterday are only to the css, some HTML, a few new initParameters in web.xml, but nothing directly related to the login process... any clue about what could be causing that behavior? What should I check first? Btw, no, I didn't commit the code yesterday before those changes, so now I can't revert, my bad. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AuthenticatedWebSession.authenticate() not being called
Hi all, in a webapp that worked until yesterday (and that has worked for the last 2 years), the AuthenticatedWebSession.authenticate() method is not being called anymore. I have MySession class that extends AuthenticatedWebSession. The MySession constructor gets called correctly. I use a standard SignInPanel: when I click Sign in the page reloads but the code execution doesn't reach the breakpoint at the first line of authenticate() in MySession. The authenticate() method does have the @Override annotation, so I'm sure it has the correct signature. Changes I've made since yesterday are only to the css, some HTML, a few new initParameters in web.xml, but nothing directly related to the login process... any clue about what could be causing that behavior? What should I check first? I've made some progress in trying to understand what's going on, but I still haven't found a solution. When I click Sign in, wicket creates a new instance of my SalixSignInPage.java using the default constructor: it is a simple page that contains only the SignInPanel. No error messages reported. I'm using wicket 6.16. Here is the call stack: SalixSignInPage.init:30 NativeConstructorAccessorImpl.newInstance0 NativeConstructorAccessorImpl.newInstance:62 DelegatingConstructorAccessorImpl.newInstance:45 Constructor.newInstance:408 DefaultPageFactory.newPage:175 DefaultPageFactory.newPage:67 DefaultMapperContext.newPageInstance:133 PageProvider.resolvePageInstance:268 PageProvider.getPageInstance:166 ListenerInterfaceRequestHandler.getPage:96 ListenerInterfaceRequestHandler.respond:157 RequestCycle$HandlerExecutor.respond:862 RequestHandlerStack.execute:64 RequestCycle.execute:261 RequestCycle.processRequest:218 RequestCycle.processRequestAndDetach:289 WicketFilter.processRequestCycle:259 WicketFilter.processRequest:201 WicketFilter.doFilter:282 [...] Does this shed some light? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AuthenticatedWebSession.authenticate() not being called
While debugging the problem I first moved to Wicket 6.17 and then set a breakpoint in SignInPanel.java (Wicket sources) at line 310, which is the first line of the onSubmit() method of the SignInForm Wicket class. That breakpoint does not get hit: Wicket, in response to the HTTP request generated by the SignInForm submit button, creates a new SalixSignInPage and does not call onSubmit() on the existing form. Puzzled. I try to create a quickstart, but the real problem is that I'm pretty sure the quickstart will work perfectly. Even my code has worked perfectly for the last 2 years... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AuthenticatedWebSession.authenticate() not being called
Puzzled. I try to create a quickstart, but the real problem is that I'm pretty sure the quickstart will work perfectly. Even my code has worked perfectly for the last 2 years... Here is a quickstart-like piece of code showing the problem (I obtained it by cutting away unneded pieces from my project): http://www.sulweb.org/download/sparsi/swquick.zip any user/password will do (i.e. the code would accept any of them, but they won't work anyway). I expect this code to login any user with any password and reach AuthenticatedPage. It reloads the SignInPage instead and the authenticate() method never gets called. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AuthenticatedWebSession.authenticate() not being called
Puzzled. I try to create a quickstart, but the real problem is that I'm pretty sure the quickstart will work perfectly. Even my code has worked perfectly for the last 2 years... Here is a quickstart-like piece of code showing the problem (I obtained it by cutting away unneded pieces from my project): http://www.sulweb.org/download/sparsi/swquick.zip any user/password will do (i.e. the code would accept any of them, but they won't work anyway). I expect this code to login any user with any password and reach AuthenticatedPage. It reloads the SignInPage instead and the authenticate() method never gets called. Now I've also tried with a real, minimal quickstart, and it works (obviously). However I still can't spot the problem in my code. Please help. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AuthenticatedWebSession.authenticate() not being called
I've moved one step forward: the authenticate() method now gets called if I use the SignInPage class included in wicket-auth-roles instead of my own SignInPage. However, as you can see in the code I posted yesterday, my SignInPage is very simple and, compared to the one bundled with wicket, it only has a additional Label and some minor html differences. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Atom newsfeed link
Hello, I've followed this guide to create a Atom feed link with Wicket and Rome: http://wicket.apache.org/guide/guide/resources.html at paragraph 15.9 Custom resources. However when I use the link to the newsfeed in google feedburner http://feedburner.google.com, it does not recognize it and even web browsers, when opening the feed link, are actually redirected to the page containing the link, thus receiving HTML code, instead of the XML feed. How do I create a bookmarkable link to the custom resource itself instead of the page containing it? Here is the feed link: http://goo.gl/we1CG7 And my java code is just a copypaste of the tutorial linked above. Any help appreciated, thanks in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Tristate boolean
Hello, I have a sql field that is a BOOLEAN, which allows for NULL also. So it can be TRUE, FALSE, or NULL. I need a component to let the user set that field to one of the three states. I'm thinking about using two checkboxes, one for TRUE, the other for FALSE and when neither is checked it means NULL. A bit of javascript would then avoid the both checked state. Is there anything like that ready to use? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tristate boolean
In data lunedì 17 novembre 2014 14:22:11, Martin Grigorov ha scritto: https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/master/bootstrap-extensi ons/src/main/java/de/agilecoders/wicket/extensions/markup/html/bootstrap/for m/checkboxx/CheckBoxX.java Thanks, I've tried it but I've not managed to make it work, the checkbox never changes state on click. Here is what I've done so far: 1. added maven dependency: dependency groupIdde.agilecoders.wicket/groupId artifactIdwicket-bootstrap-extensions/artifactId version0.9.7/version /dependency 2. added input tag to my form input wicket:id=input type=checkbox / 3. added a CheckBoxX in java code: form.add(new CheckBoxX(input, model.Booleanbind(rewind))); where model is a CompoundPropertyModelMyBean and MyBean has a private Boolean rewind; // along with getter and setter I have a suspect though: should I include Bootstrap myself in order to use CheckBoxX? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
CheckBoxX style (wicket-bootstrap)
Hello, I'm using some CheckBoxX instances and I'd like to apply a style to them. I want the true state to be shown as U+2713 (✓), the false state to be shown as U+2717 (✗) and the undefined state to be shown as a question mark (?). Moreover I want to make the box (or symbols) size the same as the usual wicket CheckBox component, whatever it is (I've not changed it from the default in my custom style.css). The CheckBoxX default size seems to be way bigger than the CheckBox one. What's the standard way to make those changes to CheckBoxX? Is it possible at all to use CSS to change the characters shown for each state? (e.g. I'd rather avoid using bitmaps for the states instead of unicode characters). Thanks in advance, Lucio. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org