On 11/13/06, Karthik N <[EMAIL PROTECTED]> wrote:
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>
If you use my approach yo'll need only to override renderPage
http://tapestry.apache.org/tapestry4/tapestry/apidocs/index.html
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
On 11/13/06, Andrea Chiumenti <[EMAIL PROTECTED] > wrote:Karthik,
for components we developed a small component that has a @If and the condition is isUserInRole.
Regarding the principal qestion you will use Hivemind only to set it as a visit object so that you can recover it throught injection into your pages and components.
Overriding the renderComponent for principal validation should be fine.
In addiction if you use jdk5 injection may be inherited.
ciao,
kiuma
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel
------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/tacos-devel
