our app has a lot of fine-grained security concerns. so we feel that putting @If makes the HTML rather unreadable.
rather we want to explore treating security as an "aspect" of each component (instead of enclosing it in an @If) and hence enhancement workers ...
in your post you mentioned "Sorry if I insist but it is not a good idea because you will have to reimplement a lot of components while implementing a component like this will make things easier" - from my understanding of enhancement workers they will transparently add the isUserInRole attribs to *ALL* components without having to reimplement them. so you have me lost on that one.
Thanks - karthik.
On 11/13/06, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
On 11/13/06, Karthik N < [EMAIL PROTECTED]> wrote:Ah! Makes sense. We want to avoid @If if possible, and hence we're looking at trying to enhance the components themselves to accept the isUserInRole parameter, for which we have to override the renderComponent.
Sorry if I insist but it is not a good idea because you will have to reimplement a lot of components while implementing a component like this will make things easier
--- SecurityComponent.html ---
<div jwcid="@If" condition="ognl:userInRole">
<div jwcid="@RenderBody">
protected components
</div>
</div>So I'm pasting an earlier question for convenience:
1) After some digging we find that InjectAjaxComponentRenderWorker already enhances AbstractComponent.renderComponent (). Methods of this Worker are protected, so we plan to further override this implementation and use the approach described in http://hivemind.apache.org/override.html to override the service-point id="ComponentRenderInterceptor"
Is this the right way forward?
If you use my approach yo'll need only to override renderPage
http://tapestry.apache.org/tapestry4/tapestry/apidocs/index.html
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Tacos-devel mailing list Tacos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tacos-devel