[jira] [Updated] (WICKET-6666) Rewrite ModalWindow
[ https://issues.apache.org/jira/browse/WICKET-?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-: -- Component/s: ModalDialog > Rewrite ModalWindow > --- > > Key: WICKET- > URL: https://issues.apache.org/jira/browse/WICKET- > Project: Wicket > Issue Type: New Feature > Components: ModalDialog >Affects Versions: 9 > Reporter: Igor Vaynberg >Priority: Major > Labels: Modal, ModalWindow, modal, modalwindow > > This is a proposed rewrite of ModalWindow called ModalDialog we have been > using for a while with success. > > It doesnt have all the features of ModalWindow, but it is more modern in its > client side implementation and is ADA compliant. > > It still needs some polishing in terms of javadoc and examples -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (WICKET-6666) Rewrite ModalWindow
[ https://issues.apache.org/jira/browse/WICKET-?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-: -- Affects Version/s: 9 > Rewrite ModalWindow > --- > > Key: WICKET- > URL: https://issues.apache.org/jira/browse/WICKET- > Project: Wicket > Issue Type: New Feature >Affects Versions: 9 >Reporter: Igor Vaynberg >Priority: Major > Labels: Modal, ModalWindow, modal, modalwindow > > This is a proposed rewrite of ModalWindow called ModalDialog we have been > using for a while with success. > > It doesnt have all the features of ModalWindow, but it is more modern in its > client side implementation and is ADA compliant. > > It still needs some polishing in terms of javadoc and examples -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (WICKET-6666) Rewrite ModalWindow
Igor Vaynberg created WICKET-: - Summary: Rewrite ModalWindow Key: WICKET- URL: https://issues.apache.org/jira/browse/WICKET- Project: Wicket Issue Type: New Feature Reporter: Igor Vaynberg This is a proposed rewrite of ModalWindow called ModalDialog we have been using for a while with success. It doesnt have all the features of ModalWindow, but it is more modern in its client side implementation and is ADA compliant. It still needs some polishing in terms of javadoc and examples -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (WICKET-6626) Introduce application-wide Component#onComponentTag listeners
[ https://issues.apache.org/jira/browse/WICKET-6626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-6626: -- Description: Such a listener will be useful for implementing application-wide styling as well as outputting debug information. see IOnComponentTagListener and Application#getOnComponentTagListeners() to get started. was:Such a listener will be useful for implementing application-wide styling as well as outputting debug information. > Introduce application-wide Component#onComponentTag listeners > - > > Key: WICKET-6626 > URL: https://issues.apache.org/jira/browse/WICKET-6626 > Project: Wicket > Issue Type: New Feature > Components: wicket >Reporter: Igor Vaynberg > Assignee: Igor Vaynberg >Priority: Minor > Fix For: 8.3.0, 9.0.0, 7.12.0 > > > Such a listener will be useful for implementing application-wide styling as > well as outputting debug information. > > see IOnComponentTagListener and Application#getOnComponentTagListeners() to > get started. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (WICKET-6626) Introduce application-wide Component#onComponentTag listeners
[ https://issues.apache.org/jira/browse/WICKET-6626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-6626. --- Resolution: Fixed > Introduce application-wide Component#onComponentTag listeners > - > > Key: WICKET-6626 > URL: https://issues.apache.org/jira/browse/WICKET-6626 > Project: Wicket > Issue Type: New Feature > Components: wicket >Reporter: Igor Vaynberg > Assignee: Igor Vaynberg >Priority: Minor > Fix For: 8.3.0, 9.0.0, 7.12.0 > > > Such a listener will be useful for implementing application-wide styling as > well as outputting debug information. > > see IOnComponentTagListener and Application#getOnComponentTagListeners() to > get started. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (WICKET-6626) Introduce application-wide Component#onComponentTag listeners
Igor Vaynberg created WICKET-6626: - Summary: Introduce application-wide Component#onComponentTag listeners Key: WICKET-6626 URL: https://issues.apache.org/jira/browse/WICKET-6626 Project: Wicket Issue Type: New Feature Components: wicket Reporter: Igor Vaynberg Assignee: Igor Vaynberg Such a listener will be useful for implementing application-wide styling as well as outputting debug information. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (WICKET-6626) Introduce application-wide Component#onComponentTag listeners
[ https://issues.apache.org/jira/browse/WICKET-6626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-6626: -- Fix Version/s: 7.12.0 9.0.0 8.3.0 > Introduce application-wide Component#onComponentTag listeners > - > > Key: WICKET-6626 > URL: https://issues.apache.org/jira/browse/WICKET-6626 > Project: Wicket > Issue Type: New Feature > Components: wicket >Reporter: Igor Vaynberg > Assignee: Igor Vaynberg >Priority: Minor > Fix For: 8.3.0, 9.0.0, 7.12.0 > > > Such a listener will be useful for implementing application-wide styling as > well as outputting debug information. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (WICKET-6623) Consecutive Temporary Behaviors are not properly removed
[ https://issues.apache.org/jira/browse/WICKET-6623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-6623. --- Resolution: Fixed Fix Version/s: 9.0.0 8.3.0 7.11.0 > Consecutive Temporary Behaviors are not properly removed > > > Key: WICKET-6623 > URL: https://issues.apache.org/jira/browse/WICKET-6623 > Project: Wicket > Issue Type: Bug > Reporter: Igor Vaynberg >Assignee: Igor Vaynberg >Priority: Major > Fix For: 7.11.0, 8.3.0, 9.0.0 > > > If two temporary behaviors happen to be one after the other in component's > data the second one will not be removed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (WICKET-6623) Consecutive Temporary Behaviors are not properly removed
Igor Vaynberg created WICKET-6623: - Summary: Consecutive Temporary Behaviors are not properly removed Key: WICKET-6623 URL: https://issues.apache.org/jira/browse/WICKET-6623 Project: Wicket Issue Type: Bug Reporter: Igor Vaynberg Assignee: Igor Vaynberg If two temporary behaviors happen to be one after the other in component's data the second one will not be removed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (WICKET-6604) Ajax repaint is not correctly handled when component being repainted has an enclosure associated with it and is not a child of the enclosure
[ https://issues.apache.org/jira/browse/WICKET-6604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16668883#comment-16668883 ] Igor Vaynberg commented on WICKET-6604: --- forgot, its there now. > Ajax repaint is not correctly handled when component being repainted has an > enclosure associated with it and is not a child of the enclosure > > > Key: WICKET-6604 > URL: https://issues.apache.org/jira/browse/WICKET-6604 > Project: Wicket > Issue Type: Bug >Affects Versions: 7.10.0, 8.1.0 > Reporter: Igor Vaynberg > Assignee: Igor Vaynberg >Priority: Minor > Labels: ajax > Fix For: 7.11.0, 8.2.0 > > > When a component is repainted with ajax we first check if that component is a > controlling component of the enclosure and if it is we repaint the enclosure > instead of the component. However, we make the assumption that the > controlling component of the enclosure is always contained within the > enclosure, which may not always be true with inline enclosures. > For example: > {code:java} > Name > {code} > In this case the inline enclosure will only encompass the label. So if we > repaint the textfield by adding it to the ajax request handler we will get a > strange result where any header contributions associated with the name > component will get rendered, but the markup for the name component will not - > because we make the assumption that since it is controlling an enclosure it > is also inside it so there is no point in repainting it directly. > > One may argue that controlling components have to be inside the enclosure and > we should throw an error if they are not, but I prefer this more flexible > approach which allows the controller to be outside. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (WICKET-6604) Ajax repaint is not correctly handled when component being repainted has an enclosure associated with it and is not a child of the enclosure
[ https://issues.apache.org/jira/browse/WICKET-6604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-6604. --- Resolution: Fixed > Ajax repaint is not correctly handled when component being repainted has an > enclosure associated with it and is not a child of the enclosure > > > Key: WICKET-6604 > URL: https://issues.apache.org/jira/browse/WICKET-6604 > Project: Wicket > Issue Type: Bug >Affects Versions: 7.10.0, 8.1.0 > Reporter: Igor Vaynberg > Assignee: Igor Vaynberg >Priority: Minor > Labels: ajax > Fix For: 7.11.0, 8.2.0 > > > When a component is repainted with ajax we first check if that component is a > controlling component of the enclosure and if it is we repaint the enclosure > instead of the component. However, we make the assumption that the > controlling component of the enclosure is always contained within the > enclosure, which may not always be true with inline enclosures. > For example: > {code:java} > Name > {code} > In this case the inline enclosure will only encompass the label. So if we > repaint the textfield by adding it to the ajax request handler we will get a > strange result where any header contributions associated with the name > component will get rendered, but the markup for the name component will not - > because we make the assumption that since it is controlling an enclosure it > is also inside it so there is no point in repainting it directly. > > One may argue that controlling components have to be inside the enclosure and > we should throw an error if they are not, but I prefer this more flexible > approach which allows the controller to be outside. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (WICKET-6604) Ajax repaint is not correctly handled when component being repainted has an enclosure associated with it and is not a child of the enclosure
[ https://issues.apache.org/jira/browse/WICKET-6604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-6604. --- Resolution: Fixed > Ajax repaint is not correctly handled when component being repainted has an > enclosure associated with it and is not a child of the enclosure > > > Key: WICKET-6604 > URL: https://issues.apache.org/jira/browse/WICKET-6604 > Project: Wicket > Issue Type: Bug >Affects Versions: 7.10.0, 8.1.0 > Reporter: Igor Vaynberg > Assignee: Igor Vaynberg >Priority: Minor > Labels: ajax > Fix For: 7.11.0, 8.2.0 > > > When a component is repainted with ajax we first check if that component is a > controlling component of the enclosure and if it is we repaint the enclosure > instead of the component. However, we make the assumption that the > controlling component of the enclosure is always contained within the > enclosure, which may not always be true with inline enclosures. > For example: > {code:java} > Name > {code} > In this case the inline enclosure will only encompass the label. So if we > repaint the textfield by adding it to the ajax request handler we will get a > strange result where any header contributions associated with the name > component will get rendered, but the markup for the name component will not - > because we make the assumption that since it is controlling an enclosure it > is also inside it so there is no point in repainting it directly. > > One may argue that controlling components have to be inside the enclosure and > we should throw an error if they are not, but I prefer this more flexible > approach which allows the controller to be outside. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (WICKET-6604) Ajax repaint is not correctly handled when component being repainted has an enclosure associated with it and is not a child of the enclosure
Igor Vaynberg created WICKET-6604: - Summary: Ajax repaint is not correctly handled when component being repainted has an enclosure associated with it and is not a child of the enclosure Key: WICKET-6604 URL: https://issues.apache.org/jira/browse/WICKET-6604 Project: Wicket Issue Type: Bug Affects Versions: 8.1.0, 7.10.0 Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 7.11.0, 8.2.0 When a component is repainted with ajax we first check if that component is a controlling component of the enclosure and if it is we repaint the enclosure instead of the component. However, we make the assumption that the controlling component of the enclosure is always contained within the enclosure, which may not always be true with inline enclosures. For example: {code:java} Name {code} In this case the inline enclosure will only encompass the label. So if we repaint the textfield by adding it to the ajax request handler we will get a strange result where any header contributions associated with the name component will get rendered, but the markup for the name component will not - because we make the assumption that since it is controlling an enclosure it is also inside it so there is no point in repainting it directly. One may argue that controlling components have to be inside the enclosure and we should throw an error if they are not, but I prefer this more flexible approach which allows the controller to be outside. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
Re: Repeaters, dynamic data & detaching models
> On Aug 27, 2018, at 6:00 AM, Tobias Gierke > wrote: > > Hi, > > A collegue of mine just came across a rather interesting bug in our Wicket > application. > > 1. We have a simple page with a repeater (ListView) that displays a table and > on each row, some buttons to perform actions on the item shown on this row > (edit/delete/etc.) > 2. The underlying data source (a database table) gets updated concurrently by > another process running on another machine > 3. The table is supposed to always show the latest data at the very top, so > the page uses a LoadableDetachableModel to always hit the database on every > request > > The bug: > > Users complained that performing actions on the data items would actually > affect an item different from what they clicked. > > The explanation: > > Since the list model got detached at the end of the previous request, > clicking any of the action buttons would re-populate the data model, fetching > previously unseen rows from the database. Since (according to my > collegue,didn't double-check) the ListView associates the item models only > based on their list index, the action button on the very first row now all of > a sudden referred to a database row the user didn't even know about. > This is exactly why ListViews should not be used to work with database data unless you override getListItemModel() to return a model to represent the item itself like Sven mentioned in his reply. Here are three different ways to fix your problem from worst to best: 1. add(new AjaxButton( "delete , new EntityModel(item.getModelObject())) Where EntityModel knows how to load the entity from the database - ie the jpa model sven mentioned. 2. New ListView<….> { getListItemModel(imodel list, int index) { return new EntityModel(list.getobject().get(index)); } This is the same as above but has the advantage of item.getmodel() returning the better model 3. Use a RefreshingView or a DataView instead. -Igor > add(new AjaxButton( "delete , item.getModelObject() ) > His fix: > > Instead of > > view = new ListView("listView" , dataProvider ) > { >@Override >protected void populateItem(ListItem item) >{ >add(new AjaxButton( "delete , item.getModel() ) // use model from > ListItem (model gets detached after request) >{ > public void onClick(AjaxRequestTarget target) { > delete( getModelObject() ); > } >}); >// ... more stuff >} > } > > he changed the code to read: > > view = new ListView("listView" , dataProvider ) > { >@Override >protected void populateItem(ListItem item) >{ >add(new AjaxButton( "delete , item.getModelObject() ) // capture model > object when constructing the button >{ > public void onClick(AjaxRequestTarget target) { > delete( getModelObject() ); > } >}); >// ... more stuff >} > } > > This obviously is a rather subtle issue and - depending on the size of your > model objects - also comes with a certain performance/memory cost because of > the additional serialization for the model items the repeater components are > now holding onto. > > Is this the recommended approach for dealing with dynamically changing data > or is there a better way to do it ? > > Thanks, > Tobias > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket Job Opportunity
Hi, My company is looking to fill a 100% telecommuting (must reside within two time zones of US/Central time GMT-0600) senior software engineer position. We use Wicket/Weld/Hibernate stack. If you are interested you can read more about the position here: https://www.42lines.net/careers/software-eng/ Cheers, -Igor - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Proposal: Improve syntax for inline anonymous class instantiations
> On Jan 7, 2017, at 4:45 AM, Alexander Jones <a...@weej.com> wrote: > > Hi Igor > > With `super()` and closure binding of the anonymous class `constructor` (as > with all class methods) you can basically solve your problem of constructor > arguments appearing in the wrong place: > > ``` > this.add( > new class extends ArrayView { > constructor() { super("items", itemsModel); } > populateItem(item) { > item.add(new Checkbox("check", new PropertyModel(item.model, > "done"))); > item.add(new Label("title", new PropertyModel(item.model, > "title"))); > } > } > ); > ``` > > I concede that spelling `constructor`, `super`, and the various soup of > punctuation is a little less than ideal, but at the end of the day I think > this is quite reasonable, don't you? Yes, indeed. Thanks Alexander. I don't know why I didnt think of that myself. It is a little soupy since it adds an extra line and four extra keywords, but at least it allows this style of code. Thanks again, -Igor > > Cheers > > Alex > > On 6 January 2017 at 22:11, Igor Vaynberg <igor.vaynb...@gmail.com > <mailto:igor.vaynb...@gmail.com>> wrote: > Given a simple class with an abstract method "populateItem" > > class ArrayView extends Container { > constructor(id, model) { > super(id); > this.model = model; > } > > // methods referencing "populateItem" omitted for clarity > } > > the current anonymous instantiation syntax looks like this: > > this.add(new class extends ArrayView { > populateItem(item) { > item.add(new Checkbox("check", new PropertyModel(item.model, > "done"))); > item.add(new Label("title", new PropertyModel(item.model, "title"))); > } > } > ("items", itemsModel) > ); > > The problem with this syntax is that it pushes the constructor > parameters below the class body which I think causes two problems: > > When scanning code constructors often contain the piece of information > that helps locate the anonymous class, which currently requires the > developer to look back. This is especially problematic for anonymous > classes with long class bodies. > > When writing code I usually think about the constructor first, so it > seems it would be preferable to write it before moving onto working on > the class body. This is also the reason why constructors are usually > placed toward the top of named classes' source. > > A better syntax would move the constructor parameters between the > super class name and the class body: > > this.add(new class extends ArrayView("items", itemsModel) { > populateItem(item) { > item.add(new Checkbox("check", new PropertyModel(item.model, > "done"))); > item.add(new Label("title", new PropertyModel(item.model, "title"))); > } > }); > > If possible it would also be great to get rid of the "class extends" > keywords for this usecase: > > this.add(new ArrayView("items", itemsModel) { > populateItem(item) { > item.add(new Checkbox("check", new PropertyModel(item.model, > "done"))); > item.add(new Label("title", new PropertyModel(item.model, "title"))); > } > }); > > Thoughts? > > > Thanks, > -igor > ___ > es-discuss mailing list > es-discuss@mozilla.org <mailto:es-discuss@mozilla.org> > https://mail.mozilla.org/listinfo/es-discuss > <https://mail.mozilla.org/listinfo/es-discuss> > ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: Proposal: Improve syntax for inline anonymous class instantiations
> On Jan 6, 2017, at 7:04 PM, Allen Wirfs-Brockwrote: > > (new class extends foo(bar) {…}) > is already valid syntax that means use the value return from calling foo with > argument bar as the superclass of the class that is being instantiated. What > you propose would be a breaking change. What about limiting it just to (new foo(bar) {...}) syntax? -igor ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Proposal: Improve syntax for inline anonymous class instantiations
Given a simple class with an abstract method "populateItem" class ArrayView extends Container { constructor(id, model) { super(id); this.model = model; } // methods referencing "populateItem" omitted for clarity } the current anonymous instantiation syntax looks like this: this.add(new class extends ArrayView { populateItem(item) { item.add(new Checkbox("check", new PropertyModel(item.model, "done"))); item.add(new Label("title", new PropertyModel(item.model, "title"))); } } ("items", itemsModel) ); The problem with this syntax is that it pushes the constructor parameters below the class body which I think causes two problems: When scanning code constructors often contain the piece of information that helps locate the anonymous class, which currently requires the developer to look back. This is especially problematic for anonymous classes with long class bodies. When writing code I usually think about the constructor first, so it seems it would be preferable to write it before moving onto working on the class body. This is also the reason why constructors are usually placed toward the top of named classes' source. A better syntax would move the constructor parameters between the super class name and the class body: this.add(new class extends ArrayView("items", itemsModel) { populateItem(item) { item.add(new Checkbox("check", new PropertyModel(item.model, "done"))); item.add(new Label("title", new PropertyModel(item.model, "title"))); } }); If possible it would also be great to get rid of the "class extends" keywords for this usecase: this.add(new ArrayView("items", itemsModel) { populateItem(item) { item.add(new Checkbox("check", new PropertyModel(item.model, "done"))); item.add(new Label("title", new PropertyModel(item.model, "title"))); } }); Thoughts? Thanks, -igor ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: proposal: behavior bundles
On Thu, Jul 17, 2014 at 9:08 AM, Garret Wilson gar...@globalmentor.com wrote: On 7/17/2014 8:25 AM, Martin Grigorov wrote: ... For some reason this feature doesn't seem that usable to me... Could you be more specific about why you don't find this feature doesn't seem useful? None of your comments below were about the feature itself---they were about ancillary implementation details, such as whether the assert keyword should be used. This feature proposal is based upon the following assumptions: * Many developers will want to use the Wicket framework with third-party frameworks that require certain attributes and/or CSS classes in certain circumstances. * Adding third-party library support shouldn't require subclasses a lot of components. (Otherwise, I'd have a PureCSSButton, and I'd have to instantiate PureCSSButtons throughout the code... until I changed frameworks, at which point I'd have to change them all to BootStrapButtons.) * Third-party library support should be isolated from main UI code and from business logic. That is, I shouldn't have have to go add PureCSSAttributeBehaviors to all my buttons throughout the code, intermingled with my CSS framework-agnostic code. If one of those assumptions are invalid, let me know. Otherwise, do you have an alternative approach for me to easily add Pure CSS support for all my buttons (for example) in one locations without going through all my UI code, and then tomorrow to switch to using the Bootstrap framework (with its different required attributes for buttons and such) without changing all my code? If there is an alternative, great. But I don't see how you can say there is no need for such a feature. there is no need for the wrapper you provide. everything you want is already possible using IComponentInstantiationListener - which you already use. there are a few issues with the convenience wrapper: * you are forcing developers to share the behavior instance across multiple components this may be undesirable in some cases and inconvenient because it forces the behavior design to be stateless or store data using metadata instead of fields. while ok for simple things like appending a class it makes developing more complex behaviors difficult. * the mapping is not flexible enough suppose you want a link that opts out of this behavior for whatever reason. maybe you do it by implementing some interface on the link. now all methods in the behavior have to check for this interface. much easier to check for the interface and just not add the behavior. * the wrapper doesnt provide any real value its just a convenience and one that doesnt work for the 90% case. how many lines of code does it save? not many. we dont add such wrappers because they blow up the api surface area. -igor Garret
Re: [VOTE] Release Apache Wicket 6.16.0
+1 to release -igor On Thu, Jun 12, 2014 at 1:18 AM, Martin Grigorov mgrigo...@apache.org wrote: [X] Yes, release Apache Wicket 6.16.0 tested our main app, random wicket examples, local build Martin Grigorov Wicket Training and Consulting On Tue, Jun 10, 2014 at 3:37 PM, Sven Meier s...@meiers.net wrote: [X] Yes, release Apache Wicket 6.16.0 +1, tested with our main application. Regards Sven On 06/06/2014 03:43 PM, Martijn Dashorst wrote: This is a vote to release Apache Wicket 6.16.0 Please download the source distributions found in our staging area linked below. I have included the signatures for both the source archives. This vote lasts for 72 hours minimum. [ ] Yes, release Apache Wicket 6.16.0 [ ] No, don't release Apache Wicket 6.16.0, because ... Distributions, changelog, keys and signatures can be found at: https://dist.apache.org/repos/dist/dev/wicket/6.16.0 Staging repository: https://repository.apache.org/content/repositories/ orgapachewicket-1019/ The binaries are available in the above link, as are a staging repository for Maven. Typically the vote is on the source, but should you find a problem with one of the binaries, please let me know, I can re-roll them some way or the other. The signatures for the source release artefacts: apache-wicket-6.16.0.tar.gz -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iEYEABECAAYFAlORjnoACgkQJBX8W/xy/UXfmgCaAj2rxkyNRwy5bAi6XNJfiOu5 vJ8AoJw+PTYTkpk1hqPdcsKG/6/ZDnWM =DsVi -END PGP SIGNATURE- apache-wicket-6.16.0.zip -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iEYEABECAAYFAlORjnoACgkQJBX8W/xy/UVNcQCgw4jzblZPiVRzQ1uawDsbYQkI VhsAoMo02KXxRPdKL7I797ql25doUh8r =SFyR -END PGP SIGNATURE- Release Notes - Wicket - Version 6.16.0 ** Bug * [WICKET-4545] - MarkupNotFoundException for Fragment and TransparentWebMarkupContainer * [WICKET-5553] - When using an Ajax request to display initially hidden components inside inline enclosures, only the first one appears. * [WICKET-5560] - A 404 error occurs when using a CryptoMapper * [WICKET-5569] - Unable to find markup for children of deeply nested IComponentResolvers during Ajax response * [WICKET-5570] - Rescheduling the same ajax timer behavior causes memory leak in the browser * [WICKET-5573] - FilterToolbar generics broken * [WICKET-5581] - CachingResourceStreamLocator is not extension-aware * [WICKET-5582] - ServletWebResponse#encodeUrl() makes absolute Urls relative * [WICKET-5589] - Upgrade wicket-atmosphere to the latest version of atmosphere * [WICKET-5591] - Missing translation for HoursValidator.range (in DateTimeField) * [WICKET-5592] - Add a method to clear the cache of CachingResourceStreamLocator * [WICKET-5593] - AjaxFormValidatingBehavior attempts to update non-visible feedback panels * [WICKET-5595] - Atmosphere: updates infinitly with long polling transport * [WICKET-5596] - DropDownChoice#wantsOnSelectionChangedNotifications(T) not being called on unmounted page * [WICKET-5601] - AbstractSingleSelectChoice fails with NullPointerException when its choice renderer returns null from #getIdValue() ** Improvement * [WICKET-5563] - RestartResponseAtInterceptPageException - add public function to retrieve originalUrl * [WICKET-5574] - ComponentRenderer should use Application#createRequestCycle * [WICKET-5575] - Add support in FormTester#submit(String|Component) for Ajax submitters * [WICKET-5577] - Generation of wicket ids with prefix / suffix * [WICKET-5580] - Allow markup to find child fragments when wicket:child is inside a component tag * [WICKET-5585] - Wicket Extension Automplete does not work well with JavaScriptFilteredIntoFooterHeaderResponse * [WICKET-5586] - NextButton isEnabled() should bo logical conjunction of getWizardModel().isNextAvailable() and super.isEnabled() * [WICKET-5600] - Introduce CharSequenceResource similar to ByteArrayResource * [WICKET-5606] - SelectOptions with #setRecreateChoices(true) loses selection on form errors ** Task * [WICKET-5587] - Upgrade JQuery to latest releases - 1.11.1 2.1.1
[jira] [Commented] (WICKET-5566) Catch-All FencedFeedbackPanel has lost message in case of message-level filter in nested FencedFeedbackPanel
[ https://issues.apache.org/jira/browse/WICKET-5566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13976945#comment-13976945 ] Igor Vaynberg commented on WICKET-5566: --- indeed, this is as designed. messages do not make it past their fences, thats the whole idea. like [~mgrigorov] mentioned, you can create your own variant. the entire class is only about 30 lines of real code... Catch-All FencedFeedbackPanel has lost message in case of message-level filter in nested FencedFeedbackPanel -- Key: WICKET-5566 URL: https://issues.apache.org/jira/browse/WICKET-5566 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 6.14.0 Environment: Windows 2008 Server, Java 7u45 x64, Glassfish 3 Reporter: Alexander Morozov Assignee: Igor Vaynberg Attachments: myproject.zip We have almost successfully use FencedFeedbackPanel feedback, until we enable ErrorLevelFeedbackMessageFilter in nested FencedFeedbackPanels. Here is page structure: FencedFeedbackPanel (catch-all, fence=null) Panel1 (with form) FencedFeedbackPanel (fence=Panel1) + ErrorLevelFeedbackMessageFilter(accept ERROR level or higher) Panel2 (with form) FencedFeedbackPanel (fence=Panel2) + ErrorLevelFeedbackMessageFilter(accept ERROR level or higher) The issue: catch-all FencedFeedbackPanel doesn't show success messages, added by submit links in Panel1 or Panel2, hence messages had lost. Are there any solutions for the issue? See also http://apache-wicket.1842946.n4.nabble.com/quot-Catch-all-quot-FencedFeedbackPanel-and-message-level-filter-in-nested-FencedFeedbackPanel-td4665515.html -- This message was sent by Atlassian JIRA (v6.2#6252)
Re: [VOTE] Release Apache Wicket 6.15.0
+1 to release -igor On Wed, Apr 16, 2014 at 3:56 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: This is a vote to release Apache Wicket 6.15.0 Please download the source distributions found in our staging area linked below. I have included the signatures for both the source archives. This vote lasts for 72 hours minimum. [ ] Yes, release Apache Wicket 6.15.0 [ ] No, don't release Apache Wicket 6.15.0, because ... Distributions, changelog, keys and signatures can be found at: https://dist.apache.org/repos/dist/dev/wicket/6.15.0 Staging repository: https://repository.apache.org/content/repositories/orgapachewicket-1014/ The binaries are available in the above link, as are a staging repository for Maven. Typically the vote is on the source, but should you find a problem with one of the binaries, please let me know, I can re-roll them some way or the other. The signatures for the source release artefacts: apache-wicket-6.15.0.tar.gz: -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iEYEABECAAYFAlNPB8AACgkQJBX8W/xy/UUIlgCgsRqpylFm+JIHsfrTfcQI0YZA XmoAoKZbXv7LfEYmoj/t9wPdr05S5EX1 =Xbxq -END PGP SIGNATURE- apache-wicket-6.15.0.zip: -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iEYEABECAAYFAlNPB8AACgkQJBX8W/xy/UUmHQCfRAFaprglWYJS0XMHy/H77y1j b1AAn1J7i5a+JFzFf3bXGQoiMShG92V5 =u4er -END PGP SIGNATURE- Release Notes - Wicket - Version 6.15.0 ** Sub-task * [WICKET-5510] - Avoid using jQuery.text() when possible. It is very slow in IE * [WICKET-5554] - Disable second level pages store because it is efficient only when manually configured ** Bug * [WICKET-5243] - JS: High stack size in Function Executor causes too much recursion * [WICKET-5284] - Too deep recursion in AbstractHierarchyIterator * [WICKET-5504] - AjaxRequestTarget.append/prependJavaScript cannot handle scripts with new-lines anymore * [WICKET-5505] - DefaultPropertyResolver does not respect JavaBean conventions * [WICKET-5506] - DefaultPropertyResolver should resolve the Property according to the getter first * [WICKET-5509] - Wicket examples' MailTemplate from Page is broken * [WICKET-5517] - IE11 returns false for Wicket.Browser.isIE() * [WICKET-5518] - FormComponent.updateCollectionModel does not handle unmodifiableList * [WICKET-5521] - Stateless forms does not work when RecreateMountedPagesAfterExpiry turned off * [WICKET-5522] - Failing HTTPS redirect to RequireHttps annotated pages with ONE_PASS_RENDER strategy * [WICKET-5523] - Ajax indicator not working when display is set to none in css * [WICKET-5532] - NPE calling PackageResource.getResourceStream() if there is no RequestCycle defined * [WICKET-5534] - DataTable component must throw an exception when attached to non-table element * [WICKET-5536] - Error message without parmeters filled. * [WICKET-5537] - Wicket.DOM.toggleClass is called with additional # inside AutoLabelResolver * [WICKET-5541] - NullPointerException in SubscribeAnnotationEventSubscriptionInvoker on remove of component from page * [WICKET-5545] - Cannot use redirect in ModalWindow's page#onInitialize() * [WICKET-5546] - Adding behavior in component instantiation listener causes Page.onInitialize() being called even if constructor throws an exception * [WICKET-5547] - Javadoc for ReuseIfModelsEqualStrategy should mention that models must implement hashCode() method * [WICKET-5548] - Websocket initialization URL is not valid when filter is not mapped to root. ** Improvement * [WICKET-5508] - Memory model improvements for Session fields * [WICKET-5512] - Allow using child selector for JS event bindings * [WICKET-5520] - improve reusability of DataTable and AbstractPageableView * [WICKET-5528] - Allow models of subtypes of Select type parameter in SelectOption constructor * [WICKET-5529] - Add WebSocketBehavior/Resource#onPush() callback method * [WICKET-5531] - Create new placeholder tag to indicate where header contributions should appear * [WICKET-5538] - When using Component.setDefaultModel, only detach the previous model if the new one is different * [WICKET-5549] - continueToOriginalDestination() fails after redirectToInterceptPage() on AjaxRequest ** New Feature * [WICKET-831] - Return response status 404 when a mapper cannot decode a request url * [WICKET-2542] - Provide ajax buttons for wizard ** Task * [WICKET-5514] - Update Wicket fragment example ** Wish * [WICKET-5516] - RadioChoice / add a getAdditionalAttributes() also for label-tag *
Re: [VOTE] Release Apache Wicket 7.0.0-M1
+1 to release -igor On Sun, Apr 20, 2014 at 1:44 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: WOW. This is the first of many votes to come for our first Wicket 7 release train. It took some work, but I managed to manipulate our projects, Maven and its release plugin to generate the right release version numbers for the right projects. Known issue: Wicket Atmosphere version mismatch between wicket 6 and 7 It appears that wicket-experimental/wicket-atmosphere has version 0.10 if we release 7.0.0-M1 **right now**. Now I don't have a clear view if atmosphere in master is up to date with 0.18 from Wicket 6.15. I think it ultimately doesn't **yet**. If 7.x/atmosphere:0.10 is on the same patch level as 6.x/atmosphere/0.10, then we have parity in versions. If 7.x/atmosphere:0.10 is on the same patch level as 6.x/atmosphere/0.18, we can fix the numbering scheme in 7.0.0-M2 So here it goes: This is a vote to release Apache Wicket 7.0.0-M1 Please download the source distributions found in our staging area linked below. I have included the signatures for both the source archives. This vote lasts for 72 hours minimum. [ ] Yes, release Apache Wicket 7.0.0-M1 [ ] No, don't release Apache Wicket 7.0.0-M1, because ... Distributions, changelog, keys and signatures can be found at: https://dist.apache.org/repos/dist/dev/wicket/7.0.0-M1 Staging repository: https://repository.apache.org/content/repositories/orgapachewicket-1018 The binaries are available in the above link, as are a staging repository for Maven. Typically the vote is on the source, but should you find a problem with one of the binaries, please let me know, I can re-roll them some way or the other. Release notes: - Wicket 7 requires Java 7 at a minimum - Wicket 7 requires at least a servlet 3 compatible container - Migration guide: http://s.apache.org/wicket7migrate The signatures for the source release artefacts: apache-wicket-7.0.0-M1.tar.gz.asc -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iEYEABECAAYFAlNUK4wACgkQJBX8W/xy/UXKbgCdHzMcgjCtDXTJsLLUwHEGNWUJ ZwwAoNCbquGqNMzYY9tMi+lflzH4MqcP =x14q -END PGP SIGNATURE- apache-wicket-7.0.0-M1.zip.asc -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iEYEABECAAYFAlNUK4wACgkQJBX8W/xy/UXUfQCg1EU8S+Z5mdy7svWlK1WwMAG3 tWwAoJr6egOay7UNi8HCH2cOBZekOO0j =AVEj -END PGP SIGNATURE-
Re: Wicket 7: IChoiceRenderer restore or keep out?
On Wed, Mar 19, 2014 at 2:58 AM, Sven Meier s...@meiers.net wrote: Hi Martin, I'm +1 on releasing 7.x soon. ListMultipleChoice#getModelValue() and AbstractSingleSelectChoice#getModelValue() are still problematic though: Both call getChoices().indexOf(object), thus any non-primitive option has to implement #equals() :(. so thats where the code should be fixed, instead of unrolling changes that make perfect sense... the choice renderer can do this conversion, since it is also the place that does the complementary conversion already. the reliance on the index is a stupid one imho. in real world there is very rarely a usecase where a List is stable across requests. we should remove the usage of index altogether from these components. for usecases where the index is actually usable the renderer can use it since it has access to it since it has access to the list model. How about leaving IChoiceRenderer to do the actual rendering part (i.e. #getDisplayValue()) only ? The conversion choice-id (i.e. #getIdValue() and #getObject()) could be moved into a converter instead. this is not really a usecase for converters. they are meant to convert request values to objects. the problem is the choice renderer is already doing half of this conversion in getIdValue(), so it does not make sense to me to use the renderer for one half of the conversion and converter for the other half. this needs to be made consistent, either move all of it into renderer or move all of it into converter. the renderer seemed a more logical place to me for this particular component. @Igor? Regards Sven On 03/19/2014 10:27 AM, Martin Grigorov wrote: Sven, Igor, Do you have an agreement how IChoiceRenderer should look like in Wicket 7.x ? I really like to release 7.0.0-M1 so we got some user feedback. Martin Grigorov Wicket Training and Consulting On Wed, Feb 26, 2014 at 8:10 PM, tetsuo ronald.tet...@gmail.com wrote: Sorry for the rant... The transition from 1.4 to 1.5 was awful (full of such minor breaking changes), but not so afterwards, I know I'm overreacting. Probably it's because it happened (a colleague complaining about all the compiling errors when upgrading from 1.4) last week :/ And well... it's somewhat inevitable to avoid compiling errors when evolving a framework that is strongly type-safe (which is a great plus). Sorry again. But I still like my enums, please keep the interfaces :) On Wed, Feb 26, 2014 at 1:34 PM, Martin Grigorov mgrigo...@apache.org wrote: On Wed, Feb 26, 2014 at 6:21 PM, tetsuo ronald.tet...@gmail.com wrote: Guillaume, you're right. Martin, sorry for the misunderstanding. Enums can't extend any classes besides Enum. But can implement interfaces. Thanks! Now it is clear to me. I use Enums in lots of places, not as enums, but as singletons, because they won't be serialized, won't carry unintended references, and use virtually no memory in pages. Converters, Renderers, Validators, Models (less so of the former, since it almost always needs state). If IBehavior still existed, and didn't have so many methods, I'd use enums to implement some of them, too. But my main complaint is not specific to this issue, however. I'm more concerned about frequent breaking API changes with no practical advantage. Javascript/JavaScript, addComponent/add(Component) and the like. I'm at the point that I'm starting to feel unconfortable recommending Wicket to people, because I know an year from now they will complain that they upgraded a library and a thousand compiling errors appeared. 98% of them are very simple errors, but it's a daunting task neverthless. Options: 1) Wicket devs stop developing Wicket so the API stays stable forever 2) application developers don't upgrade to next major version of Wicket 3) find the golden middle. I think we all agree that 3) is the best for all and that we (Wicket devs) try to follow it: - we use SemVer to make it easier for application developers to know when to expect API breaks and when to not expect such - we discuss most of the API breaks for major versions here in dev@. If there are issues identified on time we react! Even this change has been discussed before being made On Wed, Feb 26, 2014 at 12:44 PM, Martin Grigorov mgrigo...@apache.org wrote: As Martijn explained all that is needed is: - s/implements/extends/ - remove the leading 'I' from IChoiceRenderer If the interface is preserved then all custom impls will have to add implementation of the new method introduced with WICKET-663. This IMO will lead to more work for the application developers. As I said: I am not against restoring the interface, just don't see its value. Martin Grigorov Wicket Training and Consulting On Wed, Feb 26, 2014 at 5:37 PM, Guillaume Smet guillaume.s...@gmail.com wrote: On Wed, Feb 26, 2014 at 4:33 PM, tetsuo ronald.tet...@gmail.com wrote:
Re: Future of org.apache.wicket.util.iterator.ComponentHierarchyIterator
i think the visitors are a simpler solution. -igor On Mon, Mar 17, 2014 at 3:09 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Juergen has introduced component hierarchy iterators with https://issues.apache.org/jira/browse/WICKET-3789 to simplify the hierarchy traversal via IVisitor. Unfortunately AbstractHierarchyIterator has a bug that doesn't allow its usage in a page with many components - it uses a recursion [1]. AbstractHierarchyIterator#hasNext() uses #moveDown() and vice versa. At the moment org.apache.wicket.MarkupContainer#visitChildren() and org.apache.wicket.MarkupContainer#visitChildren(java.lang.Class?) use ComponentHierarchyIterator so they may not work for complex pages. Should we deprecate the iterators and remove their usage in Wicket codebase now and the classes themselves in Wicket 8 ? Or someone wants to improve the way the component iterators work and fix the problem ? 1. https://issues.apache.org/jira/browse/WICKET-5284. Martin Grigorov Wicket Training and Consulting
Re: Best practice for updating JPA object without persisting changes
have a look here: https://www.42lines.net/2011/12/01/simplifying-non-trivial-user-workflows-with-conversations/ -igor On Wed, Mar 5, 2014 at 3:47 AM, Chris Snyder chris.sny...@biologos.org wrote: I'm dealing with an issue that I'm sure has been solved by many people on this list, but I'm struggling to ascertain the best way to solve it. I'm working on implementing in-place-edit functionality for some of our site content. The content is stored in a database and mapped via JPA. The edit form has the JPA entity as the backing model object. One of the features I'm implementing is the ability to preview what's been entered in the form without the updates being committed to the database (until the user explicitly clicks on the Save button). I can think of a few ways to accomplish this: 1. Rollback the transaction when not saving - This would require me to manage the transaction manually (right now, they're being managed automatically by Guice's PersistFilter). 2. Detach the object from the persistence context, merge it to save - This seems like the most elegant solution, but I can see how there could be issues (not intractable) with lazy loading. 3. Prevent the form from updating the model until save - This would break my preview panel, and seems to be contrary to how forms normally behave. 4. Copy the data into a non-managed DTO, copying it back to the JPA object on save - Would require a lot of clone/copy code. This seems like such a common problem to solve - I think my relative unfamiliarity with JPA is the main stumbling block here. How have others implemented it? Is there a best-practice pattern that my Googling didn't discover? Thanks in advance for the help. I hope that it isn't too off-topic since it is mainly JPA-related. Best, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Best practice for updating JPA object without persisting changes
you simple need to change where the entitymanager instance lives, and control it via cdi conversation api. no need to expose any more of the jpa stuff. -igor On Wed, Mar 5, 2014 at 9:06 AM, Chris Snyder chris.sny...@biologos.org wrote: Thanks, Igor - that's very helpful. Not sure how I missed that article while I was searching. It would be a bit tricky to implement in my situation (as I described in another response, the JPA implementation of the data storage is abstracted behind a service API), but I could make it work - perhaps by adding detach and merge methods to the API; that would perhaps expose a little too much of the implementation, but I think that other (hypothetical) implementations could also need to expose similar functionality. Of course, I might be over-engineering this whole abstraction anyways. I have no intention of implementing a non-JPA version - perhaps I should embrace a hard dependency on JPA and simplify everything. JPA is itself an abstraction layer, after all... Thanks, Chris On Wed, Mar 5, 2014 at 11:44 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: have a look here: https://www.42lines.net/2011/12/01/simplifying-non-trivial-user-workflows-with-conversations/ -igor On Wed, Mar 5, 2014 at 3:47 AM, Chris Snyder chris.sny...@biologos.org wrote: I'm dealing with an issue that I'm sure has been solved by many people on this list, but I'm struggling to ascertain the best way to solve it. I'm working on implementing in-place-edit functionality for some of our site content. The content is stored in a database and mapped via JPA. The edit form has the JPA entity as the backing model object. One of the features I'm implementing is the ability to preview what's been entered in the form without the updates being committed to the database (until the user explicitly clicks on the Save button). I can think of a few ways to accomplish this: 1. Rollback the transaction when not saving - This would require me to manage the transaction manually (right now, they're being managed automatically by Guice's PersistFilter). 2. Detach the object from the persistence context, merge it to save - This seems like the most elegant solution, but I can see how there could be issues (not intractable) with lazy loading. 3. Prevent the form from updating the model until save - This would break my preview panel, and seems to be contrary to how forms normally behave. 4. Copy the data into a non-managed DTO, copying it back to the JPA object on save - Would require a lot of clone/copy code. This seems like such a common problem to solve - I think my relative unfamiliarity with JPA is the main stumbling block here. How have others implemented it? Is there a best-practice pattern that my Googling didn't discover? Thanks in advance for the help. I hope that it isn't too off-topic since it is mainly JPA-related. Best, Chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Chris Snyder Web Developer, BioLogos 616.328.5218 x203 biologos.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Show textfield as plaintext when disabled?
class MyTextField extends TextField { onComponentTag(tag) { super.onComponentTag(tag); if (!enabledInHierarchy()) { tag.setName(label); tag.removeAttribute(type); tag.removeAttribute(value); tag.setType(TagType.OPEN); } } void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, getDefaultModelObjectAsString()); } } -igor On Fri, Feb 28, 2014 at 11:33 AM, Entropy blmulholl...@gmail.com wrote: Is there a way to have my textfield show as plain text when in a readonly mode rather than as a disabled textbox? Backup question: I can imagine making a panel to do this...having a textfield and label and hiding whichever I didn't want, but I would want my panel to bind to a textbox in the parent page and replace that tag (otherwise I would have two textboxes, right). How would I go about that? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Show-textfield-as-plaintext-when-disabled-tp4664723.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[jira] [Resolved] (WICKET-3335) Component Queuing (extract hierarchy information from markup)
[ https://issues.apache.org/jira/browse/WICKET-3335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-3335. --- Resolution: Fixed Fix Version/s: 7.0.0 Component Queuing (extract hierarchy information from markup) - Key: WICKET-3335 URL: https://issues.apache.org/jira/browse/WICKET-3335 Project: Wicket Issue Type: New Feature Components: wicket Reporter: Giannis Koutsoubos Assignee: Igor Vaynberg Fix For: 7.0.0 Attachments: 0001-component-queuing.patch, wicket-3335.patch Doubly defined hierarhices are redundant. Server-side hierarchy can be automatically deduced from markup hierarchy. Use queue method in MarkupContainer to add components and extract hierarchy information from markup. Discussed here: http://apache-wicket.1842946.n4.nabble.com/Free-wicket-from-component-hierarchy-hell-td3027705.html Implementation of queue method on branch 1.4.x : https://github.com/koutsoub/wicket/tree/component-queuing -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Updated] (WICKET-3335) Component Queueing (extract hierarchy information from markup)
[ https://issues.apache.org/jira/browse/WICKET-3335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-3335: -- Summary: Component Queueing (extract hierarchy information from markup) (was: Component Queuing (extract hierarchy information from markup)) Component Queueing (extract hierarchy information from markup) -- Key: WICKET-3335 URL: https://issues.apache.org/jira/browse/WICKET-3335 Project: Wicket Issue Type: New Feature Components: wicket Reporter: Giannis Koutsoubos Assignee: Igor Vaynberg Fix For: 7.0.0 Attachments: 0001-component-queuing.patch, wicket-3335.patch Doubly defined hierarhices are redundant. Server-side hierarchy can be automatically deduced from markup hierarchy. Use queue method in MarkupContainer to add components and extract hierarchy information from markup. Discussed here: http://apache-wicket.1842946.n4.nabble.com/Free-wicket-from-component-hierarchy-hell-td3027705.html Implementation of queue method on branch 1.4.x : https://github.com/koutsoub/wicket/tree/component-queuing -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (WICKET-3335) Component Queueing (extract hierarchy information from markup)
[ https://issues.apache.org/jira/browse/WICKET-3335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13915347#comment-13915347 ] Igor Vaynberg commented on WICKET-3335: --- user description of the implementation: https://www.42lines.net/2014/02/28/component-queueing-in-wicket-7/ Component Queueing (extract hierarchy information from markup) -- Key: WICKET-3335 URL: https://issues.apache.org/jira/browse/WICKET-3335 Project: Wicket Issue Type: New Feature Components: wicket Reporter: Giannis Koutsoubos Assignee: Igor Vaynberg Fix For: 7.0.0 Attachments: 0001-component-queuing.patch, wicket-3335.patch Doubly defined hierarhices are redundant. Server-side hierarchy can be automatically deduced from markup hierarchy. Use queue method in MarkupContainer to add components and extract hierarchy information from markup. Discussed here: http://apache-wicket.1842946.n4.nabble.com/Free-wicket-from-component-hierarchy-hell-td3027705.html Implementation of queue method on branch 1.4.x : https://github.com/koutsoub/wicket/tree/component-queuing -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Component Queueing is here (master), aka Free Wicket From Hierarchy Hell, aka Markup Driven Component Tree
in the past couple of weeks i finally had some time to finish up the component queueing feature. it is meant to greatly decrease common maintenance headaches associated with markup tweaks and moving components around. see the intro here: https://www.42lines.net/2014/02/28/component-queueing-in-wicket-7/ -igor - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 7: IChoiceRenderer restore or keep out?
On Wed, Feb 26, 2014 at 8:00 AM, Sven Meier s...@meiers.net wrote: To add another point to the discussion: IMHO (I)ChoiceRenderer in 7.x is broken anyway. As long as the user has to implement #equals() in his model objects *or* override #getModelValue(), the choice renderer API is not yet complete: @Override public String getModelValue() { final T object = getModelObject(); if (object != null) { // #indexOf() might be inefficient or fail depending on the #equals() implementation int index = getChoices().indexOf(object); return getChoiceRenderer().getIdValue(object, index); } else { return ; } } i am going to guess this doesnt often break because 99% of implementations out there do not use the index parameter. personally i think it should be removed from choice renderer, leave it to the user to map. we can pass the entire collection of choices into methods on choice renderer instead of passing in an index. I wonder whether (I)ChoiceRenderer is taking the wrong direction: It's meant to control the rendering of choices (hence its name). Everything else could be made (or already is) adjustable via protected methods in the choice component. it has never been just the renderer because from the beginning it is what maps objects to their ids, it only makes sense that it takes care of the inverse mapping. mapping objects to ids is usually a function of the data-store, so why have half of data-store specific code in choice renderer, and half in the component hierarchy? -igor Regards Sven On 02/26/2014 04:44 PM, Martin Grigorov wrote: As Martijn explained all that is needed is: - s/implements/extends/ - remove the leading 'I' from IChoiceRenderer If the interface is preserved then all custom impls will have to add implementation of the new method introduced with WICKET-663. This IMO will lead to more work for the application developers. As I said: I am not against restoring the interface, just don't see its value. Martin Grigorov Wicket Training and Consulting On Wed, Feb 26, 2014 at 5:37 PM, Guillaume Smet guillaume.s...@gmail.comwrote: On Wed, Feb 26, 2014 at 4:33 PM, tetsuo ronald.tet...@gmail.com wrote: Because... it's an unnecessary breaking change? From what I understand of your previous post, you implements some of your converters in Enums, which you can do because IChoiceRenderer is currently an interface. And you won't be able to do it if it's a class. Am I right?
Re: [1/2] git commit: WICKET-3335 fragment and wicket:container support
no, its not. will fix...thanks for catching -igor On Tue, Feb 25, 2014 at 3:56 AM, Martin Grigorov mgrigo...@apache.org wrote: On Mon, Feb 24, 2014 at 9:09 PM, ivaynb...@apache.org wrote: Repository: wicket Updated Branches: refs/heads/master a79ed51e9 - cc5d56a50 WICKET-3335 fragment and wicket:container support Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/61b01295 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/61b01295 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/61b01295 Branch: refs/heads/master Commit: 61b01295d0d52929178d058d48456cae4acbc3e7 Parents: a79ed51 Author: Igor Vaynberg igor.vaynb...@gmail.com Authored: Mon Feb 24 11:09:12 2014 -0800 Committer: Igor Vaynberg igor.vaynb...@gmail.com Committed: Mon Feb 24 11:09:12 2014 -0800 -- .../java/org/apache/wicket/MarkupContainer.java | 4 ++ .../wicket/markup/html/panel/Fragment.java | 10 +++- .../wicket/queueing/ComponentQueueingTest.java | 53 3 files changed, 56 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/61b01295/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java index 087d655..1aba865 100644 --- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java +++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java @@ -2169,6 +2169,10 @@ public abstract class MarkupContainer extends Component implements IterableComp if (tag instanceof WicketTag) { WicketTag wicketTag = (WicketTag)tag; + if (wicketTag.isContainerTag()) + { + return true; + } if (wicketTag.getAutoComponentFactory() != null) { return true; http://git-wip-us.apache.org/repos/asf/wicket/blob/61b01295/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java index 078aa44..676cca5 100644 --- a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java +++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java @@ -17,8 +17,12 @@ package org.apache.wicket.markup.html.panel; import org.apache.wicket.Component; +import org.apache.wicket.IQueueRegion; import org.apache.wicket.MarkupContainer; import org.apache.wicket.markup.IMarkupFragment; +import org.apache.wicket.markup.MarkupElement; +import org.apache.wicket.markup.MarkupFragment; +import org.apache.wicket.markup.WicketTag; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.model.IModel; import org.apache.wicket.util.lang.Args; @@ -46,7 +50,7 @@ import org.apache.wicket.util.lang.Args; * * @author Juergen Donnerstag */ -public class Fragment extends WebMarkupContainer +public class Fragment extends WebMarkupContainer implements IQueueRegion { private static final long serialVersionUID = 1L; @@ -130,4 +134,8 @@ public class Fragment extends WebMarkupContainer return associatedMarkupId; } + @Override + public IMarkupFragment getDequeueMarkup() { + return newMarkupSourcingStrategy().getMarkup(this, null); Is it important to use newMarkupSourcingStrategy() here ? Can we use org.apache.wicket.Component#getMarkupSourcingStrategy() ? + } } http://git-wip-us.apache.org/repos/asf/wicket/blob/61b01295/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java -- diff --git a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java index 34f1317..96f0c77 100644 --- a/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java +++ b/wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java @@ -33,6 +33,7 @@ import org.apache.wicket.markup.html.internal.Enclosure; import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.markup.html.list.ListView
Re: Markup driven component tree
tests fixed, merged into master. -igor On Tue, Feb 18, 2014 at 5:29 AM, Martin Grigorov mgrigo...@apache.org wrote: On Mon, Feb 17, 2014 at 5:48 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: i think the implementation is good enough to be merged into master now. it supports: I am still not able to fix the tests I will need more time to get acquaint with the new code to be able to maintain it * dequeuing algorithm that delegates to components so subclasses can override (this is how repeaters and borders support it) * support for all major constructs: panels, borders, repeaters * support for auto component hierarchy - they are dequeued and queued up children are placed as the children of auto components - this makes things like enclosures trivial to implement where as before they were fairy complex * performance comparable to adding, still some room for improvement with clever/efficient data structures maybe, but i dont think its needed... I see regression here last time I ran the performance test it needed 9s to run and used 88Mb memory now the time is 11s and the memory is 201Mb todo: * fragments - should be trivial, possibly as trivial as letting it implement IQueueRegion * check markup inheritance works on pages, panels, fragments. * examples * update to the guide -igor On Fri, Feb 14, 2014 at 8:36 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i am reworking the implementation a bit to properly support borders and repeaters by delegating to components...will check it in when i have it working... -igor On Fri, Feb 14, 2014 at 7:26 AM, Martin Grigorov mgrigo...@apache.org wrote: On Mon, Feb 10, 2014 at 6:01 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: On Mon, Feb 10, 2014 at 6:26 AM, Martin Grigorov mgrigo...@apache.org wrote: On Mon, Feb 10, 2014 at 9:43 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i just pushed my new idea into sandbox/component-queueing-2 the way this works now is instead of doing it in onInitialize() and in onConfigure() and all the other places dequeuing now works progressively. upon a change (container.queue() or component.add()) a dequeue will be tried. it even works well with resolved components like enclosures. for such components the markup of page/panel is traversed in onInitialize() and all auto components are placed into the queue. later as components are added/queued these components will be placed into the correct place in the hierarchy. if queue() is used children of these components will be placed under them in correct hierarchy place. this is a big win for using queueing over adding. repeaters also work. the repeater items themselves have to be added to the repeater, but item's children can be queued. this is not a problem since items are mostly added by framework classes. Borders do not yet work mainly because i havent tried to make them work. the tricky part there is to keep the border and BorderBody queues separate. I've added some code to support it but it needs more work. See my response to the commit notification email of my changes. Basic usage of Border is now supported. I have added a test with nested Borders and it fails. Please check org.apache.wicket.queueing.ComponentQueueingTest#dequeueWithNestedBorders Also we have BorderBehavior and BorderPanel. I think (almost) no one uses those but they exist. imho we can nuke these two things from 7. they dont look very useful. probably added just because we could. InlineEnclosures do not yet work because the code for figuring out the value of the child attribute is really convoluted for the simple thing its supposed to do and i didnt bother parsing it. Should be very similar to how EnclosureHandler works. Done. thanks. the performance is good. there is ComponentQueueingPerformanceTest with a disabled test. give it a go and let me know the results. on my box queuing had under 10% overhead, which is acceptable. I also have some ideas on how to optimize that further by trading cpu for a bit more memory, but not sure In my branch on this topic I used HashMap instead of array. The lookup is faster. Not sure how much memory overhead there is. yeah. havent had time to profile it yet. there are some memory efficient hashmaps floating around, maybe we can adapt one of them. I've added ComponentQueue2 based on HashMap with the same initial capacity (8) and loadFactor 1. wicket-util has MicroMap for 1entry and MiniMap for fixed size entries but it doesn't use hash function so it iterates over the entries as we do over the array in ComponentQueue(1). With ComponentQueue2 the map will start with capacity 8 and will double when the ninth is to be added
Re: git commit: WICKET-3335 test fixes
On Fri, Feb 21, 2014 at 5:09 AM, Martin Grigorov mgrigo...@apache.org wrote: On Fri, Feb 21, 2014 at 9:18 AM, ivaynb...@apache.org wrote: Repository: wicket Updated Branches: refs/heads/sandbox/component-queueing-2 63d15c5c3 - 1fd9d57c0 WICKET-3335 test fixes Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1fd9d57c Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1fd9d57c Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1fd9d57c Branch: refs/heads/sandbox/component-queueing-2 Commit: 1fd9d57c0954f393e7cf6b6391d2f69c2815674d Parents: 63d15c5 Author: Igor Vaynberg igor.vaynb...@gmail.com Authored: Thu Feb 20 23:09:43 2014 -0800 Committer: Igor Vaynberg igor.vaynb...@gmail.com Committed: Thu Feb 20 23:18:25 2014 -0800 -- .../java/org/apache/wicket/DequeueContext.java | 44 +- .../java/org/apache/wicket/MarkupContainer.java | 48 .../wicket/markup/html/border/Border.java | 12 +++-- .../markup/repeater/AbstractRepeater.java | 4 +- .../markupFragments/MarkupFragmentTest.java | 2 + 5 files changed, 85 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/1fd9d57c/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java index 99c102d..a5bb925 100644 --- a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java +++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java @@ -1,9 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.wicket; import org.apache.wicket.markup.ComponentTag; import org.apache.wicket.markup.IMarkupFragment; import org.apache.wicket.markup.MarkupElement; import org.apache.wicket.util.collections.ArrayListStack; +import org.apache.wicket.util.lang.Args; /** * Context for component dequeueing. Keeps track of markup position and container stack. @@ -71,7 +88,7 @@ public final class DequeueContext } /** -* Peeks markup tag that would be retrieved by call to {@link #popTag()} +* Peeks markup tag that would be retrieved by call to {@link #takeTag()} * * @return */ @@ -85,27 +102,30 @@ public final class DequeueContext * * @return */ - public ComponentTag popTag() + public ComponentTag takeTag() { - ComponentTag taken = next; - tags.push(taken); - next = nextTag(); + ComponentTag taken=next; + if (taken.isOpen() !taken.hasNoCloseTag()) + { + tags.push(taken); + } + else if (tags.size() 0 taken.closes(tags.peek())) + { + tags.pop(); + } + next=nextTag(); return taken; } /** -* Skips to the closing tag of the tag retrieved from last call to {@link #popTag()} +* Skips to the closing tag of the tag retrieved from last call to {@link #takeTag()} */ public void skipToCloseTag() { - if (tags.peek().isOpen()) - { while (!next.closes(tags.peek())) { next = nextTag(); } - tags.pop(); - } } private ComponentTag nextTag() @@ -117,7 +137,7 @@ public final class DequeueContext { ComponentTag tag = (ComponentTag)element; ComponentTag open = tag.isClose() ? tag.getOpenTag() : tag
Re: ajax child component and enclosures visibility doesn't seem to work properly
that only works on inline enclosure - enclosures that do not use wicket:enclosure tags. -igor On Fri, Feb 21, 2014 at 5:37 AM, Simon B simon.bott...@gmail.com wrote: Hi, I'm using wicket 6.13. I've got an ajax link that I want to toggle the visibility of two components, each component is nested with an html div with a wicket:enclosure attribute. In my WebPage when the AjaxLink is clicked I add the components to the AjaxRequestTarget but not the div wicket:enclosure elements. WebPage code: Looking at this post I understand that I shouldn't need to add the element that has the wicket:enclosure attribute. Simplified visibility control of Enclosures in Ajax requests - https://issues.apache.org/jira/browse/WICKET-3422 Does any one have any suggestions as to why this isn't working? Any help greatly appreciated -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ajax-child-component-and-enclosures-visibility-doesn-t-seem-to-work-properly-tp4664606.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ajax child component and enclosures visibility doesn't seem to work properly
yes, thats what i mean. the markup you posted did not come through to the mailing list... -igor On Fri, Feb 21, 2014 at 7:48 AM, Simon B simon.bott...@gmail.com wrote: Hi Igor, Thanks for the reply. I'm a bit confused, the markup that I'm using (and that I posted originally) does have inline enclosure attributes: I understand that by inline enclosure you mean an html tag with a wicket:enclosure=... attribute like: div wicket:enclosure=aChildId Is that correct, or am I misunderstanding? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ajax-child-component-and-enclosures-visibility-doesn-t-seem-to-work-properly-tp4664606p4664615.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [2/2] git commit: WICKET-3335 nested borders working. everything should be working. needs more cleanup and javadoc
On Tue, Feb 18, 2014 at 4:53 AM, Martin Grigorov mgrigo...@apache.org wrote: On Sat, Feb 15, 2014 at 9:40 AM, ivaynb...@apache.org wrote: WICKET-3335 nested borders working. everything should be working. needs more cleanup and javadoc Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/384d748c Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/384d748c Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/384d748c Branch: refs/heads/sandbox/component-queueing-2 Commit: 384d748c150031fa584aa44fce2f0a7e05e98531 Parents: 14797ed Author: Igor Vaynberg igor.vaynb...@gmail.com Authored: Sat Feb 15 00:40:48 2014 -0800 Committer: Igor Vaynberg igor.vaynb...@gmail.com Committed: Sat Feb 15 00:40:48 2014 -0800 -- .../java/org/apache/wicket/DequeueContext.java | 5 +- .../java/org/apache/wicket/MarkupContainer.java | 11 +- .../wicket/markup/html/border/Border.java | 102 ++- .../wicket/queueing/ComponentQueueingTest.java | 24 ++--- .../org/apache/wicket/queueing/HasPath.java | 7 +- .../queueing/nestedborders/OuterBorder.html | 2 +- 6 files changed, 128 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/384d748c/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java index 8324161..4e62c3e 100644 --- a/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java +++ b/wicket-core/src/main/java/org/apache/wicket/DequeueContext.java @@ -1,13 +1,14 @@ package org.apache.wicket; import org.apache.wicket.markup.ComponentTag; +import org.apache.wicket.markup.IMarkupFragment; import org.apache.wicket.markup.Markup; import org.apache.wicket.markup.MarkupElement; import org.apache.wicket.util.collections.ArrayListStack; public class DequeueContext { - private final Markup markup; + private final IMarkupFragment markup; private int index; private ComponentTag next; private ArrayListStackComponentTag tags = new ArrayListStack(); @@ -37,7 +38,7 @@ public class DequeueContext } } - public DequeueContext(Markup markup, MarkupContainer root) + public DequeueContext(IMarkupFragment markup, MarkupContainer root) { this.markup = markup; containers.push(root); http://git-wip-us.apache.org/repos/asf/wicket/blob/384d748c/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java index 72f7cc9..e213f35 100644 --- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java +++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java @@ -2080,7 +2080,7 @@ public abstract class MarkupContainer extends Component implements IterableComp private void internalDequeue() { - Markup markup = getAssociatedMarkup(); + IMarkupFragment markup = getDequeueMarkup(); if (markup == null) { // markup not found, skip dequeuing @@ -2121,7 +2121,7 @@ public abstract class MarkupContainer extends Component implements IterableComp if (child != null) { - add(child); + addDequeuedComponent(child, tag); if (child instanceof IQueueRegion) { ((MarkupContainer)child).dequeue(); @@ -2159,6 +2159,11 @@ public abstract class MarkupContainer extends Component implements IterableComp } } + + protected IMarkupFragment getDequeueMarkup() { + return getAssociatedMarkup(); + } + protected boolean supportsDequeueingFrom(ComponentTag tag) { if (tag instanceof WicketTag) { WicketTag wicketTag=(WicketTag)tag; @@ -2172,7 +2177,7 @@ public abstract class MarkupContainer extends Component implements IterableComp return true; } - protected Component findComponentToDequeue(ComponentTag tag) + public Component findComponentToDequeue(ComponentTag tag) { return queue == null ? null : queue.remove(tag.getId()); } http://git-wip
Re: setting visibility of a component decocorated with a behavior
see IAjaxRegionMarkupIdProvider -igor On Mon, Feb 17, 2014 at 7:37 AM, Simon B simon.bott...@gmail.com wrote: Hi, I have a behavior that decorates the component that it is added to by using beforeRender(Component) and afterRender(Component). So a simplified version of my behavior would be I wish for the visibility of the surrounding html that is written to be driven by the visibility of the component that it wraps including when the component that it wraps is sent to the client in an AjaxRequestTarget. What would be the best way to do this? Any suggestions very much appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setting-visibility-of-a-component-decocorated-with-a-behavior-tp4664511.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: setting visibility of a component decocorated with a behavior
cheers -igor On Mon, Feb 17, 2014 at 1:53 PM, Simon B simon.bott...@gmail.com wrote: Igor, Incidentally the javadoc on that interface is awesome, thanks for taking the time to make it so easily readable and understandable. Cheers Simon -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setting-visibility-of-a-component-decocorated-with-a-behavior-tp4664511p4664520.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Markup driven component tree
i think the implementation is good enough to be merged into master now. it supports: * dequeuing algorithm that delegates to components so subclasses can override (this is how repeaters and borders support it) * support for all major constructs: panels, borders, repeaters * support for auto component hierarchy - they are dequeued and queued up children are placed as the children of auto components - this makes things like enclosures trivial to implement where as before they were fairy complex * performance comparable to adding, still some room for improvement with clever/efficient data structures maybe, but i dont think its needed... todo: * fragments - should be trivial, possibly as trivial as letting it implement IQueueRegion * check markup inheritance works on pages, panels, fragments. * examples * update to the guide -igor On Fri, Feb 14, 2014 at 8:36 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i am reworking the implementation a bit to properly support borders and repeaters by delegating to components...will check it in when i have it working... -igor On Fri, Feb 14, 2014 at 7:26 AM, Martin Grigorov mgrigo...@apache.org wrote: On Mon, Feb 10, 2014 at 6:01 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: On Mon, Feb 10, 2014 at 6:26 AM, Martin Grigorov mgrigo...@apache.org wrote: On Mon, Feb 10, 2014 at 9:43 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i just pushed my new idea into sandbox/component-queueing-2 the way this works now is instead of doing it in onInitialize() and in onConfigure() and all the other places dequeuing now works progressively. upon a change (container.queue() or component.add()) a dequeue will be tried. it even works well with resolved components like enclosures. for such components the markup of page/panel is traversed in onInitialize() and all auto components are placed into the queue. later as components are added/queued these components will be placed into the correct place in the hierarchy. if queue() is used children of these components will be placed under them in correct hierarchy place. this is a big win for using queueing over adding. repeaters also work. the repeater items themselves have to be added to the repeater, but item's children can be queued. this is not a problem since items are mostly added by framework classes. Borders do not yet work mainly because i havent tried to make them work. the tricky part there is to keep the border and BorderBody queues separate. I've added some code to support it but it needs more work. See my response to the commit notification email of my changes. Basic usage of Border is now supported. I have added a test with nested Borders and it fails. Please check org.apache.wicket.queueing.ComponentQueueingTest#dequeueWithNestedBorders Also we have BorderBehavior and BorderPanel. I think (almost) no one uses those but they exist. imho we can nuke these two things from 7. they dont look very useful. probably added just because we could. InlineEnclosures do not yet work because the code for figuring out the value of the child attribute is really convoluted for the simple thing its supposed to do and i didnt bother parsing it. Should be very similar to how EnclosureHandler works. Done. thanks. the performance is good. there is ComponentQueueingPerformanceTest with a disabled test. give it a go and let me know the results. on my box queuing had under 10% overhead, which is acceptable. I also have some ideas on how to optimize that further by trading cpu for a bit more memory, but not sure In my branch on this topic I used HashMap instead of array. The lookup is faster. Not sure how much memory overhead there is. yeah. havent had time to profile it yet. there are some memory efficient hashmaps floating around, maybe we can adapt one of them. I've added ComponentQueue2 based on HashMap with the same initial capacity (8) and loadFactor 1. wicket-util has MicroMap for 1entry and MiniMap for fixed size entries but it doesn't use hash function so it iterates over the entries as we do over the array in ComponentQueue(1). With ComponentQueue2 the map will start with capacity 8 and will double when the ninth is to be added, as in ComponentQueue. But it won't shrink until it becomes with size 0. org.apache.wicket.queueing.ComponentQueueingPerformanceTest gives almost the same results for both impls here: add duration: ~2500 queue duration: ~2400 memory wise Intellij IDEA reports: - with ComponentQueue: max memory 88Mb - with ComponentQueue2: max memory 154Mb so ComponentQueue is a winner here. I've added ComponentQueue2 just in case someone wants to try to optimize it -igor if its needed since the overhead is low and because its only present when queuing is used. also the measurements are not too accurate because most
Re: Jetty, Wicket and getting live JavaScript changes?
Make sure wicket is running in development mode. It will scan resources for changes. A refresh in the browser will load the latest version. -igor On Feb 14, 2014 3:59 PM, tertioptus benpaige...@hotmail.com wrote: I use Jetty, maven and Eclipse. *What's the best way for me to have Jetty pick up my changes from a JavaScript file not in the war project?* Currently, I have clean install both projects and then restart jetty to see changes. I am assuming this is common among Wicket users with the advent of component bound resources. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Jetty-Wicket-and-getting-live-JavaScript-changes-tp4664472.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Jetty, Wicket and getting live JavaScript changes?
Yes. Because they have shared classpath. -igor On Feb 15, 2014 7:58 AM, tertioptus benpaige...@hotmail.com wrote: Even if the resource files are in another project? Which is my particular issue. /For instance: Module 1 - jar ---some-wicket-component.java ---some-javascript-file.js Module 2 - war -depends on Module 1 Running Module 2 via jetty / I'm not sure how Wicket could pick up those changes. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Jetty-Wicket-and-getting-live-JavaScript-changes-tp4664472p4664481.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Markup driven component tree
i am reworking the implementation a bit to properly support borders and repeaters by delegating to components...will check it in when i have it working... -igor On Fri, Feb 14, 2014 at 7:26 AM, Martin Grigorov mgrigo...@apache.org wrote: On Mon, Feb 10, 2014 at 6:01 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: On Mon, Feb 10, 2014 at 6:26 AM, Martin Grigorov mgrigo...@apache.org wrote: On Mon, Feb 10, 2014 at 9:43 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: i just pushed my new idea into sandbox/component-queueing-2 the way this works now is instead of doing it in onInitialize() and in onConfigure() and all the other places dequeuing now works progressively. upon a change (container.queue() or component.add()) a dequeue will be tried. it even works well with resolved components like enclosures. for such components the markup of page/panel is traversed in onInitialize() and all auto components are placed into the queue. later as components are added/queued these components will be placed into the correct place in the hierarchy. if queue() is used children of these components will be placed under them in correct hierarchy place. this is a big win for using queueing over adding. repeaters also work. the repeater items themselves have to be added to the repeater, but item's children can be queued. this is not a problem since items are mostly added by framework classes. Borders do not yet work mainly because i havent tried to make them work. the tricky part there is to keep the border and BorderBody queues separate. I've added some code to support it but it needs more work. See my response to the commit notification email of my changes. Basic usage of Border is now supported. I have added a test with nested Borders and it fails. Please check org.apache.wicket.queueing.ComponentQueueingTest#dequeueWithNestedBorders Also we have BorderBehavior and BorderPanel. I think (almost) no one uses those but they exist. imho we can nuke these two things from 7. they dont look very useful. probably added just because we could. InlineEnclosures do not yet work because the code for figuring out the value of the child attribute is really convoluted for the simple thing its supposed to do and i didnt bother parsing it. Should be very similar to how EnclosureHandler works. Done. thanks. the performance is good. there is ComponentQueueingPerformanceTest with a disabled test. give it a go and let me know the results. on my box queuing had under 10% overhead, which is acceptable. I also have some ideas on how to optimize that further by trading cpu for a bit more memory, but not sure In my branch on this topic I used HashMap instead of array. The lookup is faster. Not sure how much memory overhead there is. yeah. havent had time to profile it yet. there are some memory efficient hashmaps floating around, maybe we can adapt one of them. I've added ComponentQueue2 based on HashMap with the same initial capacity (8) and loadFactor 1. wicket-util has MicroMap for 1entry and MiniMap for fixed size entries but it doesn't use hash function so it iterates over the entries as we do over the array in ComponentQueue(1). With ComponentQueue2 the map will start with capacity 8 and will double when the ninth is to be added, as in ComponentQueue. But it won't shrink until it becomes with size 0. org.apache.wicket.queueing.ComponentQueueingPerformanceTest gives almost the same results for both impls here: add duration: ~2500 queue duration: ~2400 memory wise Intellij IDEA reports: - with ComponentQueue: max memory 88Mb - with ComponentQueue2: max memory 154Mb so ComponentQueue is a winner here. I've added ComponentQueue2 just in case someone wants to try to optimize it -igor if its needed since the overhead is low and because its only present when queuing is used. also the measurements are not too accurate because most of the time is spent initializing and tearing down a WicketTester instance. memory overhead is also low, two slots (one of which can/should be converted to a flag) are added to MarkupContainer. see ComponentQueuing test for some examples. i would appreciate some help getting Border and InlineEnclosure working if someone has time. look over this and lets discuss if/when we should merge it into master. -igor
Re: [VOTE] Release Apache Wicket 6.14.0 - second try
+1 -igor On Fri, Feb 14, 2014 at 7:45 AM, Jonas barney...@gmail.com wrote: [X] Yes, release Apache Wicket 6.14.0 (try 2) (non binding) Tested our main webapp, plus verified the jira tracks I've filed (WICKET-5469, WICKET-5493) cheers, Jonas On Fri, Feb 14, 2014 at 4:01 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: This is a vote to release Apache Wicket 6.14.0 - try 2 This updated release includes a true fix for 5499, and a better error log in wicket-ajax.js when binding fails, and a minor improvement for some javadoc. Please download the source distributions found in our staging area linked below. I have included the signatures for both the source archives. This vote lasts for 72 hours minimum. [ ] Yes, release Apache Wicket 6.14.0 [ ] No, don't release Apache Wicket 6.14.0, because ... Distributions, changelog, keys and signatures can be found at: https://dist.apache.org/repos/dist/dev/wicket/6.14.0 Staging repository: https://repository.apache.org/content/repositories/orgapachewicket-1005/ The binaries are available in the above link, as are a staging repository for Maven. Typically the vote is on the source, but should you find a problem with one of the binaries, please let me know, I can re-roll them some way or the other. The signatures for the source release artefacts: apache-wicket-6.14.0.zip.asc -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iEYEABECAAYFAlL+LS0ACgkQJBX8W/xy/UX/8ACgvodMozusdl4w0mZKl0DXjq0W +7wAoJ7tamy1sGeP6b5DSNrUVUq5pkp9 =BXJk -END PGP SIGNATURE- apache-wicket-6.14.0.tar.gz.asc -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) Comment: GPGTools - https://gpgtools.org iEYEABECAAYFAlL+LSwACgkQJBX8W/xy/UUDiACgjhnZzVRFf7rgKpP0XFmO3KAM /MsAnj5qOjKYrVoM15VLMngXF7ONM4AS =8NdL -END PGP SIGNATURE- Release Notes - Wicket - Version 6.14.0 ** Bug * [WICKET-4697] - Autolinking not working as soon as component gets a wicket:id * [WICKET-5043] - Page not mounted with WebApplication#mountPackage * [WICKET-5449] - Missing chapter 2 is causing off-by-one page names in the guides URL links * [WICKET-5460] - onBeforeRender called too early on stateless page * [WICKET-5462] - Ajax form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton * [WICKET-5464] - AbstractAjaxTimerBehavior does not work in combination with Wizards * [WICKET-5466] - ListenerInterfaceRequestHandler#respond throws ComponentNotFoundException as a side-effect * [WICKET-5467] - NumberTextField should support any as valid step attribute value * [WICKET-5468] - UrlRenderer#renderRelativeUrl potentially appends / after query parameters * [WICKET-5469] - ModalWindow unload warning always displayed (even if window is closed) * [WICKET-5472] - PackageResource#internalGetResourceStream() should return ProcessingResourceStream only when the resource is existing * [WICKET-5473] - Wicket does not handle non in-memory Httpsessions correctly * [WICKET-5477] - CSS class is not applied to TD for data filter * [WICKET-5478] - Wrong JavaDoc for WicketTester * [WICKET-5480] - AutoLabelResolver creates null pointer exception in 6.13 * [WICKET-5482] - Wicket-guice doesn't support @javax.inject.Named annotations * [WICKET-5484] - WebPageRenderer must not render full page in Ajax requests * [WICKET-5486] - WebPageRenderer should honor RedirectPolicy.ALWAYS_REDIRECT more consistently * [WICKET-5491] - Wicket.DateTime.getViewportHeight() returning undefined on IE8, positions calendar out of viewport * [WICKET-5492] - WebApplication ignores a SecurityException when reading the configuration type * [WICKET-5496] - Wrong translation of RangeValidator.minimum and RangeValidator.maximum * [WICKET-5497] - NPE in JsonUtils when the value is null * [WICKET-5499] - Page is not touched during initialization * [WICKET-5500] - Ignore the path parameters when reading the page class * [WICKET-5502] - Patch FileUploadBase to fix CVE-2014-0050 ** Improvement * [WICKET-5288] - Allow script-Tags act as WebMarkUpContainer to add Child-Components * [WICKET-5439] - Allow restarting
[jira] [Commented] (WICKET-3335) Component Queuing (extract hierarchy information from markup)
[ https://issues.apache.org/jira/browse/WICKET-3335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13896310#comment-13896310 ] Igor Vaynberg commented on WICKET-3335: --- new implementation in sandbox/component-queueing-2 Component Queuing (extract hierarchy information from markup) - Key: WICKET-3335 URL: https://issues.apache.org/jira/browse/WICKET-3335 Project: Wicket Issue Type: New Feature Components: wicket Reporter: Giannis Koutsoubos Assignee: Igor Vaynberg Attachments: 0001-component-queuing.patch, wicket-3335.patch Doubly defined hierarhices are redundant. Server-side hierarchy can be automatically deduced from markup hierarchy. Use queue method in MarkupContainer to add components and extract hierarchy information from markup. Discussed here: http://apache-wicket.1842946.n4.nabble.com/Free-wicket-from-component-hierarchy-hell-td3027705.html Implementation of queue method on branch 1.4.x : https://github.com/koutsoub/wicket/tree/component-queuing -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (WICKET-3335) Component Queuing (extract hierarchy information from markup)
[ https://issues.apache.org/jira/browse/WICKET-3335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13896324#comment-13896324 ] Igor Vaynberg commented on WICKET-3335: --- http://markmail.org/message/jzotleixyjxhgn5m Component Queuing (extract hierarchy information from markup) - Key: WICKET-3335 URL: https://issues.apache.org/jira/browse/WICKET-3335 Project: Wicket Issue Type: New Feature Components: wicket Reporter: Giannis Koutsoubos Assignee: Igor Vaynberg Attachments: 0001-component-queuing.patch, wicket-3335.patch Doubly defined hierarhices are redundant. Server-side hierarchy can be automatically deduced from markup hierarchy. Use queue method in MarkupContainer to add components and extract hierarchy information from markup. Discussed here: http://apache-wicket.1842946.n4.nabble.com/Free-wicket-from-component-hierarchy-hell-td3027705.html Implementation of queue method on branch 1.4.x : https://github.com/koutsoub/wicket/tree/component-queuing -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Re: Markup driven component tree
in the MarkupContainer#children data structure. So each field will add extra 8 bytes on 64bit machine (or 4 bytes with CompressedOops enabled). Serialization is the same - the object is written once, with several pointers. I am also not fully sure in the approach but I am experimenting and so far it works well. And it is configurable, by default disabled. We can advertise it as experimental ?! I will add more use cases/tests soon. And caching for the reflection stuff. On Thu, Jan 23, 2014 at 6:09 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: what about components added in onInitialize() or on onConfigure()? this will also lead to a higher memory/serialization space usage since by default you need a field to store the component ref. not sure its worth doing it this way... -igor On Wed, Jan 22, 2014 at 12:12 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Recently Fridolin Jackstadt shared his approach to autowire components - https://github.com/wicket-acc/wicket-autowire. I believe this approach can solve two issues: - duplicate construction of the component tree - once in the markup and second time in Java code - auto components available only in the render phase Here is how I see it: Any MarkupContainer that wants to use markup-driven-tree must declare the components as member fields: private SomeComponent aComponent; These fields will be instantiated like any other component in Wicket: aComponent = new SomeComponent(id, ...); The new thing is that they *won't* be added to a parent component explicitly/manually. On Page#onInitialize() the first thing to do it to walk over the component tree from the page's markup (just like the walk in the rendering related code) and resolve the missing bits. I.e. while walking thru the markup tree we will check the Java component tree (container.get(tagId)). If there is a miss then we search for a member field that is a component with the same id in the current MarkupContainer, its (Java) super classes and finally in its (Wicket) parent classes. This will solve issue #1 (identical trees in Java and markup) (P.S. Fridolin's code uses @AutoComponent annotation that facilitates searching by component id, but will duplicate the declaration of the id - once in the annotation and second time in 'new MyComponent(ID). This is an implementation detail.) The second part is not less hard - during the walk over the markup tree when an autocomponent (e.g. enclosure) is seen Wicket will use the registered IComponentResolvers to create the Java component and insert it in the Java tree. The tricky part here is that any manually added components (like in Wicket 6.x) to the parent of the autocomponent should be moved into the autocomponent. For example: div wicket:id=a wicket:enclosure child=b span wicket:id=b/span span wicket:id=c/span /wicket:enclosure /div If 'b' and 'c' are added manually to 'a' in the application's Java code: (a (b,c)) then after the resolving phase the tree will be: a (enclosure(b, c)) so b.getParent() in onInitialize() and later will return the Enclosure, not 'a'. I don't know very well the MarkupStream APIs but I think all this should be possible. WDYT about this approach ? Martin Grigorov Wicket Training and Consulting
Re: Markup driven component tree
On Mon, Feb 10, 2014 at 6:26 AM, Martin Grigorov mgrigo...@apache.org wrote: On Mon, Feb 10, 2014 at 9:43 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: i just pushed my new idea into sandbox/component-queueing-2 the way this works now is instead of doing it in onInitialize() and in onConfigure() and all the other places dequeuing now works progressively. upon a change (container.queue() or component.add()) a dequeue will be tried. it even works well with resolved components like enclosures. for such components the markup of page/panel is traversed in onInitialize() and all auto components are placed into the queue. later as components are added/queued these components will be placed into the correct place in the hierarchy. if queue() is used children of these components will be placed under them in correct hierarchy place. this is a big win for using queueing over adding. repeaters also work. the repeater items themselves have to be added to the repeater, but item's children can be queued. this is not a problem since items are mostly added by framework classes. Borders do not yet work mainly because i havent tried to make them work. the tricky part there is to keep the border and BorderBody queues separate. I've added some code to support it but it needs more work. See my response to the commit notification email of my changes. Also we have BorderBehavior and BorderPanel. I think (almost) no one uses those but they exist. imho we can nuke these two things from 7. they dont look very useful. probably added just because we could. InlineEnclosures do not yet work because the code for figuring out the value of the child attribute is really convoluted for the simple thing its supposed to do and i didnt bother parsing it. Should be very similar to how EnclosureHandler works. Done. thanks. the performance is good. there is ComponentQueueingPerformanceTest with a disabled test. give it a go and let me know the results. on my box queuing had under 10% overhead, which is acceptable. I also have some ideas on how to optimize that further by trading cpu for a bit more memory, but not sure In my branch on this topic I used HashMap instead of array. The lookup is faster. Not sure how much memory overhead there is. yeah. havent had time to profile it yet. there are some memory efficient hashmaps floating around, maybe we can adapt one of them. -igor if its needed since the overhead is low and because its only present when queuing is used. also the measurements are not too accurate because most of the time is spent initializing and tearing down a WicketTester instance. memory overhead is also low, two slots (one of which can/should be converted to a flag) are added to MarkupContainer. see ComponentQueuing test for some examples. i would appreciate some help getting Border and InlineEnclosure working if someone has time. look over this and lets discuss if/when we should merge it into master. -igor
Re: [VOTE] Release Apache Wicket 1.4.22
+1 -igor On Thu, Jan 30, 2014 at 5:00 AM, Martin Grigorov mgrigo...@apache.orgwrote: This vote is to release Apache Wicket 1.4.22 Git repo http://git-wip-us.apache.org/repos/asf/wicket.git Branch name build/wicket-1.4.22 Archived and signed Git repo https://dist.apache.org/repos/dist/dev/wicket/1.4.22/ Staging Maven repo: https://repository.apache.org/content/repositories/orgapachewicket-1001/ Changelog https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561version=12324070 This vote ends Tuesday, February 4 at 14:00 (GMT+2) Please test the release and offer your vote. The Wicket team!
Re: Eclipse formatting, was: Martin's wicket pull request
if the formatter config is correct i shouldnt have to just format edited lines... -igor On Tue, Jan 28, 2014 at 4:30 AM, Sven Meier s...@meiers.net wrote: Our format defines lineSplit=100, so that lines gets wrapped correctly. If you're using Eclipse's Save Actions, do you have format edited lines selected in the configuration? Regards Sven On 01/28/2014 09:52 AM, Igor Vaynberg wrote: apparently eclipse formatter setup in master is incorrect. i am working on a new queuing implementation idea and keep getting crap like this all over the code, any ideas? after running code cleanup on the workspace all the files are modified and i have effectively lost my changes... -igor diff --git a/wicket-core/src/main/java/org/apache/wicket/Application.java b/wicket-core/src/main/java/org/apache/wicket/Application.java index 7d8e52b..eab5a42 100644 --- a/wicket-core/src/main/java/org/apache/wicket/Application.java +++ b/wicket-core/src/main/java/org/apache/wicket/Application.java @@ -155,7 +155,8 @@ public abstract class Application implements UnboundListener, IEventSink * without being in a request/ being set in the thread local (we need that e.g. for when we are * in a destruction thread). */ - private static final MapString, Application applicationKeyToApplication = Generics.newHashMap(1); + private static final MapString, Application applicationKeyToApplication = Generics + .newHashMap(1); /** Log. */ private static final Logger log = LoggerFactory.getLogger(Application.class); @@ -219,8 +220,8 @@ public abstract class Application implements UnboundListener, IEventSink Application application = ThreadContext.getApplication(); if (application == null) { - throw new WicketRuntimeException(There is no application attached to current thread + - Thread.currentThread().getName()); + throw new WicketRuntimeException(There is no application attached to current thread + + Thread.currentThread().getName()); On Thu, Nov 14, 2013 at 3:07 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: I did not realise this was waiting on me. I guess the main problem with using the resources bundle approach is that the formatting.xml remains necessary for compatibility with IntelliJ (and perhaps Netbeans). So we can't just bundle up the .settings folder and use that as the canonical version. Martijn On Tue, Nov 12, 2013 at 11:10 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: any progress Martijn? -igor On Sun, Nov 10, 2013 at 12:49 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: We can let the eclipse plugin automatically add the project settings if we upload a jar to maven central with our configuration. plugin artifactIdmaven-eclipse-plugin/artifactId version2.9/version inheritedtrue/inherited configuration downloadSourcestrue/downloadSources downloadJavadocfalse/downloadJavadoc ajdtVersion${java.version}/ajdtVersion additionalConfig file name.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs/name location/edu.umd.cs.findbugs.plugin.eclipse.prefs/location /file file name.settings/org.eclipse.core.resources.prefs/name location/org.eclipse.core.resources.prefs/location /file file name.settings/org.eclipse.jdt.apt.core.prefs/name location/org.eclipse.jdt.apt.core.prefs/location /file file name.settings/org.eclipse.jdt.core.prefs/name location/org.eclipse.jdt.core.prefs/location /file file name.settings/org.eclipse.jdt.ui.prefs/name location/org.eclipse.jdt.ui.prefs/location /file file name.settings/org.eclipse.wst.validation.prefs/name location/org.eclipse.wst.validation.prefs/location /file file name.settings/org.maven.ide.eclipse.prefs/name location/org.maven.ide.eclipse.prefs/location /file /additionalConfig /configuration dependencies dependency groupIdnl.topicus.onderwijs/groupId artifactIdeclipse-settings/artifactId version2012.2.2/version /dependency /dependencies /plugin On Sun, Nov 10, 2013 at 12:45 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: yes, making it a workspace default messes up other projects... this way every time i import a project into the eclipse workspace i have to go and manually set the formatter on every module, which as you can imagine is not optimal -igor On Sat, Nov 9, 2013 at 1:40 PM, Martin Grigorov mgrigo...@apache.org wrote: But you have to import the xml just once, right ? It is not a big deal. Or the problem is that the xml messes up the other projects in your workspace ? On Sat, Nov 9, 2013 at 7:24 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: it is really frustrating that i have to do this manually now. before all i had to do was checkout the project and it was all set. wicket shares my workspace
Re: [Vote] Release Apache Wicket 1.5.11
+1 -igor On Thu, Jan 23, 2014 at 1:00 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: +1 On Mon, Jan 20, 2014 at 5:09 PM, Martin Grigorov mgrigo...@apache.orgwrote: This vote is to release Apache Wicket 1.5.11 Git repo http://git-wip-us.apache.org/repos/asf/wicket.git Branch name build/wicket-1.5.11 Archived and signed Git repo https://dist.apache.org/repos/dist/dev/wicket/1.5.11/ Changelog https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561version=12324069 This vote ends Thursday, January 23 at 18:00 (GMT+2) Please test the release and offer your vote. The Wicket team! -- Become a Wicket expert, learn from the best: http://wicketinaction.com
Re: Markup driven component tree
what about components added in onInitialize() or on onConfigure()? this will also lead to a higher memory/serialization space usage since by default you need a field to store the component ref. not sure its worth doing it this way... -igor On Wed, Jan 22, 2014 at 12:12 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Recently Fridolin Jackstadt shared his approach to autowire components - https://github.com/wicket-acc/wicket-autowire. I believe this approach can solve two issues: - duplicate construction of the component tree - once in the markup and second time in Java code - auto components available only in the render phase Here is how I see it: Any MarkupContainer that wants to use markup-driven-tree must declare the components as member fields: private SomeComponent aComponent; These fields will be instantiated like any other component in Wicket: aComponent = new SomeComponent(id, ...); The new thing is that they *won't* be added to a parent component explicitly/manually. On Page#onInitialize() the first thing to do it to walk over the component tree from the page's markup (just like the walk in the rendering related code) and resolve the missing bits. I.e. while walking thru the markup tree we will check the Java component tree (container.get(tagId)). If there is a miss then we search for a member field that is a component with the same id in the current MarkupContainer, its (Java) super classes and finally in its (Wicket) parent classes. This will solve issue #1 (identical trees in Java and markup) (P.S. Fridolin's code uses @AutoComponent annotation that facilitates searching by component id, but will duplicate the declaration of the id - once in the annotation and second time in 'new MyComponent(ID). This is an implementation detail.) The second part is not less hard - during the walk over the markup tree when an autocomponent (e.g. enclosure) is seen Wicket will use the registered IComponentResolvers to create the Java component and insert it in the Java tree. The tricky part here is that any manually added components (like in Wicket 6.x) to the parent of the autocomponent should be moved into the autocomponent. For example: div wicket:id=a wicket:enclosure child=b span wicket:id=b/span span wicket:id=c/span /wicket:enclosure /div If 'b' and 'c' are added manually to 'a' in the application's Java code: (a (b,c)) then after the resolving phase the tree will be: a (enclosure(b, c)) so b.getParent() in onInitialize() and later will return the Enclosure, not 'a'. I don't know very well the MarkupStream APIs but I think all this should be possible. WDYT about this approach ? Martin Grigorov Wicket Training and Consulting
Re: Markup driven component tree
On Thu, Jan 23, 2014 at 8:20 AM, Martin Grigorov mgrigo...@apache.org wrote: Once the markup driven construction is done (just before onInitialize()) the application will have to use the old good add()/addOrReplace(). yeah, but onInitialize() is there to partially replace the constructor as a place to add components. The components are already in the MarkupContainer#children data structure. So each field will add extra 8 bytes on 64bit machine (or 4 bytes with CompressedOops enabled). yes, thats the 8 bytes i was talking about. considering some pages have easily over a hundred components that adds up. Serialization is the same - the object is written once, with several pointers. no, serialization will suffer from the same 8 bytes per component reference issue. that means thats a bunch more bytes to shuffle to and from disk and also across network when clustered. I am also not fully sure in the approach but I am experimenting and so far it works well. And it is configurable, by default disabled. We can advertise it as experimental ?! something like this cannot be enabled/disabled. if a component library uses it then it will fail on applications where this is disabled. also, what happens in situations where ids are not unique? then those cannot be put into the hierarchy? its common to have structure like this: a wicket:id=removespan wicket:id=label/span/aa wicket:id=addspan wicket:id=label/a another exception is the repeater, unless you create a custom subclass of Item which no one ever does. seems to me there are too many gotchas for all but the most trivial cases. couple this together with the fact that it has to be enabled as mentioned above would put me at -0.5 for this for now. -igor I will add more use cases/tests soon. And caching for the reflection stuff. On Thu, Jan 23, 2014 at 6:09 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: what about components added in onInitialize() or on onConfigure()? this will also lead to a higher memory/serialization space usage since by default you need a field to store the component ref. not sure its worth doing it this way... -igor On Wed, Jan 22, 2014 at 12:12 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Recently Fridolin Jackstadt shared his approach to autowire components - https://github.com/wicket-acc/wicket-autowire. I believe this approach can solve two issues: - duplicate construction of the component tree - once in the markup and second time in Java code - auto components available only in the render phase Here is how I see it: Any MarkupContainer that wants to use markup-driven-tree must declare the components as member fields: private SomeComponent aComponent; These fields will be instantiated like any other component in Wicket: aComponent = new SomeComponent(id, ...); The new thing is that they *won't* be added to a parent component explicitly/manually. On Page#onInitialize() the first thing to do it to walk over the component tree from the page's markup (just like the walk in the rendering related code) and resolve the missing bits. I.e. while walking thru the markup tree we will check the Java component tree (container.get(tagId)). If there is a miss then we search for a member field that is a component with the same id in the current MarkupContainer, its (Java) super classes and finally in its (Wicket) parent classes. This will solve issue #1 (identical trees in Java and markup) (P.S. Fridolin's code uses @AutoComponent annotation that facilitates searching by component id, but will duplicate the declaration of the id - once in the annotation and second time in 'new MyComponent(ID). This is an implementation detail.) The second part is not less hard - during the walk over the markup tree when an autocomponent (e.g. enclosure) is seen Wicket will use the registered IComponentResolvers to create the Java component and insert it in the Java tree. The tricky part here is that any manually added components (like in Wicket 6.x) to the parent of the autocomponent should be moved into the autocomponent. For example: div wicket:id=a wicket:enclosure child=b span wicket:id=b/span span wicket:id=c/span /wicket:enclosure /div If 'b' and 'c' are added manually to 'a' in the application's Java code: (a (b,c)) then after the resolving phase the tree will be: a (enclosure(b, c)) so b.getParent() in onInitialize() and later will return the Enclosure, not 'a'. I don't know very well the MarkupStream APIs but I think all this should be possible. WDYT about this approach ? Martin Grigorov Wicket Training and Consulting
Re: Markup driven component tree
On Thu, Jan 23, 2014 at 8:53 AM, Martin Grigorov mgrigo...@apache.org wrote: On Thu, Jan 23, 2014 at 6:36 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: On Thu, Jan 23, 2014 at 8:20 AM, Martin Grigorov mgrigo...@apache.org wrote: Once the markup driven construction is done (just before onInitialize()) the application will have to use the old good add()/addOrReplace(). yeah, but onInitialize() is there to partially replace the constructor as a place to add components. It is perfectly fine to add components later. If markup-driven construction cannot find a component it doesn't blow immediately. It just ignores the rest of the markup stream below the missing component. If there is a missing component during rendering then an exception is thrown. The components are already in the MarkupContainer#children data structure. So each field will add extra 8 bytes on 64bit machine (or 4 bytes with CompressedOops enabled). yes, thats the 8 bytes i was talking about. considering some pages have easily over a hundred components that adds up. Serialization is the same - the object is written once, with several pointers. no, serialization will suffer from the same 8 bytes per component reference issue. that means thats a bunch more bytes to shuffle to and from disk and also across network when clustered. Well, I see no other way to find a reference to a component :-/ If a page has 1000 components then this is 8k more. 1000 components is a lot. Most pages have much less. I have to check again but recently while working on Memcached based IDataStore I think a pretty simple page serialized was about 60k. I am also not fully sure in the approach but I am experimenting and so far it works well. And it is configurable, by default disabled. We can advertise it as experimental ?! something like this cannot be enabled/disabled. if a component library uses it then it will fail on applications where this is disabled. yes, this is true a workaround here is each MarkupContainer can declare whether it supports markup-driven tree by overriding org.apache.wicket.MarkupContainer#isMarkupDrivenComponentTreeEnabled i.e. the library component can always return true also, what happens in situations where ids are not unique? then those cannot be put into the hierarchy? its common to have structure like this: a wicket:id=removespan wicket:id=label/span/aa wicket:id=addspan wicket:id=label/a This should work fine at the moment. Each MarkupContainer instance resolves its own fields/components. I'll add test tomorrow to verify. not sure what you mean by works fine. @Auto WebMarkupContainer a,b,c,d; a=new Link(remove); b=new Label(label, remove); c=new Link(add); d=new Label(label, add); how does wicket know the difference between b and d? this will get worse with subclasses as now you have to be aware to not add any component with the same id used in the class hierarchy... -igor another exception is the repeater, unless you create a custom subclass of Item which no one ever does. another test to add ! seems to me there are too many gotchas for all but the most trivial cases. couple this together with the fact that it has to be enabled as mentioned above would put me at -0.5 for this for now. -igor I will add more use cases/tests soon. And caching for the reflection stuff. On Thu, Jan 23, 2014 at 6:09 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: what about components added in onInitialize() or on onConfigure()? this will also lead to a higher memory/serialization space usage since by default you need a field to store the component ref. not sure its worth doing it this way... -igor On Wed, Jan 22, 2014 at 12:12 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, Recently Fridolin Jackstadt shared his approach to autowire components - https://github.com/wicket-acc/wicket-autowire. I believe this approach can solve two issues: - duplicate construction of the component tree - once in the markup and second time in Java code - auto components available only in the render phase Here is how I see it: Any MarkupContainer that wants to use markup-driven-tree must declare the components as member fields: private SomeComponent aComponent; These fields will be instantiated like any other component in Wicket: aComponent = new SomeComponent(id, ...); The new thing is that they *won't* be added to a parent component explicitly/manually. On Page#onInitialize() the first thing to do it to walk over the component tree from the page's markup (just like the walk in the rendering related code) and resolve the missing bits. I.e. while walking thru the markup tree we will check the Java component tree (container.get(tagId)). If there is a miss then we search for a member field that is a component with the same id
[jira] [Resolved] (WICKET-4062) Introduce wicket:link attribute in addition to wicket:link tag
[ https://issues.apache.org/jira/browse/WICKET-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-4062. --- Resolution: Won't Fix Introduce wicket:link attribute in addition to wicket:link tag -- Key: WICKET-4062 URL: https://issues.apache.org/jira/browse/WICKET-4062 Project: Wicket Issue Type: New Feature Reporter: Igor Vaynberg Assignee: Igor Vaynberg Sometimes there are situations where having a more fine-grained control over auto-linking is desired. for example (WICKET-3930) {code} wicket:link a href=MyPage.htmlimg src=foo.jpg//a /wicket:link {code} in this case wicket:link will rewrite both the href and src where only href needs to be rewritten. if we had an attribute we can rewrite the above as follows {code} a wicket:link href=MyPage.htmlimg src=foo.jpg//a {code} -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (WICKET-3491) Introduce IComponentConfigurationListener
[ https://issues.apache.org/jira/browse/WICKET-3491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13873530#comment-13873530 ] Igor Vaynberg commented on WICKET-3491: --- no, i did not have any strong opinions against this. should probably be IComponentOnConfigureListener though Introduce IComponentConfigurationListener - Key: WICKET-3491 URL: https://issues.apache.org/jira/browse/WICKET-3491 Project: Wicket Issue Type: New Feature Components: wicket Affects Versions: 1.4.16, 1.5-RC2 Reporter: Sven Ludwig Labels: features, wicket Has it been considered to also add IComponentConfigurationListener in the wake of WICKET-2955 onConfigure? Such a listener would allow for a minimally-invasive, save, global hiding of Components of any determinable category. If the listener is introduced, a decision needs to be made whether or not to support pre- and post-semantics in the Application, as they are supported with the IComponentOnBeforeRenderListener. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Re: Why is getDisplayValue in getDisplayValue final?
On Wed, Jan 8, 2014 at 11:41 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi Igor, While I see what you mean I think that often this is not the case. At least when using open source library. Most of the time users/developers do not read Javadoc but use the code directly. this is not my experience. most users can barely attach javadoc to their ide, not even speaking about source. If I want to override a method I'd first consult with the source of the overridden method, not with the Javadoc of the overridden method or its super. if you consulted with the source you would see that there is no reason to override that method directly as its functionality can be completely replaced by overriding postprocess()... so why override the original? -igor Martin Grigorov Wicket Training and Consulting On Thu, Jan 9, 2014 at 1:12 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: the method is final because overriding it means you will most likely break the contract of the resourceKey and postprocess methods which are meant to be used by you to customze the behavior of getDisplayValue(). so lets say you create subclass MyEnumChoiceRenderer with an overridden getDisplayValue() that no longer calls postprocess(). then someone subclasses your subclass and overrides postprocess() expecting it to be called (thats what the javadoc says) but it wont be, because you broke the contract. having getDisplayValue() be final prevents you from breaking this contract and saving hours of head scratching down the road. if you look at EnumChoiceRenderer without getDisplayValue() there is only one meaningful line of code left: return Classes.simpleName(object.getDeclaringClass()) + '.' + object.name (); everything else is javadoc or declarations. so why all the fuss over a trivial line of code? -igor ps: ironically if you did want to override getDisplayValue() in a way that broke the contract you would have to make your subclass final so no one further down the road could subclass it... On Tue, Jan 7, 2014 at 6:37 AM, Oliver B. Fischer mails...@swe-blog.net wrote: Hi, I just tried to customize EnumChoiceRenderer and to override getDisplayValue, but is final. Why? Can I submit a patch to remove final? Bye, Oliver - 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: Why is getDisplayValue in getDisplayValue final?
the method is final because overriding it means you will most likely break the contract of the resourceKey and postprocess methods which are meant to be used by you to customze the behavior of getDisplayValue(). so lets say you create subclass MyEnumChoiceRenderer with an overridden getDisplayValue() that no longer calls postprocess(). then someone subclasses your subclass and overrides postprocess() expecting it to be called (thats what the javadoc says) but it wont be, because you broke the contract. having getDisplayValue() be final prevents you from breaking this contract and saving hours of head scratching down the road. if you look at EnumChoiceRenderer without getDisplayValue() there is only one meaningful line of code left: return Classes.simpleName(object.getDeclaringClass()) + '.' + object.name(); everything else is javadoc or declarations. so why all the fuss over a trivial line of code? -igor ps: ironically if you did want to override getDisplayValue() in a way that broke the contract you would have to make your subclass final so no one further down the road could subclass it... On Tue, Jan 7, 2014 at 6:37 AM, Oliver B. Fischer mails...@swe-blog.net wrote: Hi, I just tried to customize EnumChoiceRenderer and to override getDisplayValue, but is final. Why? Can I submit a patch to remove final? Bye, Oliver - 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
[jira] [Updated] (WICKET-5462) Ajax form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton
[ https://issues.apache.org/jira/browse/WICKET-5462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-5462: -- Summary: Ajax form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton (was: Automatic form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton) Ajax form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton --- Key: WICKET-5462 URL: https://issues.apache.org/jira/browse/WICKET-5462 Project: Wicket Issue Type: Bug Reporter: Igor Vaynberg Assignee: Igor Vaynberg -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Created] (WICKET-5462) Automatic form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton
Igor Vaynberg created WICKET-5462: - Summary: Automatic form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton Key: WICKET-5462 URL: https://issues.apache.org/jira/browse/WICKET-5462 Project: Wicket Issue Type: Bug Reporter: Igor Vaynberg Assignee: Igor Vaynberg -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Resolved] (WICKET-5462) Ajax form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton
[ https://issues.apache.org/jira/browse/WICKET-5462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-5462. --- Resolution: Fixed Fix Version/s: 7.0.0 6.13.0 Ajax form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton --- Key: WICKET-5462 URL: https://issues.apache.org/jira/browse/WICKET-5462 Project: Wicket Issue Type: Bug Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Updated] (WICKET-5462) Ajax form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton
[ https://issues.apache.org/jira/browse/WICKET-5462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-5462: -- Fix Version/s: (was: 6.13.0) 6.14.0 Ajax form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton --- Key: WICKET-5462 URL: https://issues.apache.org/jira/browse/WICKET-5462 Project: Wicket Issue Type: Bug Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.14.0, 7.0.0 -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Re: [jira] [Resolved] (WICKET-5462) Ajax form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton
indeed, 6.13 hasnt been marked as released in jira yet... On Mon, Jan 6, 2014 at 11:47 AM, Sven Meier s...@meiers.net wrote: Fix Version/s: 7.0.0 6.13.0 That should be 6.14.0, no? Sven On 01/06/2014 07:27 PM, Igor Vaynberg (JIRA) wrote: [ https://issues.apache.org/jira/browse/WICKET-5462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-5462. --- Resolution: Fixed Fix Version/s: 7.0.0 6.13.0 Ajax form-component-label repainting fails when setResponsePage() is used to navigate away from the page that has previously failed form validaiton --- Key: WICKET-5462 URL: https://issues.apache.org/jira/browse/WICKET-5462 Project: Wicket Issue Type: Bug Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 -- This message was sent by Atlassian JIRA (v6.1.5#6160)
Re: The state of Wicket 6.13
+1 to rebase On Sun, Jan 5, 2014 at 8:39 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: All, Since a long time I have tried to coerce the Maven release plugin to actually build a release. It appears that newer versions of git have altered the output format on which the m-r-p depends to commit the pom changes (release poms) and then tag that result. This caused a bug hunt and trial/error period of weeks to finally just now when I was able to build a 6.13.0 release. Now this is the state of 4 weeks ago, and I wonder if it is more proper to rebase to now and cut a release from that. Personally I would do just that (rebase to now and release that). Opinions? Martijn -- Become a Wicket expert, learn from the best: http://wicketinaction.com
Re: Passing Component or Class to IAuthorizationStrategy#isInstantiationAuthorized()
this is a security check, so the whole idea is that it is ran before any of the user's code in the constructor which may have side-effects. eg a constructor marking a record as ready to be deleted because a delete panel was instantiated. the class itself should be enough. even if you get an instance you cant use anything in it because its partially constructed. the question is if we do pass an instance how many users will bother reading javadoc? and out of those how many really understand how objects are constructed? i think we should close the issue as wont-fix, reading it It would be easier to decide if instantiation is authorized if one could access some properties of the component being constructed. which is exactly what you cannot/must not do because the object is only partially initialized, thus proving my point above. the ComponentInstantiationListener is a very special case where we make an exception. the entire point of this interface is to work with a partially constructed object and most users will never implement their own as opposed to the authorization strategy... -igor On Fri, Dec 20, 2013 at 12:53 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, The reporter of https://issues.apache.org/jira/browse/WICKET-5454 asked to pass the Component instance to IAuthorizationStrategy#isInstantiationAuthorized() instead of just its class. I have no idea why the API has been designed this way but Carl-Eric gave a good explanation - the component is not yet fully constructed. The thing that bothers me is why it is OK to use the instance in my custom IComponentInstantiationListener and it is not OK to do the same in IAuthorizationStrategy#isInstantiationAuthorized() ? If there is a javadoc explaining the possible problem (as for IComponentInstantiationListener#onInstantiation()) then it is OK. Even more - at https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/Application.java#L276you can see that right ater rejecting the *Class* we pass the *instance* to the UnauthorizedComponentInstantiationListener! Martin Grigorov Wicket Training and Consulting
Re: Passing Component or Class to IAuthorizationStrategy#isInstantiationAuthorized()
i am guessing that the id of the component would be useful for logging in some cases, but i think it should just be passed in as an extra argument if thats the case. something to fix in 7.0... -igor On Fri, Dec 20, 2013 at 11:44 AM, Martin Grigorov mgrigo...@apache.org wrote: and what about IUnauthorizedComponentInstantiationListener ? it receives the partially constructed object in case of rejection its javadoc states: The partially constructed component (only the id is guaranteed to be valid) but even Wicket sources use it (partially) wrong later: org.apache.wicket.authroles.authentication.AuthenticatedWebApplication#onUnauthorizedInstantiation casts the instance to a Page and passes it to org.apache.wicket.authroles.authentication.AuthenticatedWebApplication#onUnauthorizedPage(Page) Here we use just page.getClass() but specialization of this class may try to use the page instance for anything Martin Grigorov Wicket Training and Consulting On Fri, Dec 20, 2013 at 6:14 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: this is a security check, so the whole idea is that it is ran before any of the user's code in the constructor which may have side-effects. eg a constructor marking a record as ready to be deleted because a delete panel was instantiated. the class itself should be enough. even if you get an instance you cant use anything in it because its partially constructed. the question is if we do pass an instance how many users will bother reading javadoc? and out of those how many really understand how objects are constructed? i think we should close the issue as wont-fix, reading it It would be easier to decide if instantiation is authorized if one could access some properties of the component being constructed. which is exactly what you cannot/must not do because the object is only partially initialized, thus proving my point above. the ComponentInstantiationListener is a very special case where we make an exception. the entire point of this interface is to work with a partially constructed object and most users will never implement their own as opposed to the authorization strategy... -igor On Fri, Dec 20, 2013 at 12:53 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, The reporter of https://issues.apache.org/jira/browse/WICKET-5454 asked to pass the Component instance to IAuthorizationStrategy#isInstantiationAuthorized() instead of just its class. I have no idea why the API has been designed this way but Carl-Eric gave a good explanation - the component is not yet fully constructed. The thing that bothers me is why it is OK to use the instance in my custom IComponentInstantiationListener and it is not OK to do the same in IAuthorizationStrategy#isInstantiationAuthorized() ? If there is a javadoc explaining the possible problem (as for IComponentInstantiationListener#onInstantiation()) then it is OK. Even more - at https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/Application.java#L276you can see that right ater rejecting the *Class* we pass the *instance* to the UnauthorizedComponentInstantiationListener! Martin Grigorov Wicket Training and Consulting
[jira] [Commented] (WICKET-663) enhance ichoicerenderer with id-choice object lookup
[ https://issues.apache.org/jira/browse/WICKET-663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13853007#comment-13853007 ] Igor Vaynberg commented on WICKET-663: -- looks good. the only other thing i would consider is nuking the interface, there is no real point to having it... enhance ichoicerenderer with id-choice object lookup - Key: WICKET-663 URL: https://issues.apache.org/jira/browse/WICKET-663 Project: Wicket Issue Type: Improvement Affects Versions: 1.3.0-final Reporter: Igor Vaynberg Assignee: Igor Vaynberg add object idtochoice(string id) to ichoicerenderer and add class choicerenderer implements ichoicerenderer that encapsulate the default linear search then we can remove method added in WICKET-348 to support a custom lookup -- This message was sent by Atlassian JIRA (v6.1.4#6159)
Re: wicket-el - is this a safe way to hook into wicket?
On Wed, Dec 18, 2013 at 9:40 PM, Steve Coughlan shadders@gmail.com wrote: A few weeks back I made a post about the first version of universal expression language for wicket. Since then it's come quite a way. The initial version hooked into by implementing IMarkupResourceStreamProvider for markup owning MarkupContainers (Panel, Page etc...) and by regenerating markup fragments for markup receiving MarkupContainers (ListView). Unfortunately due to the fact that the EL expressions need to be evaluated on every request this meant a huge performance hit (about 75% less than standard wicket) due to forcing wicket to constantly parse markup on every request cycle. The current evolution of wicket-el hooks in very differently. My first preference was to create a dynamic version of Markup and MarkupFragment that replaces MarkupElements that contain EL expressions with a dynamic version. Unfortuantely this was impossible because I need to subclass Markup (wicket uses a few case of 'instanceof Markup') and Markup has many final methods. And simply wrapping all the MarkupElements isn't possible because RawMarkup is a final class and is also reference inside wicket with 'instanceof'. So the only way I could think of to do it (which I've done and it works) is to create a subclass of Markup (ModifiableMarkup) that takes the original wicket-parsed markup, and adds all it's elements. Then during the onRender phase EL enabled components call ModifiableMarkup.resolve(ExpressionResolver, ELParseMatchList) which internally replaces RawMarkup elements belonging to that compenent with an EL resolved version. This is done just before calling super.onRender(). Sounds ugly but it works and performance is now equal to standard wicket (in some cases can even be a little faster due to not needing PropertyModels). Because the Markup instances are now mutable I can't use wicket's markup cache as it's one per class and ModifiableMarkup.resolve method could easily be called by many threads at once. So I've had to implement caching per thread/class combination. i.e. ELPanel will have a cached instance of Markup for every thread. My question is twofold: 1/ As I have no choice but to leave ModifiableMarkup mutable, what is the purpose of making Markup immutable? From what I can see from browsing wicket source all it achieves is a bit of safety and releasing some resources from the backing XmlTags in the MarkupElements. Is there any other purpose to it? i.e. can you forsee any problems with using a mutable instance of Markup for rendering? because its immutable it is thread-safe. making it mutable would add a lot of complexity to make sure it is thread-safe. -igor 2/ Is the per thread/class caching strategy really safe? The only way I could think it could be broken is if it was possible for the server to suspend a thread mid-render cycle and give another request use of that thread. If that happened the new request would overwrite the markup expressions and the when the old resumed and expressions already resolved would have values from the the request that interrupted it. As far as I'm aware with the work I've done with Jetty and NIO connectors before this will only happen if you ask Jetty to do it while processing the request. Is this a possibility with wicket or can I rely on a complete render cycle to happen uninterrupted before the thread is reused for another request? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[jira] [Commented] (WICKET-663) enhance ichoicerenderer with id-choice object lookup
[ https://issues.apache.org/jira/browse/WICKET-663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13851877#comment-13851877 ] Igor Vaynberg commented on WICKET-663: -- something to look into in wicket 7 enhance ichoicerenderer with id-choice object lookup - Key: WICKET-663 URL: https://issues.apache.org/jira/browse/WICKET-663 Project: Wicket Issue Type: Improvement Affects Versions: 1.3.0-final Reporter: Igor Vaynberg Assignee: Igor Vaynberg add object idtochoice(string id) to ichoicerenderer and add class choicerenderer implements ichoicerenderer that encapsulate the default linear search then we can remove method added in WICKET-348 to support a custom lookup -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Commented] (WICKET-663) enhance ichoicerenderer with id-choice object lookup
[ https://issues.apache.org/jira/browse/WICKET-663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13852122#comment-13852122 ] Igor Vaynberg commented on WICKET-663: -- the way this works currently is: lets say i pick a choice rendered as 17. when we need to resolve this back from the client string to the object we load up all the choices, go through them one by one, render the id using the renderer, and look for the match. this is ok for most cases, but when you have multiple filters on the page each with 200ish choices this may get slow because not only are you doing a linear search across all options, you are also loading all options from the database or other potentially slow storages. the idea behind this ticket is to make that reverse lookup (17-object) configurable. for large dropdowns a good optimization can be to simply cast 17 to 17 and load the object with that id from the database. there are two places for this kind of lookup: a method on the component and a method in the renderer. imho the better place is the renderer because that is the more likely place for specializations to occur and since renderer is the thing that transcodes an object into a string representation it makes it logical that it handles the inverse. for example we have an EntityChoiceRenderer that knows how to pull the database id out of entities; it makes it a logical place to override the lookup. so we would have an EntityChoiceRenderer that knows how to deal with entities in a more complete way: encode them into html and decode them efficiently. this would change the renderer from an interface into an abstract class, thus wicket 7.0, so it can provide the default linear lookup. maybe {code}T getObject(String value, IModelListT choices){code}. im not sure if the component instance would be useful in the method signature, my feeling that most likely not really and if its needed the user can pass it in manually. enhance ichoicerenderer with id-choice object lookup - Key: WICKET-663 URL: https://issues.apache.org/jira/browse/WICKET-663 Project: Wicket Issue Type: Improvement Affects Versions: 1.3.0-final Reporter: Igor Vaynberg Assignee: Igor Vaynberg add object idtochoice(string id) to ichoicerenderer and add class choicerenderer implements ichoicerenderer that encapsulate the default linear search then we can remove method added in WICKET-348 to support a custom lookup -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Commented] (WICKET-5224) ModalWindow is not visible in Safari when opened from a link at the bottom of a large page
[ https://issues.apache.org/jira/browse/WICKET-5224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13844409#comment-13844409 ] Igor Vaynberg commented on WICKET-5224: --- looks like this issue is back :/ ModalWindow is not visible in Safari when opened from a link at the bottom of a large page -- Key: WICKET-5224 URL: https://issues.apache.org/jira/browse/WICKET-5224 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 6.8.0 Environment: Safari 5.1.7 (7534.57.2) Windows, Safari (iOS 6.1.3) Reporter: Jered Myers Assignee: Igor Vaynberg Fix For: 6.10.0, 7.0.0 Attachments: safariscroll.zip Original Estimate: 1h Remaining Estimate: 1h I am not able to see a ModalWindow in Safari and I expect to see it centered on my view port. Steps: 1. Start with a large web page with a link to open the ModalWindow at the bottom of the page. You need a large page where you have to scroll down to find the link. 2. Click the link 3. Observe that the mask for the ModalWindow displays, but the ModalWindow does not. Scrolling back up, re-sizing, and maximizing will still not display the ModalWindow. -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Reopened] (WICKET-5224) ModalWindow is not visible in Safari when opened from a link at the bottom of a large page
[ https://issues.apache.org/jira/browse/WICKET-5224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg reopened WICKET-5224: --- ModalWindow is not visible in Safari when opened from a link at the bottom of a large page -- Key: WICKET-5224 URL: https://issues.apache.org/jira/browse/WICKET-5224 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 6.8.0 Environment: Safari 5.1.7 (7534.57.2) Windows, Safari (iOS 6.1.3) Reporter: Jered Myers Assignee: Igor Vaynberg Fix For: 6.10.0, 7.0.0 Attachments: safariscroll.zip Original Estimate: 1h Remaining Estimate: 1h I am not able to see a ModalWindow in Safari and I expect to see it centered on my view port. Steps: 1. Start with a large web page with a link to open the ModalWindow at the bottom of the page. You need a large page where you have to scroll down to find the link. 2. Click the link 3. Observe that the mask for the ModalWindow displays, but the ModalWindow does not. Scrolling back up, re-sizing, and maximizing will still not display the ModalWindow. -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Updated] (WICKET-5224) ModalWindow is not visible in Safari when opened from a link at the bottom of a large page
[ https://issues.apache.org/jira/browse/WICKET-5224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-5224: -- Fix Version/s: (was: 6.10.0) 6.13.0 ModalWindow is not visible in Safari when opened from a link at the bottom of a large page -- Key: WICKET-5224 URL: https://issues.apache.org/jira/browse/WICKET-5224 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 6.8.0 Environment: Safari 5.1.7 (7534.57.2) Windows, Safari (iOS 6.1.3) Reporter: Jered Myers Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 Attachments: safariscroll.zip Original Estimate: 1h Remaining Estimate: 1h I am not able to see a ModalWindow in Safari and I expect to see it centered on my view port. Steps: 1. Start with a large web page with a link to open the ModalWindow at the bottom of the page. You need a large page where you have to scroll down to find the link. 2. Click the link 3. Observe that the mask for the ModalWindow displays, but the ModalWindow does not. Scrolling back up, re-sizing, and maximizing will still not display the ModalWindow. -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Commented] (WICKET-5224) ModalWindow is not visible in Safari when opened from a link at the bottom of a large page
[ https://issues.apache.org/jira/browse/WICKET-5224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13844420#comment-13844420 ] Igor Vaynberg commented on WICKET-5224: --- reverted the revert, seems to have fixed it. ModalWindow is not visible in Safari when opened from a link at the bottom of a large page -- Key: WICKET-5224 URL: https://issues.apache.org/jira/browse/WICKET-5224 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 6.8.0 Environment: Safari 5.1.7 (7534.57.2) Windows, Safari (iOS 6.1.3) Reporter: Jered Myers Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 Attachments: safariscroll.zip Original Estimate: 1h Remaining Estimate: 1h I am not able to see a ModalWindow in Safari and I expect to see it centered on my view port. Steps: 1. Start with a large web page with a link to open the ModalWindow at the bottom of the page. You need a large page where you have to scroll down to find the link. 2. Click the link 3. Observe that the mask for the ModalWindow displays, but the ModalWindow does not. Scrolling back up, re-sizing, and maximizing will still not display the ModalWindow. -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Resolved] (WICKET-5224) ModalWindow is not visible in Safari when opened from a link at the bottom of a large page
[ https://issues.apache.org/jira/browse/WICKET-5224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-5224. --- Resolution: Fixed ModalWindow is not visible in Safari when opened from a link at the bottom of a large page -- Key: WICKET-5224 URL: https://issues.apache.org/jira/browse/WICKET-5224 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 6.8.0 Environment: Safari 5.1.7 (7534.57.2) Windows, Safari (iOS 6.1.3) Reporter: Jered Myers Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 Attachments: safariscroll.zip Original Estimate: 1h Remaining Estimate: 1h I am not able to see a ModalWindow in Safari and I expect to see it centered on my view port. Steps: 1. Start with a large web page with a link to open the ModalWindow at the bottom of the page. You need a large page where you have to scroll down to find the link. 2. Click the link 3. Observe that the mask for the ModalWindow displays, but the ModalWindow does not. Scrolling back up, re-sizing, and maximizing will still not display the ModalWindow. -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Resolved] (WICKET-5411) Improve AutoLabels by updating their CSS classes automatically during Ajax requests
[ https://issues.apache.org/jira/browse/WICKET-5411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-5411. --- Resolution: Fixed Improve AutoLabels by updating their CSS classes automatically during Ajax requests --- Key: WICKET-5411 URL: https://issues.apache.org/jira/browse/WICKET-5411 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. disabled by default in 6.13 (to enable override WebApplication#getUpdateAutoLabelsOnAjaxRequests() ), always enabled in 7.0 -- This message was sent by Atlassian JIRA (v6.1#6144)
Re: Enfocing INPUT field names to respect hCard formats
override getInputName() and return the string you want. -igor On Sun, Nov 17, 2013 at 5:21 AM, Arjun Dhar dhar...@yahoo.com wrote: http://microformats.org/wiki/hcard-input-examples#person_billing_shipping_input To ensure browsers can Auto fill Input form fields for E-Commerce forms and common fields. I want to ensure the fieldNames match this convention. I tried a test class something like ..but it does not respect the input field provided; specially if the INput field is Bound via CompoundPropertyModel. Say shippingAddress contains city. Then the field is still named shippingAddress:city. How best to overcome this so I can standardize my field Names via HTML. I dont want to be writing HTML field names in Java code. That would suck. thanks - Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Enfocing-INPUT-field-names-to-respect-hCard-formats-tp4662465.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[jira] [Commented] (WICKET-5417) this.replaceWith is broken when called from onInitialize
[ https://issues.apache.org/jira/browse/WICKET-5417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13823752#comment-13823752 ] Igor Vaynberg commented on WICKET-5417: --- whats the usecase for component replacing itself during oninitialize()? it doesnt seem valid to me... this.replaceWith is broken when called from onInitialize Key: WICKET-5417 URL: https://issues.apache.org/jira/browse/WICKET-5417 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 6.12.0 Reporter: Ryan Dearing Assignee: Martin Grigorov Attachments: WICKET-5417.patch, replacewithbug.tgz When calling this.replaceWith within the onInitialize method, wicket throws an exception: Last cause: org.apache.wicket.Component has not been properly initialized. Something in the hierarchy of com.mycompany.PanelA has not called super.onInitialize() in the override of onInitialize() method This happens because detach is called on the panel being replaced which clears Component.request flags (sets to 0) which causes the exception on line 864 of Component.java: if (!getRequestFlag(RFLAG_INITIALIZE_SUPER_CALL_VERIFIED)) { // throws here } -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Reopened] (WICKET-5418) PropertyValidator ignoring groups with the @NotNull annotation only
[ https://issues.apache.org/jira/browse/WICKET-5418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg reopened WICKET-5418: --- PropertyValidator ignoring groups with the @NotNull annotation only --- Key: WICKET-5418 URL: https://issues.apache.org/jira/browse/WICKET-5418 Project: Wicket Issue Type: Bug Components: wicket-bean-validation Affects Versions: 6.12.0 Environment: MacOSX, Glassfish Reporter: Jesus Mireles Assignee: Igor Vaynberg Labels: validation Attachments: BeanValidation.zip When using groups in your JSR303 compliant classes, Wicket does not honor the groups for the @NotNull annotation. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Resolved] (WICKET-5418) PropertyValidator ignoring groups with the @NotNull annotation only
[ https://issues.apache.org/jira/browse/WICKET-5418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-5418. --- Resolution: Fixed Fix Version/s: 7.0.0 6.13.0 PropertyValidator ignoring groups with the @NotNull annotation only --- Key: WICKET-5418 URL: https://issues.apache.org/jira/browse/WICKET-5418 Project: Wicket Issue Type: Bug Components: wicket-bean-validation Affects Versions: 6.12.0 Environment: MacOSX, Glassfish Reporter: Jesus Mireles Assignee: Igor Vaynberg Labels: validation Fix For: 6.13.0, 7.0.0 Attachments: BeanValidation.zip When using groups in your JSR303 compliant classes, Wicket does not honor the groups for the @NotNull annotation. -- This message was sent by Atlassian JIRA (v6.1#6144)
Re: Future of wicket-cdi
i agree we should restart with the original implementation and incrementally introduce the new features - thats what i proposed in the original pull request. i am not a big fan of having the application instance managed. what is the value of this? it can be injected using noncontextual just like everything else... -igor On Wed, Nov 13, 2013 at 1:19 PM, Emond Papegaaij emond.papega...@gmail.com wrote: Hi all, You probably noticed the the flood of emails regarding wicket-cdi these last few days, which IMHO is good, because it means wicket-cdi is alive. However, the current status is that the current (old) implementation of wicket-cdi works badly with CDI 1.1 and the experimental (new) version is broken in various ways. This is not good, as there is no good implementation to use for CDI 1.1 users. I've reviewed parts of the code in wicket-cdi-1.1 and noticed the following problems: - Featuritis: it supports all kinds of usecases nobody is every going to use, such as: partly managed applications, per-conversation auto-conversions, per-conversation propagation, package ignores, switched to enable/disable injection on almost everyting. - Buggy: auto-conversations are broken for everything but pages, injection in anonymous classes was broken, probably more. - Too much state: configuration options are copied all over the place, objects with different lifecycles share state. - Too much injection: everything is injected, which makes it almost impossible to see what's linked to what. I've also noticed some very nices features: - CDI 1.1 support with conversations via the Weld API - Management of the application and the Wicket-cdi configuration by cdi. - Better implementation of NonContextual injection, using caches. - Better testcases The experimental code is in such a state that is it almost impossible to cleanup. On the other hand, I do not want to loose some of the new features. Therefore, I propose the following: restart the wicket-cdi-1.1 implementation, starting from the current wicket-cdi implementation and reintroducing the features one-by-one. Also, I would like to remove some of the existing features, like most of the toggle-switches, and I would like to make the new CdiWebApplicationFactory mandatory to always have the application be managed. All this will still be experimental in wicket 6, but perhaps it can be made the default in 7. As we at Topicus are currently starting the migration from JBoss 7.1 to WildFly 8, I can work on this 1 or 2 days a week. Let me know what you think, Emond
Re: Future of wicket-cdi
On Wed, Nov 13, 2013 at 1:43 PM, John Sarman johnsar...@gmail.com wrote: So let me filter through injection of App. CdiWicketFilter gets injected factory. @Inject CdiWebApplicationFactory applicationFactory; the Factory get injected the following @Inject @Any InstanceWebApplication applications; @Inject CdiConfiguration cdiConfiguration; If there is only one application in a war then the web.xml only needs filter filter-nameCdiApplication/filter-name filter-classorg.apache.wicket.cdi.CdiWicketFilter/filter-class /filter if multiple then additional init-param param-nameapplicationName/param-name param-valueCdiExample/param-value /init-param and @WicketApp(CdiExample) added. i dont see this as an advantage. specifying a class name is trivial. further you are assuming i am running inside a container that has its filter's managed by cdi, this is not always the case so using your cdi filter would fail. one would have to fall back on wicket-filter and specify the cdi application factory that you provide, but that class itself assumes it is managed by cdi, so it wont work either. so you did not leave an escape hatch for people using simple containers. my original code may not be cdi-pretty but it works for all containers out there - cdi managed or not. No need to start up CDI in init() we do not start up cdi in init, we configure how it interacts with the wicket application. settings such things as conversation propagation mode, etc. Start using CDI. For apps that may want to add CDI they just filter filter-nameCdiApplication/filter-name filter-classorg.apache.wicket.cdi.CdiWicketFilter/filter-class /filter Start using CDI. So I still defend injection of the Cdi Wicket integration code. Also if it is removed then code will have to be added to differentiate which cdi implementation is being used. Currently CDI does this so long as two different CDI implementation jars aren't add, which would be ambiguous. this will still work. you can still inject the configuration using noncontextual and pull the right instance. or use jdk's ServiceLoader to find all implementors. my problem with this is that there is a specific lifecycle to the application that is not managed by cdi. it is not safe to use the application instance after it has been created, you have to wait until wicket calls certain methods on it. by making it managed you are giving the impression that it is safe to inject the instance and use it in various places. it is not, not until it has been properly configured. i do not want to debug cases where my configuration changes to the application disappear because my code got that injected the application and configured it got called before internalInit(). either create a subcpass with @PostConstruct that configures the application - which wont work - people dont like using subclasses - or create a provider. -igor On Wed, Nov 13, 2013 at 4:31 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: i agree we should restart with the original implementation and incrementally introduce the new features - thats what i proposed in the original pull request. i am not a big fan of having the application instance managed. what is the value of this? it can be injected using noncontextual just like everything else... -igor On Wed, Nov 13, 2013 at 1:19 PM, Emond Papegaaij emond.papega...@gmail.com wrote: Hi all, You probably noticed the the flood of emails regarding wicket-cdi these last few days, which IMHO is good, because it means wicket-cdi is alive. However, the current status is that the current (old) implementation of wicket-cdi works badly with CDI 1.1 and the experimental (new) version is broken in various ways. This is not good, as there is no good implementation to use for CDI 1.1 users. I've reviewed parts of the code in wicket-cdi-1.1 and noticed the following problems: - Featuritis: it supports all kinds of usecases nobody is every going to use, such as: partly managed applications, per-conversation auto-conversions, per-conversation propagation, package ignores, switched to enable/disable injection on almost everyting. - Buggy: auto-conversations are broken for everything but pages, injection in anonymous classes was broken, probably more. - Too much state: configuration options are copied all over the place, objects with different lifecycles share state. - Too much injection: everything is injected, which makes it almost impossible to see what's linked to what. I've also noticed some very nices features: - CDI 1.1 support with conversations via the Weld API - Management of the application and the Wicket-cdi configuration by cdi. - Better implementation of NonContextual injection, using caches. - Better testcases The experimental code is in such a state that is it almost impossible to cleanup. On the other hand, I do not want to loose some of the new features. Therefore, I propose
Re: Future of wicket-cdi
On Wed, Nov 13, 2013 at 2:42 PM, John Sarman johnsar...@gmail.com wrote: snip further you are assuming i am running inside a container that has its filter's managed by cdi, this is not always the case so using your cdi filter would fail. one would have to fall back on wicket-filter and I am 100% assuming that since you just included wicket-weld in the build. Therefore you do have a managed container at that point. we deploy in tomcat. we include weld as a war-dependency, not as tomcat dependency, therefore in our deployments filters are not injected. i assume this is how most people deploying to tomcat or jetty have it set up. are we dropping support for those people? specify the cdi application factory that you provide, but that class itself assumes it is managed by cdi, so it wont work either. so you did not leave an escape hatch for people using simple containers. my original code may not be cdi-pretty but it works for all containers out there - cdi managed or not. I couldn't have got anywhere without your code. I was pretty to me m_BLAH m_BLAT is ugly. I'm an ole school constructor versus setter myself, Object is ready at Construction. But with CDI I get that guarantee with the no arg, easier to Mock. unfortunately WebApplication instances are not ready at construction, that is the problem. No need to start up CDI in init() we do not start up cdi in init, we configure how it interacts with the wicket application. settings such things as conversation propagation mode, etc. Yeah but that starts it otherwise the Injectors are not set up and it wouldn't work(inject). in our deployment we have a servlet listener that bootstraps cdi so its available to other servlets, not just wicket. in application.init() you simply configure wicket to use cdi by giving it the bean manager. this approach also works in environments with no JNDI where you cannot simply pull a bean manager out of some store but have to use a custom mechanism to retrieve it. imagine an application with an embedded servlet container. snip my problem with this is that there is a specific lifecycle to the application that is not managed by cdi. it is not safe to use the application instance after it has been created, you have to wait until wicket calls certain methods on it. Yeah, I do wait. That's why I used the Factory. Only thing that is done is some member variables are populated. I did not override Wicket management, just injected some dependencies. you wait, but the users may not. now that application instance is managed by cdi why cant i do something like this: class WebConfigurator { @Inject WebApplication application; private void configure(@Observes ContainerStartEvent) { application.getMarkupSettings().setFoo(bar); } } after all, this would be the CDI-way of configuring the web application instance. but this does not work because webapplication instance is managed by wicket and not by cdi. so if this code runs before the filter my settings would be overwritten by internalInit() call. this is the impedance mismatch i do not like. artifacts whose lifecycle is managed by wicket should not also be managed by cdi, or if they are there should be a provider that creates instances and knows how to correctly configure it. so in the case above when my configurator is called the provider should bootstrap the wicket application, call internalinit(), and have it all ready for my code. by making it managed you are giving the impression that it is safe to inject the instance and use it in various places. it is not, not until it has been properly configured. i do not want to debug cases where my configuration changes to the application disappear because my code got that injected the application and configured it got called before internalInit(). either create a subcpass with @PostConstruct that configures the application - which wont work - people dont like using subclasses - or create a provider. Like I said Cdi injects some members, the Factory returns the application to WicketFilter and the same lifecycle commences. see point above, by making it managed you are making it available for other code to consume as injectable. -igor
Re: Future of wicket-cdi
On Wed, Nov 13, 2013 at 4:18 PM, John Sarman johnsar...@gmail.com wrote: So maybe we should just remove all the scoped classes. Add the code to automagically find a cdi impl, weld etc. yeah, we can use jdk's ServiceLoader to see whats on the classpath. Create custom factory that CdiConfiguration is set up via parameters in web.xml. im not sure this is necessary, it will make it more difficult for deployments where its hard to find the bean manager (ie its not in a well known place in jndi). the only part this saves is calling new CdiConfiguration()configure(this) in application init, right? i actually like that part because it makes it clear what options i set - propagation, etc. Then after instantiating the App pass it to the NonContextual for injection. see below Rewrite the tests to work with new technique. This allows app injection with Wicket in charge, before init. And everything works the same. That may be a better roadmap for the rewrite. Also that does eliminate the need for the weld listener. Time to start planning on a rewrite, I am not married to the Injection, just like to add @Resource(mailSessionJNDI) to my Application and use it in init(). the application is already injected, thats why i dont understand why you had a problem with the original way of doing things... public class MyApplication extends WebApplication { @Resource resource; public void init() { // do some configuration new CdiConfiguration().configure(this); // after the line above the application is injected and resource is now available. by default injectApplication bit in CdiConfiguration is set to true and it passes the instance through NonContextual. resource.doSomething(); } } -igor On Wed, Nov 13, 2013 at 6:40 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: On Wed, Nov 13, 2013 at 2:42 PM, John Sarman johnsar...@gmail.com wrote: snip further you are assuming i am running inside a container that has its filter's managed by cdi, this is not always the case so using your cdi filter would fail. one would have to fall back on wicket-filter and I am 100% assuming that since you just included wicket-weld in the build. Therefore you do have a managed container at that point. we deploy in tomcat. we include weld as a war-dependency, not as tomcat dependency, therefore in our deployments filters are not injected. i assume this is how most people deploying to tomcat or jetty have it set up. are we dropping support for those people? specify the cdi application factory that you provide, but that class itself assumes it is managed by cdi, so it wont work either. so you did not leave an escape hatch for people using simple containers. my original code may not be cdi-pretty but it works for all containers out there - cdi managed or not. I couldn't have got anywhere without your code. I was pretty to me m_BLAH m_BLAT is ugly. I'm an ole school constructor versus setter myself, Object is ready at Construction. But with CDI I get that guarantee with the no arg, easier to Mock. unfortunately WebApplication instances are not ready at construction, that is the problem. No need to start up CDI in init() we do not start up cdi in init, we configure how it interacts with the wicket application. settings such things as conversation propagation mode, etc. Yeah but that starts it otherwise the Injectors are not set up and it wouldn't work(inject). in our deployment we have a servlet listener that bootstraps cdi so its available to other servlets, not just wicket. in application.init() you simply configure wicket to use cdi by giving it the bean manager. this approach also works in environments with no JNDI where you cannot simply pull a bean manager out of some store but have to use a custom mechanism to retrieve it. imagine an application with an embedded servlet container. snip my problem with this is that there is a specific lifecycle to the application that is not managed by cdi. it is not safe to use the application instance after it has been created, you have to wait until wicket calls certain methods on it. Yeah, I do wait. That's why I used the Factory. Only thing that is done is some member variables are populated. I did not override Wicket management, just injected some dependencies. you wait, but the users may not. now that application instance is managed by cdi why cant i do something like this: class WebConfigurator { @Inject WebApplication application; private void configure(@Observes ContainerStartEvent) { application.getMarkupSettings().setFoo(bar); } } after all, this would be the CDI-way of configuring the web application instance. but this does not work because webapplication instance is managed by wicket and not by cdi. so if this code runs before the filter my settings would be overwritten by internalInit() call
Re: weld conversation propagation page
this is the desired behavior. see conversation propagation settings. by default conversations are only propagated to non-bookmarkable pages. -igor On Wed, Nov 13, 2013 at 4:36 AM, brazz alexander.li...@man.eu wrote: Hi, after spending a hard time debugging i found this problem: i have to pages: FirstPage.class SecondPage.class on FirstPage.class i create a new conversation with conversation.begin(); and on FirstPage.class i have a link: *setResponsePage(SecondPage.class);* this link results in a new transient Conversation on SecondPage.class if i create a new instance in setResponsePage(): *setResponsePage(new SecondPage());* the conversation is propagated correctly ot SecondPage.class. As i am new to cdi and weld i cannot really estimate if this is a bug or desired behavior: Thanks for any explanations. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/weld-conversation-propagation-page-tp4662389.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[jira] [Commented] (WICKET-5411) Improve AutoLabels by updating their CSS classes automatically during Ajax requests
[ https://issues.apache.org/jira/browse/WICKET-5411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13820226#comment-13820226 ] Igor Vaynberg commented on WICKET-5411: --- i wasnt going to close it until i tested it in our app to make sure it works for complex usecases... Improve AutoLabels by updating their CSS classes automatically during Ajax requests --- Key: WICKET-5411 URL: https://issues.apache.org/jira/browse/WICKET-5411 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. disabled by default in 6.13 (to enable override WebApplication#getUpdateAutoLabelsOnAjaxRequests() ), always enabled in 7.0 -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Resolved] (WICKET-5411) Improve AutoLabels by updating their CSS classes automatically during Ajax requests
[ https://issues.apache.org/jira/browse/WICKET-5411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg resolved WICKET-5411. --- Resolution: Fixed Improve AutoLabels by updating their CSS classes automatically during Ajax requests --- Key: WICKET-5411 URL: https://issues.apache.org/jira/browse/WICKET-5411 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. disabled by default in 6.13 (to enable override WebApplication#getUpdateAutoLabelsOnAjaxRequests() ), always enabled in 7.0 -- This message was sent by Atlassian JIRA (v6.1#6144)
Re: Eclipse formatting, was: Martin's wicket pull request
any progress Martijn? -igor On Sun, Nov 10, 2013 at 12:49 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: We can let the eclipse plugin automatically add the project settings if we upload a jar to maven central with our configuration. plugin artifactIdmaven-eclipse-plugin/artifactId version2.9/version inheritedtrue/inherited configuration downloadSourcestrue/downloadSources downloadJavadocfalse/downloadJavadoc ajdtVersion${java.version}/ajdtVersion additionalConfig file name.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs/name location/edu.umd.cs.findbugs.plugin.eclipse.prefs/location /file file name.settings/org.eclipse.core.resources.prefs/name location/org.eclipse.core.resources.prefs/location /file file name.settings/org.eclipse.jdt.apt.core.prefs/name location/org.eclipse.jdt.apt.core.prefs/location /file file name.settings/org.eclipse.jdt.core.prefs/name location/org.eclipse.jdt.core.prefs/location /file file name.settings/org.eclipse.jdt.ui.prefs/name location/org.eclipse.jdt.ui.prefs/location /file file name.settings/org.eclipse.wst.validation.prefs/name location/org.eclipse.wst.validation.prefs/location /file file name.settings/org.maven.ide.eclipse.prefs/name location/org.maven.ide.eclipse.prefs/location /file /additionalConfig /configuration dependencies dependency groupIdnl.topicus.onderwijs/groupId artifactIdeclipse-settings/artifactId version2012.2.2/version /dependency /dependencies /plugin On Sun, Nov 10, 2013 at 12:45 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: yes, making it a workspace default messes up other projects... this way every time i import a project into the eclipse workspace i have to go and manually set the formatter on every module, which as you can imagine is not optimal -igor On Sat, Nov 9, 2013 at 1:40 PM, Martin Grigorov mgrigo...@apache.org wrote: But you have to import the xml just once, right ? It is not a big deal. Or the problem is that the xml messes up the other projects in your workspace ? On Sat, Nov 9, 2013 at 7:24 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: it is really frustrating that i have to do this manually now. before all i had to do was checkout the project and it was all set. wicket shares my workspace with other projects so the workspace-default is not going to work. can we drop the format def on wicket.apache.org and configure the maven plugin to set it up: http://maven.apache.org/plugins/maven-eclipse-plugin/examples/load-code-styles.html -igor On Fri, Nov 8, 2013 at 12:56 AM, Martin Grigorov mgrigo...@apache.org wrote: I'll test this soon. I'll update the docs for IDEA too if needed. On Thu, Nov 7, 2013 at 11:02 AM, Sven Meier s...@meiers.net wrote: Thanks, I've added a hint to the Idea instructions. Regards Sven On 11/06/2013 10:12 AM, Vojtěch Krása wrote: You should also specify values for Class count to use import with '*' and Names count to use static import with '*', since these values are not in EclipseCodeFormat.xml, and differs between Idea and Eclipse by default. V. 2013/11/6 Sven Meier s...@meiers.net Hi all, I removed all org.eclipse.jdt.[core|ui].prefs from the repo as discussed. EclipseCodeFormat.xml is updated now to our latest and greatest code format (which might differ between 6.x and master). Eclipse users should run mvn eclipse:eclipse to regenerate org.eclipse.jdt.core.prefs, then (re-)import EclipseCodeFormat.xml and use it as the default for your Wicket workspace(s). I've added a paragraph about the recommended Eclipse setup here: http://wicket.apache.org/learn/ides.html Could an Idea user please confirm that the format plugin ( http://plugins.jetbrains.com/plugin/6546) works as expected? Regards Sven On 11/05/2013 12:05 PM, Martin Grigorov wrote: On Tue, Nov 5, 2013 at 1:01 PM, Sven Meier s...@meiers.net wrote: IMHO we should have one authoritative source for our source format only. Whether this is EclipseCodeFormat.xml or something else can be dicussed on the other mail thread. Currently all org.eclipse.jdt.core.prefs have already diverged from EclipseCodeFormat.xml (perhaps they even differ between each other?), so I'm +1 to remove those settings from the repo as Martin has suggested. I can live with having to configure my Wicket workspace(s) once by importing EclipseCodeFormat.xml. So if no one objects, I'll update EclipseCodeFormat.xml from the current settings in wicket-core and apply Martin's patch afterwards. I'm +1. With the plugin that Rusi suggested in the other thread I can import EclipseCodeFormat.xml in Intellij IDEA and hopefully the formatting will be the same for all of us. Sven On 11/04/2013 04:42 PM, Martin Funk wrote: not quite if the org.eclipse.jdt.ui.prefs are not present eclipse will fall back
Re: remove recently merged cdi 1.1 from 6.x
the point on INonContextualManager was to internalize NonContextual - in case cdi implementation provides a better way to perform non-contextual injection. now that NonContextualManager is @ApplicationScoped and CdiConfiguration does not have a setter for it this functionality is lost. and even if cdi configuration had a setter, there is no longer a guarantee that someone did not inject one and use it before a new one was set on the configuration. that is why these things were not managed by cdi in the initial code... -igor On Mon, Nov 11, 2013 at 11:16 AM, John Sarman johnsar...@gmail.com wrote: Also Noncontextual.of is never used anywhere except in the Wicket CDI api, so I disagree. It solely used by the NonContextualManager which is ApplicationScoped and the BeanManager is injected. The CdiCleanup also uses it and is passed the BeanManager during configuration, both cases do not make it unnice since it is an internal api. On Mon, Nov 11, 2013 at 2:11 PM, John Sarman johnsar...@gmail.com wrote: Actually I just changed them back to the way Igor originally implemented it. On Mon, Nov 11, 2013 at 2:10 PM, Emond Papegaaij emond.papega...@gmail.com wrote: Hi John, There is nothing wrong with looking up the BeanManager in a static context. It's just that the current implementation of CDI.current().getBeanManager() is broken in Weld. I expect this to be fixed soon. The workaround moves the lookup to a single place and tries a portable JNDI lookup first. This will work in all EE containers. More importantly, the user doesn't notice the workaround at all. Your commit changes the signature of NonContextual.of. You are now required to pass in the BeanManager, which is not very nice, because NonContextual is to do CDI injection in places where CDI can't do it for you. In these places, you often don't have a BeanManager available. I think the workaround should stay until the bug is fixed in Weld. Best regards, Emond On Mon, Nov 11, 2013 at 7:45 PM, John Sarman johnsar...@gmail.com wrote: Edmond, I updated the cdi code to not ever use the CDI.current(). I reworked your test earlier to just inject the BeanManager and that properly allows the multiple wars to see the InjectableTargets from a shared lib. I could only conclude that CDI.current should not be called from a static method, so instead of joining the weld team or submitting an issue, I just removed that possibility from the code. That latest code is in https://github.com/jsarman/wicket master branch. This also removed the need for the BeanManagerLookup workaround. On Mon, Nov 11, 2013 at 8:49 AM, John Sarman johnsar...@gmail.com wrote: Nevermind, I should not write emails this early, without an unsend. Servlet A should see same BeanManager as Servlet B, if both servlets are deployed from same war file. That is ApplicationScoped. On Mon, Nov 11, 2013 at 8:47 AM, John Sarman johnsar...@gmail.com wrote: Ok, I read through your test code, so if you are saying that servlet a gets same beanmanager as servlet b then yeah thats bad. On Mon, Nov 11, 2013 at 8:44 AM, John Sarman johnsar...@gmail.com wrote: I was looking at your bug, but in the case you specified where the cached BeanManager is passed, seems to be the correct behavior because the CdiConfiguration is ApplicationScoped. The CDI class states this: /** * Get the CDI BeanManager for the current context * * @return */ public abstract BeanManager getBeanManager(); So the cached BeanManager passed back is because it is accessed in an ApplicationScoped class. ApplicationScoped != Wickets Application scope. On Mon, Nov 11, 2013 at 8:26 AM, Emond Papegaaij emond.papega...@topicus.nl wrote: You are right, InitialContext.lookup was returning null. I've fixed it by falling back to CDI.current().getBeanManager() in that case. The workaround is needed because of a very nasty bug in de Wildfly-Weld integration: https://issues.jboss.org/browse/WFLY-2481 Best regards, Emond On Monday 11 November 2013 08:18:20 John Sarman wrote: As far as the Test failing, I think the workaround code to use jndi first may have caused the test to fail. So far it seems that all the request pull 50 is not in the 6 branch. What forced the need for the workaround? John On Mon, Nov 11, 2013 at 8:00 AM, John Sarman johnsar...@gmail.com wrote: It is not a forced requirement, just an option for full cdi injection. On Mon, Nov 11, 2013 at 3:50 AM, Emond Papegaaij emond.papega...@topicus.nl wrote: Hi John, I've just merged the pull request in the wicket-6.x branch (still under experimental). The version still is 0.2-SNAPSHOT, as the versions are automatically increased on release. The
Re: git commit: WICKET-5411 auto label auto update during ajax
i suppose that bit of js can be rewritten to use pure dom, but has anyone actually ever implemented wicket-event.js and wicket-ajax.js using anything other then jquery? -igor On Sat, Nov 9, 2013 at 1:34 PM, Martin Grigorov mgrigo...@apache.org wrote: On Sat, Nov 9, 2013 at 8:49 AM, ivaynb...@apache.org wrote: Updated Branches: refs/heads/wicket-6.x 4e9a83fdc - a73209bea WICKET-5411 auto label auto update during ajax Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a73209be Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a73209be Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a73209be Branch: refs/heads/wicket-6.x Commit: a73209beab8814a06f2e085384ad87bdf1fda212 Parents: 4e9a83f Author: Igor Vaynberg igor.vaynb...@gmail.com Authored: Fri Nov 8 22:48:22 2013 -0800 Committer: Igor Vaynberg igor.vaynb...@gmail.com Committed: Fri Nov 8 22:48:22 2013 -0800 -- .../form/AjaxFormComponentUpdatingBehavior.java | 2 +- .../wicket/core/util/string/CssUtils.java | 14 ++ .../markup/html/form/AutoLabelResolver.java | 130 ++- .../apache/wicket/markup/html/form/Form.java| 24 +++- .../wicket/markup/html/form/FormComponent.java | 34 - .../wicket/protocol/http/WebApplication.java| 36 +++-- 6 files changed, 212 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/wicket/blob/a73209be/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java index 7eab478..bd8267c 100644 --- a/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java +++ b/wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormComponentUpdatingBehavior.java @@ -160,8 +160,8 @@ public abstract class AjaxFormComponentUpdatingBehavior extends AjaxEventBehavio catch (RuntimeException e) { onError(target, e); - } + formComponent.updateAutoLabels(target); } /** http://git-wip-us.apache.org/repos/asf/wicket/blob/a73209be/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java b/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java index a4944a3..7de8669 100644 --- a/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java +++ b/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java @@ -103,4 +103,18 @@ public final class CssUtils } response.write( /); } + + /** +* Get a standardized key for a CSS class. +* +* @param scope +*scope of CSS class +* @param facet +*facet of CSS class +* @return CSS key +*/ + public static String key(Class? scope, String facet) + { + return scope.getSimpleName() + .CSS. + facet; + } } http://git-wip-us.apache.org/repos/asf/wicket/blob/a73209be/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java -- diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java index 562e6ed..7892fa7 100644 --- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java +++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java @@ -16,9 +16,14 @@ */ package org.apache.wicket.markup.html.form; +import java.io.Serializable; + import org.apache.wicket.Component; import org.apache.wicket.MarkupContainer; +import org.apache.wicket.MetaDataKey; import org.apache.wicket.WicketRuntimeException; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.core.util.string.CssUtils; import org.apache.wicket.markup.ComponentTag; import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.markup.html.TransparentWebMarkupContainer; @@ -36,11 +41,14 @@ import org.slf4j.LoggerFactory; * liOutputs the {@code for} attribute with the value equivalent to the markup id of the * referenced form component/li
Re: Eclipse formatting, was: Martin's wicket pull request
yes, making it a workspace default messes up other projects... this way every time i import a project into the eclipse workspace i have to go and manually set the formatter on every module, which as you can imagine is not optimal -igor On Sat, Nov 9, 2013 at 1:40 PM, Martin Grigorov mgrigo...@apache.org wrote: But you have to import the xml just once, right ? It is not a big deal. Or the problem is that the xml messes up the other projects in your workspace ? On Sat, Nov 9, 2013 at 7:24 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: it is really frustrating that i have to do this manually now. before all i had to do was checkout the project and it was all set. wicket shares my workspace with other projects so the workspace-default is not going to work. can we drop the format def on wicket.apache.org and configure the maven plugin to set it up: http://maven.apache.org/plugins/maven-eclipse-plugin/examples/load-code-styles.html -igor On Fri, Nov 8, 2013 at 12:56 AM, Martin Grigorov mgrigo...@apache.org wrote: I'll test this soon. I'll update the docs for IDEA too if needed. On Thu, Nov 7, 2013 at 11:02 AM, Sven Meier s...@meiers.net wrote: Thanks, I've added a hint to the Idea instructions. Regards Sven On 11/06/2013 10:12 AM, Vojtěch Krása wrote: You should also specify values for Class count to use import with '*' and Names count to use static import with '*', since these values are not in EclipseCodeFormat.xml, and differs between Idea and Eclipse by default. V. 2013/11/6 Sven Meier s...@meiers.net Hi all, I removed all org.eclipse.jdt.[core|ui].prefs from the repo as discussed. EclipseCodeFormat.xml is updated now to our latest and greatest code format (which might differ between 6.x and master). Eclipse users should run mvn eclipse:eclipse to regenerate org.eclipse.jdt.core.prefs, then (re-)import EclipseCodeFormat.xml and use it as the default for your Wicket workspace(s). I've added a paragraph about the recommended Eclipse setup here: http://wicket.apache.org/learn/ides.html Could an Idea user please confirm that the format plugin ( http://plugins.jetbrains.com/plugin/6546) works as expected? Regards Sven On 11/05/2013 12:05 PM, Martin Grigorov wrote: On Tue, Nov 5, 2013 at 1:01 PM, Sven Meier s...@meiers.net wrote: IMHO we should have one authoritative source for our source format only. Whether this is EclipseCodeFormat.xml or something else can be dicussed on the other mail thread. Currently all org.eclipse.jdt.core.prefs have already diverged from EclipseCodeFormat.xml (perhaps they even differ between each other?), so I'm +1 to remove those settings from the repo as Martin has suggested. I can live with having to configure my Wicket workspace(s) once by importing EclipseCodeFormat.xml. So if no one objects, I'll update EclipseCodeFormat.xml from the current settings in wicket-core and apply Martin's patch afterwards. I'm +1. With the plugin that Rusi suggested in the other thread I can import EclipseCodeFormat.xml in Intellij IDEA and hopefully the formatting will be the same for all of us. Sven On 11/04/2013 04:42 PM, Martin Funk wrote: not quite if the org.eclipse.jdt.ui.prefs are not present eclipse will fall back to the workspace setting esp. formatter. The formatter profile as I described it in the attachment to https://issues.apache.org/jira/browse/WICKET-5399 has to be imported into the workspace once. If one has to follow more than one code formatting rulesets, than they have to be set for each project. The setting of the formatter profile will be written to org.eclipse.jdt.ui.prefs. mf Am 04.11.2013 um 16:25 schrieb Sven Meier s...@meiers.net: Ok, removing org.eclipse.jdt.core.prefs and org.eclipse.jdt.ui.prefs is easy. But without these files the Eclipse project settings (Java Code Style - Formatter) have to be adjusted manually for each Wicket module after mvn eclipse:eclipse :(. Sven On 11/04/2013 09:58 AM, Martin Grigorov wrote: Hi, Can someone of other Wicket code developers take a look at https://github.com/apache/wicket/pull/56 ? This is a pull request with some changes/updates to Eclipse's .settings/ (required by newer versions of Eclipse ?!). I don't use Eclipse and I cannot decide whether the PR is good or not. https://github.com/apache/wicket/pull/57/commits is another PR from Martin Funk that has some improvements to Wicket's unit tests that I'd like to merge but I cannot because it depends on PR 56. Additionally I'd like to ask all Eclipse users to disable the auto format the whole file feature. https://github.com/mafulafunk/wicket/commit/ 0aac81f393047865088864c6b299ce1e022ce1fa (part of PR 57) has such formatting changes that we agreed should
[jira] [Created] (WICKET-5410) Remove setting interfaces
Igor Vaynberg created WICKET-5410: - Summary: Remove setting interfaces Key: WICKET-5410 URL: https://issues.apache.org/jira/browse/WICKET-5410 Project: Wicket Issue Type: Improvement Reporter: Igor Vaynberg Fix For: 7.0.0 We still have separate settings interfaces. mostly this is a legacy design decision when we have a single settings object implement all these interfaces. the problem now that we are in semver is that we cannot add new settings in between major releases because doing so requires adding a method to an interface. since we do not have a single class implementing multiple interfaces scenario anymore we can get rid of the settings interfaces safely. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Created] (WICKET-5411) Improve AutoLabels to update their CSS dynamically
Igor Vaynberg created WICKET-5411: - Summary: Improve AutoLabels to update their CSS dynamically Key: WICKET-5411 URL: https://issues.apache.org/jira/browse/WICKET-5411 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 7.0.0 -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (WICKET-5411) Improve AutoLabels to update their CSS dynamically
[ https://issues.apache.org/jira/browse/WICKET-5411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-5411: -- Fix Version/s: 6.13.0 Improve AutoLabels to update their CSS dynamically -- Key: WICKET-5411 URL: https://issues.apache.org/jira/browse/WICKET-5411 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (WICKET-5411) Improve AutoLabels to update their CSS dynamically
[ https://issues.apache.org/jira/browse/WICKET-5411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-5411: -- Description: The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. Improve AutoLabels to update their CSS dynamically -- Key: WICKET-5411 URL: https://issues.apache.org/jira/browse/WICKET-5411 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (WICKET-5411) Improve AutoLabels by updating their CSS classes automatically during Ajax requests
[ https://issues.apache.org/jira/browse/WICKET-5411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-5411: -- Summary: Improve AutoLabels by updating their CSS classes automatically during Ajax requests (was: Improve AutoLabels to update their CSS dynamically) Improve AutoLabels by updating their CSS classes automatically during Ajax requests --- Key: WICKET-5411 URL: https://issues.apache.org/jira/browse/WICKET-5411 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. disabled by default in 6.13, always enabled in 7.0 -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (WICKET-5411) Improve AutoLabels to update their CSS dynamically
[ https://issues.apache.org/jira/browse/WICKET-5411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-5411: -- Description: The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. disabled by default in 6.13, always enabled in 7.0 was: The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. Improve AutoLabels to update their CSS dynamically -- Key: WICKET-5411 URL: https://issues.apache.org/jira/browse/WICKET-5411 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. disabled by default in 6.13, always enabled in 7.0 -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Updated] (WICKET-5411) Improve AutoLabels by updating their CSS classes automatically during Ajax requests
[ https://issues.apache.org/jira/browse/WICKET-5411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Igor Vaynberg updated WICKET-5411: -- Description: The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. disabled by default in 6.13 (to enable override WebApplication#getUpdateAutoLabelsOnAjaxRequests() ), always enabled in 7.0 was: The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. disabled by default in 6.13, always enabled in 7.0 Improve AutoLabels by updating their CSS classes automatically during Ajax requests --- Key: WICKET-5411 URL: https://issues.apache.org/jira/browse/WICKET-5411 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Igor Vaynberg Assignee: Igor Vaynberg Fix For: 6.13.0, 7.0.0 The problem with auto labels is that once they are rendered the only way to update their `error`/`required` css classes during ajax requests is to update some parent since auto components cannot be targeted directly. however, when dealing with forms we may not necessarily want to repaint components because we may lose state. This issue solves the problem by tracking state changes in form components that have auto labels and updating their css classes on all ajax requests. disabled by default in 6.13 (to enable override WebApplication#getUpdateAutoLabelsOnAjaxRequests() ), always enabled in 7.0 -- This message was sent by Atlassian JIRA (v6.1#6144)