Giter Club home page Giter Club logo

Comments (4)

david-hosier avatar david-hosier commented on June 30, 2024

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.

lakemalcom avatar lakemalcom commented on June 30, 2024

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.

ivaynberg avatar ivaynberg commented on June 30, 2024

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.

ivaynberg avatar ivaynberg commented on June 30, 2024
  • Type of Property needs to take into account the type of field or getter based on the preferred one
  • Property already has get(instance) method, it will need to be tweaked to take the preference of getter/field into account
  • MetaModel's get/set methods will need to split the property expession and loop over each segment calling the correct Property's get/set methods depending on whether or not getObject or setObject is called.
  • The traversal in MetaModel will have to safely handle nulls in getObject

from metagen.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.