You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Robert Handschmann <rh...@yahoo.de> on 2006/04/21 18:23:52 UTC
links not working when ALLOW_JAVASCRIPT is false
Hi!
I have to switch off javascript to keep pages as small as possible. (For a page with lots of table cells with links this makes a big difference.)
But when I set org.apache.myfaces.ALLOW_JAVASCRIPT to false in web.xml, some links are not working anymore.
I have a t:dataTable with a t:commandSortHeader. When I click on a column, the page reloads, but no sorting takes place. The same page is working when javascript is allowed.
The same for t:dataScroller.
Is this a general restriction of MyFaces or a bug?
I tried with myfaces-1.1.1 and with myfaces-core-1.1.2 together with tomahawk-1.1.2-SNAPSHOT. Both versions show the same behaviour.
Any ideas?
Thanks,
Robert
Re: AW: links not working when ALLOW_JAVASCRIPT is false
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Robert!
> I do not want to omit javascript entirely, but I saw that I can reduce the size of the rendered html document significantly. I need that for only a singe page!
>
I already started to shrink the size of the generated javascript, but
the patch didnt fit any more so I have to start over again :-(
What I would like to say is, that - once I find time again - the size
will be reduced, though, I dont know how much in the end.
Ciao,
Mario
AW: AW: links not working when ALLOW_JAVASCRIPT is false
Posted by Robert Handschmann <rh...@yahoo.de>.
What I want to add is that I thought MyFaces overcomes the general JSF restriction by using url parameters as one can see in the following comment:
<context-param>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
<description>
This parameter tells MyFaces if javascript code should be allowed in the rendered HTML
output. If javascript is allowed, command_link anchors will have javascript code that
submits the corresponding form. If javascript is not allowed, the state saving info and
nested parameters will be added as url parameters. Default: "true"
</description>
</context-param>
So, when some links are working and some are not, isn't it a bug?
Greetings,
Robert
----- Ursprüngliche Mail ----
Von: Robert Handschmann <rh...@yahoo.de>
An: MyFaces Discussion <us...@myfaces.apache.org>
Gesendet: Freitag, den 21. April 2006, 19:25:06 Uhr
Betreff: AW: links not working when ALLOW_JAVASCRIPT is false
Thanks, for your quick reply!
I do not want to omit javascript entirely, but I saw that I can reduce the size of the rendered html document significantly. I need that for only a singe page!
Is it possible to turn off javascript for one page only, or is there another trick I can use? (Of course beside telling the customer to change requirements ;-)
I tried to implement this page with JSTL, but could not figure out how to call JSF action methods from links.
Thanks,
Robert
----- Ursprüngliche Mail ----
Von: Werner Punz <we...@gmx.at>
An: users@myfaces.apache.org
Gesendet: Freitag, den 21. April 2006, 18:41:00 Uhr
Betreff: Re: links not working when ALLOW_JAVASCRIPT is false
Robert Handschmann schrieb:
> Hi!
> I have to switch off javascript to keep pages as small as possible. (For a page with lots of table cells with links this makes a big difference.)
> But when I set org.apache.myfaces.ALLOW_JAVASCRIPT to false in web.xml, some links are not working anymore.
> I have a t:dataTable with a t:commandSortHeader. When I click on a column, the page reloads, but no sorting takes place. The same page is working when javascript is allowed.
> The same for t:dataScroller.
>
> Is this a general restriction of MyFaces or a bug?
>
A general JSF restriction, once a component has to rely on a command
link or a command link is set for form handling you only can trigger
the form submit via javascript then :-(
All I can say is if you have to omit javascript entirely, you will have
a hard time with jsf, especially if you need advanced components.
AW: links not working when ALLOW_JAVASCRIPT is false
Posted by Robert Handschmann <rh...@yahoo.de>.
Thanks, for your quick reply!
I do not want to omit javascript entirely, but I saw that I can reduce the size of the rendered html document significantly. I need that for only a singe page!
Is it possible to turn off javascript for one page only, or is there another trick I can use? (Of course beside telling the customer to change requirements ;-)
I tried to implement this page with JSTL, but could not figure out how to call JSF action methods from links.
Thanks,
Robert
----- Ursprüngliche Mail ----
Von: Werner Punz <we...@gmx.at>
An: users@myfaces.apache.org
Gesendet: Freitag, den 21. April 2006, 18:41:00 Uhr
Betreff: Re: links not working when ALLOW_JAVASCRIPT is false
Robert Handschmann schrieb:
> Hi!
> I have to switch off javascript to keep pages as small as possible. (For a page with lots of table cells with links this makes a big difference.)
> But when I set org.apache.myfaces.ALLOW_JAVASCRIPT to false in web.xml, some links are not working anymore.
> I have a t:dataTable with a t:commandSortHeader. When I click on a column, the page reloads, but no sorting takes place. The same page is working when javascript is allowed.
> The same for t:dataScroller.
>
> Is this a general restriction of MyFaces or a bug?
>
A general JSF restriction, once a component has to rely on a command
link or a command link is set for form handling you only can trigger
the form submit via javascript then :-(
All I can say is if you have to omit javascript entirely, you will have
a hard time with jsf, especially if you need advanced components.
Re: links not working when ALLOW_JAVASCRIPT is false
Posted by Werner Punz <we...@gmx.at>.
Robert Handschmann schrieb:
> Hi!
> I have to switch off javascript to keep pages as small as possible. (For a page with lots of table cells with links this makes a big difference.)
> But when I set org.apache.myfaces.ALLOW_JAVASCRIPT to false in web.xml, some links are not working anymore.
> I have a t:dataTable with a t:commandSortHeader. When I click on a column, the page reloads, but no sorting takes place. The same page is working when javascript is allowed.
> The same for t:dataScroller.
>
> Is this a general restriction of MyFaces or a bug?
>
A general JSF restriction, once a component has to rely on a command
link or a command link is set for form handling you only can trigger
the form submit via javascript then :-(
All I can say is if you have to omit javascript entirely, you will have
a hard time with jsf, especially if you need advanced components.
Re: links not working when ALLOW_JAVASCRIPT is false
Posted by Werner Punz <we...@gmx.at>.
Mike Kienenberger schrieb:
> On 4/21/06, Robert Handschmann <rh...@yahoo.de> wrote:
>> Is this a general restriction of MyFaces or a bug?
>
> It's a restriction of JSF's CommandLink. The spec requires
> javascript for it to work.
> (Basically, clicking on a link has to submit a form -- this is
> accomplished with javascript).
>
Actually it is even more a limitation of html that you cannot really
do a form submit from a link without javascript, and command buttons
do not work on many old browsers.
Re: links not working when ALLOW_JAVASCRIPT is false
Posted by Mike Kienenberger <mk...@gmail.com>.
On 4/21/06, Robert Handschmann <rh...@yahoo.de> wrote:
> Is this a general restriction of MyFaces or a bug?
It's a restriction of JSF's CommandLink. The spec requires
javascript for it to work.
(Basically, clicking on a link has to submit a form -- this is
accomplished with javascript).