Re: T5: archiving a page

2010-12-30 Thread Angelo C.

Hi Joost,

This is a good solution, is there any maven dependencies I can directly
specify to pull down the Flying Saucer? or some codes that I can directly
use in a T5 app? 

Thanks,

Angelo


Joost Schouten (mailing lists) wrote:
> 
> Another option is to use Flying Saucer [1] to render the html in pure
> java. I use it with iText [2] to create pdf's from any xhtml page.
> This is a nice combination as it basically allows you to template your
> pdf's with tapestry pages. So from within a Tapestry page you retreive
> any html with the use of an URLConnection (in my case another page in
> my own app) and return it in the form of an pdf.
> 
> I'm sure there are ways to render to images i n Flying Saucer as well.
> 
> Good luck,
> Joost
> 
> [1] https://xhtmlrenderer.dev.java.net/
> [2]
> http://today.java.net/pub/a/today/2007/06/26/generating-pdfs-with-flying-saucer-and-itext.html
> 
> On Thu, Dec 30, 2010 at 5:19 PM, Donny Nadolny 
> wrote:
>> Kind of. You can run it using xvfb (assuming linux), so you don't need a
>> full x server.
>>
>> Selenium is a remote control tool for browsers, mainly used for writing
>> tests for webapps. It starts up firefox (or ie, chrome, or safari) and
>> controls the browser, telling it to click on links / type things, and you
>> can make assertions on the output. Usually it's only run on developer/CI
>> machines, not on your production machine, although I've seen it done.
>>
>> On Thu, Dec 30, 2010 at 11:12 AM, Angelo C. 
>> wrote:
>>
>>>
>>> Thanks for the quick answer, not so familiar with selenium, can it be
>>> run
>>> headless in the server?
>>> --
>>> View this message in context:
>>> http://tapestry.1045711.n5.nabble.com/T5-archiving-a-page-tp3322541p3322591.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-archiving-a-page-tp3322541p3323061.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [ANN] A Tapestry5 Based Security Module

2010-12-30 Thread Taha Hafeez
Hi Werner


I think it can be... It can act as a tapestry-layer over any
security/authentication framework...

Will try to add an example for such a use but overall I want this as a
standalone role-based access and permission-based access model for
tapestry which is apt for small projects and can be extended to larger
projects too..

But any suggestions will be more than helpful and especially corrections
and criticism,,,

regards
Taha

On Thu, Dec 30, 2010 at 11:47 PM, Werner Keil  wrote:

> Hi,
>
> Is this related or may be used with SSO technologies like OpenID, SAML or
> OAuth?
>
> Werner
>


Re: [ANN] A Tapestry5 Based Security Module

2010-12-30 Thread Werner Keil
Hi,

Is this related or may be used with SSO technologies like OpenID, SAML or
OAuth?

Werner


Re: Grid with Scroll synchronization + Customization

2010-12-30 Thread Nourredine


Tawus wrote:
> 
> Hi
> 
> This is something you should have a look at
> 
> http://docs.jboss.org/hibernate/core/3.3/reference/en/html/performance.html
> 
> As an example, in one of our projects we had basic audit fields like
> creator
> user and modifier  user in every table.
> 
> Each time a grid was displayed, because of Eager Fetching, user table rows
> were fetched along with
> the other table rows. We could not go for lazy loading as the creator and
> modifier were to be displayed too
> 
> 
> 

Hi,

Actually, for join queries, the pagination is not effective when you use the
"fetch" syntax (even if you use the setMaxResult...).

See here for more details :
http://java.dzone.com/articles/hibernate-tuning-queries-using?page=0,2

A solution is to get the result in 2 times  : get the paginated data without
"fetching" , then get joined data from the previous list (using the "IN"
syntax and taking into account the sorting in the 2 queries)

Nourredine.

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Grid-with-Scroll-synchronization-Customization-tp3317448p3322702.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: archiving a page

2010-12-30 Thread Martin Strand

