![]() ![]() Wrapper so that they are available to the rest of the lifecycle just What we do is we encode params into theīutton-value, and decode these params in a request-parameter map Or perhaps we could use an HTML element and encode the parameters into the button's value attribute? I believe that Spring Faces has solved this problem (Jeremy - can you comment)? Does cs-JSF deal with this? Any other frameworks provide solutions for this?Ĭs-JSF deals with this. The drawback of course is that the hidden fields will be submitted with every postback, not just when the corresponding button is clicked. I suppose that the link/button renderer could spit parameter values out as hidden fields instead of using JavaScript to include these values in the form dynamically. > For example, if we had a way for the 's renderer to determine that JavaScript is disabled, then the renderer could fall back to rendering an HTML instead of a link with an onclick handler. > - Components that care need to render alternate content when JavaScript is disabled. > - We need some way to detect when JavaScript is disabled. > Leaving Ajax/Behaviors aside for a moment - how would we go about solving more basic cases such as supporting when JavaScript is disabled? The solution requires two pieces: So we've got a more fundamental problem here. Note that this is not in any way specific to Ajax or Behaviors, or even JSF 2.0. > Both of these cases currently require JavaScript execution for form submission purposes. However, there are at least two cases where we do not have a solution: So we've got a little graceful degradation happening already. When Ajax is disabled, the will still submit - it just an HTML after all - and any registered action listeners will be called. ![]() > Actually, this is exactly the fallback behavior that we have in the trivial example shown above. So what fallback behavior do we want when we are using Ajax to send an action event to the server in response to a click on a command component? The correct answer here is clear: when JavaScript is disabled, the command component should still deliver the action event, but via traditional form submission instead of over Ajax. So, think we are okay for this particular case - I don't see the need to do anything here. such applications should not rely on these user interface events as the only means to access mission critical functionality. > Application developers who need to build applications that run with JavaScript disabled should only leverage such events for progressive enhancement purposes - ie. My feeling is that for these cases, the correct fallback behavior is to do nothing. What is the correct fallback behavior for client behaviors/scripts that are invoked in response to user interface events such mouseOver/mouseOut, or say, focus/blur? I don't believe that there is any meaningful fallback content that we can provide here - a "Refresh" button isn't appropriate. > Case #3 is the simplest, so let's look at it first. Ajax-based events that other than #1 and #2, eg: Editable value holders firing Ajax-based valueChange events, eg: Command components firing Ajax-based action events, eg: > There are at least 3 different cases to consider: ![]() > - In the presentation about JSF 2.0 features, there was a question from the audience what happens with AJAX support when JavaScript is disabled. Thanks for your very long and extensive mail - you covered everything. Next message: JavaScript disabled support.Previous message: Open Community Feedback List?.JavaScript disabled support Martin Marinschek mmarinschek at APACHE.ORG ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |