Comments (4)
This is not going to be doable, because MetaModel is just a PropertyModel that gives you a typesafe way to build up a property string. Wicket will then interpret that property string to use accessor methods. There is no way via the property expression to indicate that Wicket should use fields vs. accessor methods.
from metagen.
So rewrite the MetaModel class to incorporate useful bits of
PropertyModel and create a flag on SingularProperty that indicates a
preference for the field vs the method(s).
Or change the MetaModel / PropertyModel implementation to inspect the
return type of the getter / setter before using it.
On Mon, Apr 30, 2012 at 1:56 PM, David Hosier
[email protected]
wrote:
This is not going to be doable, because MetaModel is just a PropertyModel that gives you a typesafe way to build up a property string. Wicket will then interpret that property string to use accessor methods. There is no way via the property expression to indicate that Wicket should use fields vs. accessor methods.
Reply to this email directly or view it on GitHub:
#7 (comment)
from metagen.
this would require writing our own property resolving mechanism. the one inside wicket is not meant to be extensible because it is optimized.
from metagen.
- Type of
Property
needs to take into account the type of field or getter based on the preferred one Property
already hasget(instance)
method, it will need to be tweaked to take the preference of getter/field into accountMetaModel
'sget/set
methods will need to split the property expession and loop over each segment calling the correctProperty
's get/set methods depending on whether or notgetObject
orsetObject
is called.- The traversal in
MetaModel
will have to safely handlenull
s ingetObject
from metagen.
Related Issues (10)
- Warn on private inner classes
- Add support for subclasses
- Support partial compilation inside IDEs HOT 1
- Meta properties should support serialization
- Meta properties should support serialization HOT 1
- Upgrade to slf4j 1.6.2 to align with latest Wicket
- Propagate @Deprecated Annotation HOT 1
- Metagen should accept annotated interfaces for meta generation
- Unable to process metamodel for SomeClass<?> HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metagen.