[ 
https://issues.apache.org/jira/browse/MYFACES-2858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899278#action_12899278
 ] 

Leonardo Uribe commented on MYFACES-2858:
-----------------------------------------

Note that on myfaces core there are two copies of oamSubmit.js: one on api and 
the other one on impl.

The functions on oamSubmit.js:

function oamSetHiddenInput(formname, name, value)
function oamClearHiddenInput(formname, name, value)
function oamSubmitForm(formName, linkId, target, params)

Shouldn't we just put them on jsf.js, but change its names to something like 
<someothernamespace>.oamSetHiddenInput ? In theory, those methods are myfaces 
specific. If by some reason someone needs them defined, why don't just put a 
resource with the functions calling the ones with namespace like this:

function oamSetHiddenInput(formname, name, value){
     <someothernamespace>.oamSetHiddenInput(formname, name, value)
}

Or why don't create a variable that allows choose between render it inline or 
use the namespaced functions (default one)? 

> pointless oamsubmit inline rendering (patch available)
> ------------------------------------------------------
>
>                 Key: MYFACES-2858
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2858
>             Project: MyFaces Core
>          Issue Type: Improvement
>    Affects Versions: 2.0.2-SNAPSHOT
>            Reporter: Werner Punz
>             Fix For: 2.0.2-SNAPSHOT
>
>         Attachments: 
> https___issues_apache_org_jira_browse_MYFACES-2858_externalizing_oamsubmit__.patch
>
>
> We have had several functions rendered inline for ages, namely 
> appendHiddenInput oamSubmit, the autoscroll stuff etc...
> I personally think the rendering of those functions as inline scripts is 
> pointless, blows up the browsers tremendously and
> prevents that the affected scripts can be browser cached.
> A quick look at the code revealed that there is basically nothing which would 
> prevent to externalize the scripts. My main problem is where to we handle the 
> auto append code.
> My personal guess is we probably simply should add it as a resource 
> definitions to the commandLink, Button etc.. renderers, any ideas regarding 
> this?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to