You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vegeta Saiyajin <lo...@ica.luz.ve> on 2003/06/09 16:14:28 UTC

Bad HTML generated by Tapestry

Hi,

I'm new to Tapestry. I think it is very well designed, but I have 
a problem.
When I run the workbench example application I doesn't run well 
on Konqueror 3.1 or Mozilla 1.3 on Linux. The Display Request 
Debug Information produces a lot of blank fields on both 
browsers. The DatePicker displays very bad in Konqueror (works 
well on Mozilla). The worst part is the Palette section, which 
does not work at all.
I am using Tapestry beta 1a on Tomcat4.1.24 on Suse Linux 8.1.

On MS Internet Explorer (do not remember the version, sorry) 
everything works better, but the Palette still does not work 
completely well (at least it allows you to move elements from 
the Available section to the Selected section).

I was planning to develop a simple Web mail application using 
Tapestry, but seeing how unusable its output is on Linux I think 
I will have to use another toolkit.
It's a shame because I really like the Tapestry approach to web 
applications.

I have two other questions:
1. Is it possible to restrict access to some pages in an a 
Tapestry application based on a security policy? or does 
everyone who has access to the application have access to all 
the pages in the application?
2. Is it possible to create applications that produce WML (for 
WAP phones) or HTML (for ordinary browsers) automatically based 
on some criteria (e.g. request header fields)?

Regards,
Vegeta

PS: sorry for my bad english

Re: Bad HTML generated by Tapestry

Posted by Bill Lear <ra...@zopyra.com>.
On Monday, June 9, 2003 at 10:14:28 (-0400) Vegeta Saiyajin writes:
>...
>I have two other questions:
>1. Is it possible to restrict access to some pages in an a 
>Tapestry application based on a security policy? or does 
>everyone who has access to the application have access to all 
>the pages in the application?

Yes.  See the Vlib example.  An easy way to do this is to have a page
called, say Protected, which has a validate() function that ensures
the requested page is seen only if the user passes the validation.
If validation passes, all is cool, if not, the user is redirected to
Login page, or whatever.  Subclass this page and you're all set.

Here's what I use in my Protected class to validate the user:

    public void validate(IRequestCycle cycle) {
        Visit visit = (Visit) getVisit();

        if (visit != null && visit.isUserLoggedIn()) {
            return;
        }

        // User not logged in ... redirect through the Login page.

        Login login = (Login) cycle.getPage("Login");

        login.setCallback(new PageCallback(this));

        throw new PageRedirectException(login);
    }

So, if I have a page Account that needs protection, I subclass Protected.
In the above, the pagecallback is set to "this", which will be the
Account page.  So, when the user is done logging in, they get redirected to
the Account page.

>PS: sorry for my bad english

Ain't nuthin' wrong with it, bro'.


Bill

RE: Bad HTML generated by Tapestry

Posted by David Solis <ds...@legosoft.com.mx>.

> -----Original Message-----
> From: Vegeta Saiyajin [mailto:lord.vegeta@ica.luz.ve]
> Sent: Monday, June 09, 2003 9:14 AM
> To: Tapestry users
> Subject: Bad HTML generated by Tapestry
> 
> Hi,
> 
> I'm new to Tapestry. I think it is very well designed, but I have
> a problem.
> When I run the workbench example application I doesn't run well
> on Konqueror 3.1 or Mozilla 1.3 on Linux. The Display Request
> Debug Information produces a lot of blank fields on both
> browsers. The DatePicker displays very bad in Konqueror (works
> well on Mozilla). The worst part is the Palette section, which
> does not work at all.
> I am using Tapestry beta 1a on Tomcat4.1.24 on Suse Linux 8.1.
> 
> On MS Internet Explorer (do not remember the version, sorry)
> everything works better, but the Palette still does not work
> completely well (at least it allows you to move elements from
> the Available section to the Selected section).
> 
> I was planning to develop a simple Web mail application using
> Tapestry, but seeing how unusable its output is on Linux I think
> I will have to use another toolkit.
Well, you can help us to improve html generation on Linux browsers.

> It's a shame because I really like the Tapestry approach to web
> applications.
> 
> I have two other questions:
> 1. Is it possible to restrict access to some pages in an a
> Tapestry application based on a security policy? or does
> everyone who has access to the application have access to all
> the pages in the application?
Do you mean JAAS?

> 2. Is it possible to create applications that produce WML (for
> WAP phones) or HTML (for ordinary browsers) automatically based
> on some criteria (e.g. request header fields)?
> 
It is possible to have applications which have pages with different
content (html, wml, xml, etc.). In addition there is a property at
application or page level to indicate the template extension.

> Regards,
> Vegeta
> 
> PS: sorry for my bad english
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org