If Java is not required, you could use CutyCapt to render the page:
http://cutycapt.sourceforge.net/

It supports jpeg, pdf and more.

On Thu, 30 Dec 2010 16:23:15 +0100, Angelo C.   
wrote:




Hi,

Is there a way to archive a page? say render it into a jpeg or a pdf ?

Angelo


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: archiving a page

2010-12-30 Thread Donny Nadolny
As long as your pages don't contain javascript that alter the page / any
ajax, or if you don't care if the result of those scripts is included in the
archived version. The other posters are right though, depending on your use
case, you probably want some other way to render the page to create an
image. You don't need something tapestry specific though, you just need
something that can render html/css/javascript if necessary.

On Thu, Dec 30, 2010 at 11:33 AM, Joost Schouten (mailing lists) <
joost...@jsportal.com> wrote:

> Another option is to use Flying Saucer [1] to render the html in pure
> java. I use it with iText [2] to create pdf's from any xhtml page.
> This is a nice combination as it basically allows you to template your
> pdf's with tapestry pages. So from within a Tapestry page you retreive
> any html with the use of an URLConnection (in my case another page in
> my own app) and return it in the form of an pdf.
>
> I'm sure there are ways to render to images in Flying Saucer as well.
>
> Good luck,
> Joost
>
> [1] https://xhtmlrenderer.dev.java.net/
> [2]
> http://today.java.net/pub/a/today/2007/06/26/generating-pdfs-with-flying-saucer-and-itext.html
>
> On Thu, Dec 30, 2010 at 5:19 PM, Donny Nadolny 
> wrote:
> > Kind of. You can run it using xvfb (assuming linux), so you don't need a
> > full x server.
> >
> > Selenium is a remote control tool for browsers, mainly used for writing
> > tests for webapps. It starts up firefox (or ie, chrome, or safari) and
> > controls the browser, telling it to click on links / type things, and you
> > can make assertions on the output. Usually it's only run on developer/CI
> > machines, not on your production machine, although I've seen it done.
> >
> > On Thu, Dec 30, 2010 at 11:12 AM, Angelo C. 
> wrote:
> >
> >>
> >> Thanks for the quick answer, not so familiar with selenium, can it be
> run
> >> headless in the server?
> >> --
> >> View this message in context:
> >>
> http://tapestry.1045711.n5.nabble.com/T5-archiving-a-page-tp3322541p3322591.html
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Grid with Scroll synchronization + Customization

2010-12-30 Thread Taha Hafeez
Hi

This is something you should have a look at

http://docs.jboss.org/hibernate/core/3.3/reference/en/html/performance.html

As an example, in one of our projects we had basic audit fields like creator
user and modifier  user in every table.

Each time a grid was displayed, because of Eager Fetching, user table rows
were fetched along with
the other table rows. We could not go for lazy loading as the creator and
modifier were to be displayed too

Finally what we did was break @ManyToOne relationship of those tables with
user table and directly place
the business key (which in that case was username) into those tables.

e.g

class Transaction {

    Fields ...

   @ManyToOne
   private User creator;

   @ManyToOne
   private User modifier;

}

changed to

class Transaction {

   private String creatorName;
   private String modifierName;
}


Hope it helps
regards
Taha


On Wed, Dec 29, 2010 at 4:04 PM, Duruk_Kab  wrote:

>
> Hi All, Thanks alot for your suggestions.
>
> I have implemented GridDataSource so I am retrieving only required data
> from
> the back end to be displayed on the grid. (SetMaxResults + Pagination)
>
> But I do have many things associated with the Grid as Error image, Check
> boxes with JavaScript validation, Formatting for Amount / Date, Editable
> grid, Have more than 50 columns and 50 rows etc.
>
> http://tapestry-users.832.n2.nabble.com/file/n5874184/Detail.bmp
>
> Is it taking 3-4 seconds to load the grid because of all these features? I
> could trace that codebase takes maximum 2 seconds to retrieve the data from
> the back end. Is this issue is related to the Browser?
>
> Taha, Can you give me any reference regarding Lazy Loading and even at
> times
> removing hibernate based table relationships... as you pointed out?
>
> Please help me to conclude on what is taking time as I dont think I have
> any
> issues with the code base.
>
> @ DK
> --
> View this message in context:
> http://tapestry-users.832.n2.nabble.com/Grid-with-Scroll-synchronization-Customization-tp5863225p5874184.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: archiving a page

2010-12-30 Thread Markus Feindler
Have a look at https://xhtmlrenderer.dev.java.net/ , it's exactly what 
you need.


Selenium is neither suitable nor made for your use case.

Hi,

Is there a way to archive a page? say render it into a jpeg or a pdf ?

Angelo



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: archiving a page

2010-12-30 Thread Joost Schouten (mailing lists)
Another option is to use Flying Saucer [1] to render the html in pure
java. I use it with iText [2] to create pdf's from any xhtml page.
This is a nice combination as it basically allows you to template your
pdf's with tapestry pages. So from within a Tapestry page you retreive
any html with the use of an URLConnection (in my case another page in
my own app) and return it in the form of an pdf.

I'm sure there are ways to render to images in Flying Saucer as well.

Good luck,
Joost

[1] https://xhtmlrenderer.dev.java.net/
[2] 
http://today.java.net/pub/a/today/2007/06/26/generating-pdfs-with-flying-saucer-and-itext.html

On Thu, Dec 30, 2010 at 5:19 PM, Donny Nadolny  wrote:
> Kind of. You can run it using xvfb (assuming linux), so you don't need a
> full x server.
>
> Selenium is a remote control tool for browsers, mainly used for writing
> tests for webapps. It starts up firefox (or ie, chrome, or safari) and
> controls the browser, telling it to click on links / type things, and you
> can make assertions on the output. Usually it's only run on developer/CI
> machines, not on your production machine, although I've seen it done.
>
> On Thu, Dec 30, 2010 at 11:12 AM, Angelo C.  wrote:
>
>>
>> Thanks for the quick answer, not so familiar with selenium, can it be run
>> headless in the server?
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/T5-archiving-a-page-tp3322541p3322591.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: archiving a page

2010-12-30 Thread Donny Nadolny
Kind of. You can run it using xvfb (assuming linux), so you don't need a
full x server.

Selenium is a remote control tool for browsers, mainly used for writing
tests for webapps. It starts up firefox (or ie, chrome, or safari) and
controls the browser, telling it to click on links / type things, and you
can make assertions on the output. Usually it's only run on developer/CI
machines, not on your production machine, although I've seen it done.

On Thu, Dec 30, 2010 at 11:12 AM, Angelo C.  wrote:

>
> Thanks for the quick answer, not so familiar with selenium, can it be run
> headless in the server?
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-archiving-a-page-tp3322541p3322591.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: archiving a page

2010-12-30 Thread Angelo C.

Thanks for the quick answer, not so familiar with selenium, can it be run
headless in the server?
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-archiving-a-page-tp3322541p3322591.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: archiving a page

2010-12-30 Thread Donny Nadolny
You could use selenium to capture a screenshot of the page, as it looks in
the browser. See
http://release.seleniumhq.org/selenium-remote-control/0.9.2/doc/java/com/thoughtworks/selenium/DefaultSelenium.html#captureScreenshot%28java.lang.String%29

On Thu, Dec 30, 2010 at 10:23 AM, Angelo C.  wrote:
>
> Hi,
>
> Is there a way to archive a page? say render it into a jpeg or a pdf ?
>
> Angelo
> --
> View this message in context:
http://tapestry.1045711.n5.nabble.com/T5-archiving-a-page-tp3322541p3322541.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


T5: archiving a page

2010-12-30 Thread Angelo C.

Hi,

Is there a way to archive a page? say render it into a jpeg or a pdf ?

Angelo
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-archiving-a-page-tp3322541p3322541.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [ANN] A Tapestry5 Based Security Module

2010-12-30 Thread Pablo Borges
Taha,

I'm waiting.

2010/12/30 Taha Hafeez 

> Thanks
>
> There are three build-in rules Role, Principal, IP
>
> You can create your own rule by implementing the interface
>
> package com.google.code.tapestryaddons.security;
>
> public interface SecurityRuleHandler {
>
>   boolean matches(String value);
>
> }
>
> e.g I implemented the IP rule like this
>
> public class IPRuleHandler implements SecurityRuleHandler{
>
>   private RequestGlobals requestGlobals;
>
>   public IPRuleHandler(RequestGlobals requestGlobals){
>  this.requestGlobals = requestGlobals;
>   }
>
>   public boolean matches(String value) {
> try {
>return
> IPUtils.matches(requestGlobals.getHTTPServletRequest().getRemoteAddr(),
> value);
> } catch (UnknownHostException e) {
>throw new RuntimeException("Could not apply IP based Rule for :
> " + value, e);
> }
>   }
> }
>
>
> Now you can apply the rule on a page or component l ike
>
> @Secure(policy=SecurityPolicy.ALLOW, "ip:192.168.1.0/24")
> public class Index {
> }
>
> this page will be visible only through these ips and from any other page it
> will throw a SecurityException
>
> I am writing not only the documentation but also a tutorial titled "How to
> implement your own security in Tapestry5".
> Hope to publish it as a Wiki on the same project site this weekend
>
> regards
> Taha
>
>
>
> On Thu, Dec 30, 2010 at 7:44 PM, Pablo Borges  >wrote:
>
> > Taha, congratulations.
> >
> > how do I implement my rules?
> > example:
> >
> > User: rules, rules, etc..
> >
> > write a documentation explaining how it works. could be the actual site
> of
> > the project.
> >
> > abs.
> >
> > 2010/12/30 Taha Hafeez 
> >
> > > Hi
> > >
> > > I have created a tapestry-security project based on tapestry5 with no
> > > dependencies on any security frameworks...
> > >
> > >
> > > SMALL INTRODUCTION
> > > ---
> > >
> > > It supports Roles, Principals & IP for now and I intend to add
> > permissions
> > > also..
> > >
> > > there are three components
> > >
> > > IfPrincipal
> > > IfRole
> > > IfIP
> > >
> > > which can be used in templates to make conditional inclusion of
> > components
> > >
> > > It also supports
> > >
> > > @Secure annotation
> > >
> > > which takes two parameters
> > >
> > > policy => Allow | Deny
> > > value => String [] {rule1, rule2, rule3 }  which contains rules
> > >
> > > Rules can be specified as
> > >
> > > prefix:value1,value2,value3
> > >
> > > prefixes are role, principal and ip for now. Role is default
> > >
> > > value1,value2,value3 are ORed while rule1,rule2,rule3 are ANDed
> > >
> > > e.g
> > >
> > > @Secure({"ADMIN,USER"})
> > >
> > > will allow access to both whereas
> > >
> > > @Secure({"ADMIN"}, {ip:172.19.0.0/16})
> > >
> > > will allow access to admin from network 172.19.0.0/16 only
> > >
> > > @Secure can be applied on page, component or a method for now and I
> > intend
> > > to extend it to package level also
> > >
> > > By implementing SecurityRuleHandler one can create a new Rule
> > >
> > > ==
> > >
> > > Now why one more project when there are so many good choices around
> > > ? Honestly  just to learn Tapestry5 but now we are seriously
> considering
> > it
> > > in our few small modules and later may consider it is other projects
> also
> > >
> > > Just checkout the source code to see how great tapestry5 is and how
> > simple
> > > it is to create your own security project
> > >
> > > The project is at
> > >
> > > http://code.google.com/p/tapestry-addons/
> > >
> > > the source code is avaliable at
> > >
> > > http://code.google.com/p/tapestry-addons/source/browse/
> > >
> > > trunk/security
> > >
> > > regards
> > > Taha
> > >
> >
> >
> >
> > --
> > 
> > Pablo S. Borges
> > Bacharel em Ciência da Computação
> > Especialista em Qualidade e Gestão de Software
> > SCJP - Sun Certified Java Programmer 1.4
> >
>


Re: [T5] Removing project name and port number from URL

2010-12-30 Thread niksami

Thanks, I'll try that. :)

-
Niksa Mijanovic
Java developer, jr.
www.fleka.me
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Removing-project-name-and-port-number-from-URL-tp3322312p3322495.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5] Removing project name and port number from URL

2010-12-30 Thread Donny Nadolny
Yes, that will work on jetty too. Also, you don't need to add anything
to the web.xml, it will work as-is.

I believe there are other ways of doing it (I think there's some xml
config you can add to tell it to treat a certain application as the
root), but renaming it to ROOT.war is how I've done it.

On Thu, Dec 30, 2010 at 5:50 AM, niksami  wrote:
>
> Hi guys,
>
> I have the following problem. I'm developing application in Tapestry
> 5.1.0.5, and now when I deploy the app to the server I access it in this
> way: http://myApp.com:8080/myApp
>
> However, now I have to deploy it on the root domain name. So now I need to
> access home page of the application in this way: http://myApp.com
>
> I suppose that changing Jetty's port number from 8080 to 80 would remove it
> from URL. But, I don't want to have url look like:
> http://myApp.com/myApp/about , it would be much better to look like:
> http://myApp.com/about .
>
> I read some topics here, and in one
> http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=90748
> Steve Shucker  says that (on Tomcat server) I only need to rename my WAR
> file to ROOT.war and to add
> 
>      myApp
>  
> in web.xml.
>
> Will that work on Jetty too? Is this the best way to resolve my problem?
>
> Regards.
>
> -
> Niksa Mijanovic
> Java developer, jr.
> www.fleka.me
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-Removing-project-name-and-port-number-from-URL-tp3322312p3322312.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [ANN] A Tapestry5 Based Security Module

2010-12-30 Thread Taha Hafeez
Thanks

There are three build-in rules Role, Principal, IP

You can create your own rule by implementing the interface

package com.google.code.tapestryaddons.security;

public interface SecurityRuleHandler {

   boolean matches(String value);

}

e.g I implemented the IP rule like this

public class IPRuleHandler implements SecurityRuleHandler{

   private RequestGlobals requestGlobals;

   public IPRuleHandler(RequestGlobals requestGlobals){
  this.requestGlobals = requestGlobals;
   }

