Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of getting and setting properties customly in PropertyResolver #74

Closed
wants to merge 2 commits into from

Conversation

PhantomYdn
Copy link

There is no way to customize getting of properties from the object. All possible ways to gain properties are hardcoded in PropertyResolver.
But, for example, there is set of NoSQL document DBs which have some class "Document" to work with DB. And to get some property of that document you should call something like this: 'doc.getProperty("myPropertyName")'.

This pull request enables possibility to specify custom GetAndSet for your type of object. Please take a look to PropertyResolverTest

@klopfdreh
Copy link
Member

It would be nice if you could file in a ticket in JIRA so that it can be catched up by the Wicket Dev's. For more information take a look here: https://cwiki.apache.org/confluence/display/WICKET/Contributing+to+Wicket

@martin-g
Copy link
Member

@svenmeier
Copy link
Contributor

I'm working on a different solution, please take a look at https://github.com/apache/wicket/tree/WICKET-5623-extensible-propertyresolver

@PhantomYdn
Copy link
Author

Looks interesting and promising:)
Could you please also fix silly current wicket issue with that stuff which currently exist?
Issue is that if there is only a setter and no getter: PropertyResolver will fail.

And what's target release? I hope that some 7.XX?

@svenmeier
Copy link
Contributor

if there is only a setter and no getter, PropertyResolver will fail.

Please open a separate issue for that.

I'm planning this change for 6.x, 7.x and 8.x

@PhantomYdn
Copy link
Author

Created: https://issues.apache.org/jira/browse/WICKET-6201

Also - it will be very helfull to make getObjectWithGetAndSet public. Sometimes it's usefully to introspect object by wicket utilities. We switched in Orienteer from spring bean introspection to wicket due not accurate working with beans in Spring (for example if there is a class with methods like: public String getValue(); public void setValue(Object value) - Spring is failing measurably even if property "value" was not directly requested).

@svenmeier
Copy link
Contributor

Please close this pull request: WICKET-5623 adds IPropertyLocator.

@PhantomYdn
Copy link
Author

Thanks for implementation of this feature!

@PhantomYdn PhantomYdn closed this Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants