Hi Mamallan > Mechanism behind JavaScript free fallback: > The primary purpose of the JavaScript in the client-side is to assign > values to parameters like source, event, etc. > > 1) During fallback rendering, we encode all these parameters and their > values to the name attribute of a component. Example, for commandButton, > we render: > <input type = "submit" name = "source<<encodingkey>><<sourcevalue>>" /> > All components that are intended to submit a page are rendered as input > element of type 'submit' and their name attributes are encoded with > parameters and their values. Also, we render a hidden parameter > '_noJavaScript' during form rendering to indicate that parameters are > encoded. > > 2) During page submission, the submitting component's name attribute > which contains the encoded parameters will be returned to the server. In > the Trinidad filter, we check for the hidden parameter '_noJavaScript', > if true, we wrap the incoming httpRequest with a wrapper that decoded > these parameters from the name attribute. The wrapper adds these decoded > parameters (source, event) to the parameterMap. > > Wrapper Class: > org.apache.myfaces.trinidadinternal.webapp.wrappers.BasicHTMLBrowserRequestWrapper > > Example, a page has two commandButtons, whose source parameters are > 'commandButton1' and 'commandButton2' respectively. These commandButtons > will be rendered as below: > <input type = "submit" name = "source_parameterkeycommandButton1" /> > <input type = "submit" name = "source_parameterkeycommandButton2" /> > > if the page is submitted by commandButton2, the payload will contain > 'source_parameterkeycommandButton2'. Hence, the wrapper can decoded the > source parameter value to be 'commandButton2'
This is exactly what we are doing here in cs-JSF as well. Funny that we arived at the same solution ;). Yes, anyways - I would want to have the javascript fallback to be enabled when there is no javascript, and not only if we are on mobile browsers. best regards, Martin