   public boolean matches(String value) {
 try {
return
IPUtils.matches(requestGlobals.getHTTPServletRequest().getRemoteAddr(),
value);
 } catch (UnknownHostException e) {
throw new RuntimeException("Could not apply IP based Rule for :
" + value, e);
 }
   }
}


Now you can apply the rule on a page or component l ike

@Secure(policy=SecurityPolicy.ALLOW, "ip:192.168.1.0/24")
public class Index {
}

this page will be visible only through these ips and from any other page it
will throw a SecurityException

I am writing not only the documentation but also a tutorial titled "How to
implement your own security in Tapestry5".
Hope to publish it as a Wiki on the same project site this weekend

regards
Taha



On Thu, Dec 30, 2010 at 7:44 PM, Pablo Borges wrote:

> Taha, congratulations.
>
> how do I implement my rules?
> example:
>
> User: rules, rules, etc..
>
> write a documentation explaining how it works. could be the actual site of
> the project.
>
> abs.
>
> 2010/12/30 Taha Hafeez 
>
> > Hi
> >
> > I have created a tapestry-security project based on tapestry5 with no
> > dependencies on any security frameworks...
> >
> >
> > SMALL INTRODUCTION
> > ---
> >
> > It supports Roles, Principals & IP for now and I intend to add
> permissions
> > also..
> >
> > there are three components
> >
> > IfPrincipal
> > IfRole
> > IfIP
> >
> > which can be used in templates to make conditional inclusion of
> components
> >
> > It also supports
> >
> > @Secure annotation
> >
> > which takes two parameters
> >
> > policy => Allow | Deny
> > value => String [] {rule1, rule2, rule3 }  which contains rules
> >
> > Rules can be specified as
> >
> > prefix:value1,value2,value3
> >
> > prefixes are role, principal and ip for now. Role is default
> >
> > value1,value2,value3 are ORed while rule1,rule2,rule3 are ANDed
> >
> > e.g
> >
> > @Secure({"ADMIN,USER"})
> >
> > will allow access to both whereas
> >
> > @Secure({"ADMIN"}, {ip:172.19.0.0/16})
> >
> > will allow access to admin from network 172.19.0.0/16 only
> >
> > @Secure can be applied on page, component or a method for now and I
> intend
> > to extend it to package level also
> >
> > By implementing SecurityRuleHandler one can create a new Rule
> >
> > ==
> >
> > Now why one more project when there are so many good choices around
> > ? Honestly  just to learn Tapestry5 but now we are seriously considering
> it
> > in our few small modules and later may consider it is other projects also
> >
> > Just checkout the source code to see how great tapestry5 is and how
> simple
> > it is to create your own security project
> >
> > The project is at
> >
> > http://code.google.com/p/tapestry-addons/
> >
> > the source code is avaliable at
> >
> > http://code.google.com/p/tapestry-addons/source/browse/
> >
> > trunk/security
> >
> > regards
> > Taha
> >
>
>
>
> --
> 
> Pablo S. Borges
> Bacharel em Ciência da Computação
> Especialista em Qualidade e Gestão de Software
> SCJP - Sun Certified Java Programmer 1.4
>


Re: [ANN] A Tapestry5 Based Security Module

2010-12-30 Thread Pablo Borges
Taha, congratulations.

how do I implement my rules?
example:

User: rules, rules, etc..

write a documentation explaining how it works. could be the actual site of
the project.

abs.

2010/12/30 Taha Hafeez 

> Hi
>
> I have created a tapestry-security project based on tapestry5 with no
> dependencies on any security frameworks...
>
>
> SMALL INTRODUCTION
> ---
>
> It supports Roles, Principals & IP for now and I intend to add permissions
> also..
>
> there are three components
>
> IfPrincipal
> IfRole
> IfIP
>
> which can be used in templates to make conditional inclusion of components
>
> It also supports
>
> @Secure annotation
>
> which takes two parameters
>
> policy => Allow | Deny
> value => String [] {rule1, rule2, rule3 }  which contains rules
>
> Rules can be specified as
>
> prefix:value1,value2,value3
>
> prefixes are role, principal and ip for now. Role is default
>
> value1,value2,value3 are ORed while rule1,rule2,rule3 are ANDed
>
> e.g
>
> @Secure({"ADMIN,USER"})
>
> will allow access to both whereas
>
> @Secure({"ADMIN"}, {ip:172.19.0.0/16})
>
> will allow access to admin from network 172.19.0.0/16 only
>
> @Secure can be applied on page, component or a method for now and I intend
> to extend it to package level also
>
> By implementing SecurityRuleHandler one can create a new Rule
>
> ==
>
> Now why one more project when there are so many good choices around
> ? Honestly  just to learn Tapestry5 but now we are seriously considering it
> in our few small modules and later may consider it is other projects also
>
> Just checkout the source code to see how great tapestry5 is and how simple
> it is to create your own security project
>
> The project is at
>
> http://code.google.com/p/tapestry-addons/
>
> the source code is avaliable at
>
> http://code.google.com/p/tapestry-addons/source/browse/
>
> trunk/security
>
> regards
> Taha
>



-- 

Pablo S. Borges
Bacharel em Ciência da Computação
Especialista em Qualidade e Gestão de Software
SCJP - Sun Certified Java Programmer 1.4


[ANN] A Tapestry5 Based Security Module

2010-12-30 Thread Taha Hafeez
Hi

I have created a tapestry-security project based on tapestry5 with no
dependencies on any security frameworks...


SMALL INTRODUCTION
---

It supports Roles, Principals & IP for now and I intend to add permissions
also..

there are three components

IfPrincipal
IfRole
IfIP

which can be used in templates to make conditional inclusion of components

It also supports

@Secure annotation

which takes two parameters

policy => Allow | Deny
value => String [] {rule1, rule2, rule3 }  which contains rules

Rules can be specified as

prefix:value1,value2,value3

prefixes are role, principal and ip for now. Role is default

value1,value2,value3 are ORed while rule1,rule2,rule3 are ANDed

e.g

@Secure({"ADMIN,USER"})

will allow access to both whereas

@Secure({"ADMIN"}, {ip:172.19.0.0/16})

will allow access to admin from network 172.19.0.0/16 only

@Secure can be applied on page, component or a method for now and I intend
to extend it to package level also

By implementing SecurityRuleHandler one can create a new Rule

==

Now why one more project when there are so many good choices around
? Honestly  just to learn Tapestry5 but now we are seriously considering it
in our few small modules and later may consider it is other projects also

Just checkout the source code to see how great tapestry5 is and how simple
it is to create your own security project

The project is at

http://code.google.com/p/tapestry-addons/

the source code is avaliable at

http://code.google.com/p/tapestry-addons/source/browse/

trunk/security

regards
Taha


[T5] Removing project name and port number from URL

2010-12-30 Thread niksami

Hi guys,

I have the following problem. I'm developing application in Tapestry
5.1.0.5, and now when I deploy the app to the server I access it in this
way: http://myApp.com:8080/myApp

However, now I have to deploy it on the root domain name. So now I need to
access home page of the application in this way: http://myApp.com

I suppose that changing Jetty's port number from 8080 to 80 would remove it
from URL. But, I don't want to have url look like:
http://myApp.com/myApp/about , it would be much better to look like:
http://myApp.com/about .

I read some topics here, and in one 
http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=90748
Steve Shucker  says that (on Tomcat server) I only need to rename my WAR
file to ROOT.war and to add 

  myApp
   
in web.xml.

Will that work on Jetty too? Is this the best way to resolve my problem?

Regards.

-
Niksa Mijanovic
Java developer, jr.
www.fleka.me
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Removing-project-name-and-port-number-from-URL-tp3322312p3322312.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tapestry5 Dynamics Parameter Binding

2010-12-30 Thread Taha Hafeez
Thanks Josh

regards
Taha



On Wed, Dec 29, 2010 at 11:12 PM, Josh Canfield wrote:

> Have you tried putting the @Property tag on your Component1?
>
> public class Page {
>  @Component
>  @Property
>  private Component1 component1;
> }
>
> 
> 
>
> Assuming component2 takes a parameter named "attached" with default binding
> as property and an appropriate type to accept component1...
>
> I haven't run this code, but I believe it should work...
> Josh
>
> On Tue, Dec 28, 2010 at 8:54 PM, Taha Hafeez  >wrote:
>
> > Hi
> >
> > I have two components on a single page and I want a property of one
> > component to be bound to parameter of another component.
> > I can easy do that in a page but can I do that using
> > ComponentClassTransformWorker.
> >
> > tml is like
> >
> > 
> > 
> >
> > Java Class is
> >
> > public class Page {
> >   @Component
> >   private Component2 component2;
> >
> >   public String getPropertyFromComponent2(){
> >  return component2.getPropertyFromComponent2();
> >   }
> > }
> >
> > What I want is
> >
> > 
> > 
> >
> > Everything else happens Auto-ComponentClassTransformWorker-matically
> >
> >
> >
> > I think I should be able to but am sure how ?
> >
> > regards
> > Taha
> >
>