pojosontheweb / woko

POJOs on the Web !
http://www.pojosontheweb.com
Apache License 2.0
9 stars 1 forks source link

Allow to render fragment facets via request #216

Closed vankeisb closed 10 years ago

vankeisb commented 10 years ago

We sometimes need to reuse a fragment facet in AJAX environments. The fragment is rendered server side when the page is initially displayed, and then we just want to update that part of the DOM via AJAX fragment replace.

We should have a way to invoke fragment facets directly.

vankeisb commented 10 years ago

Use the base class : woko.facets.BaseFragmentToResolutionFacet.

Say you have a Fragment Facet with name 'myFragment', and you want to make it available as a resolution. You only need to extend BaseFragmentToResolutionFacet and use the naming convention :

@FacetKey(name="myFragment_toResolution")
class MyFragmentToResolution extends BaseFragmentToResolutionFacet {
}