Replacing all commandLinks with commandButtons seems the best solution
to me. After all, if you were using some other tech like CGI or PHP or
whatever you still couldn't submit a form using an <a> tag without
javascript. It's just not possible with HTML.
The h:commandLink tag is really an optional feature over and above
normal html, which is why javascript is needed to implement it on the
client side.
Note that this only applies where the link *submits a form*. Ordinary
links can be output using h:outputLink - but they won't submit the form.
lightbulb432 wrote:
I see, so what do developers of JSF applications generally do - replace all
commandLinks with commandButtons, or only users with JavaScript enabled to
access their site? What strategy do some of you use with regards to users
out there who don't enable JavaScript (which isn't as small a number as I
would've thought)
craigmcc wrote:
On 12/21/06, lightbulb432 <[EMAIL PROTECTED]> wrote:
Why does JSF always use JavaScript to submit a form rather than through
the
regular method of form submission?
That only happens for a commandLink component (i.e. a hyperlink that is to
submit a form). If you use a commandButton component, no JavaScript is
needed.
Is your entire JSF web application useless for clients that have
JavaScript
turned off?
Only for hyperlinks. If you can describe a way to have a hyperlink submit
a
form, without Javascript being enabled, we would love to hear it.
Craig