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 <[EMAIL PROTECTED]>
An: MyFaces Discussion <[email protected]>
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 <[EMAIL PROTECTED]>
An: [email protected]
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.







Reply via email to