[jira] Commented: (MYFACES-2858) pointless oamsubmit inline rendering

2010-08-04 Thread Jan-Kees van Andel (JIRA)

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

Jan-Kees van Andel commented on MYFACES-2858:
-

No opinion regarding externalizing the scripts. I think it's a good idea.

What I did notice a while ago, was that those scripts are very annoying when 
doing AJAX. I didn't look at it in detail, but it looked like they messed up 
the event handling.

> pointless oamsubmit inline rendering
> 
>
> Key: MYFACES-2858
> URL: https://issues.apache.org/jira/browse/MYFACES-2858
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.2-SNAPSHOT
>Reporter: Werner Punz
>
> 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.



[jira] Commented: (MYFACES-2858) pointless oamsubmit inline rendering

2010-08-04 Thread Werner Punz (JIRA)

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

Werner Punz commented on MYFACES-2858:
--

I have isolated most of the scripts, from what I can see is there is no direct 
event handling messed up, but what could be is that the autoscroll feature does 
something in that case, do you have a bugreport on the issue?
But there is one section from what I can gather which never worked, that was 
that one
 //this never worked in our code because version never was defined, I will drop 
it for now, since no one uses
//it anyway
//if (agentString.indexOf('msie') != -1) {
//if (!(agentString.indexOf('ppc') != -1 && 
agentString.indexOf('windows ce') != -1 && version >= 4.0) && window.external 
&& window.external.AutoCompleteSaveForm) {
//window.external.AutoCompleteSaveForm(form);
//}
//}

(I commented that out) it sort of was a special context param which when 
enabled triggered autosave in older ie versions on input params, probably 
absolutely no one has used it, otherwise they would have stepped on following 
error:

gentString.indexOf('windows ce') != -1 && version >= 4.0)

the version var never was defined and probably would have caused an error. But 
the good thing is this code only was activated via a context param.

Nevertheless externalizing all this should be prio #1 it reduces the page size 
by about 8kbyte on every request!!! and also makes the code more maintainable.



> pointless oamsubmit inline rendering
> 
>
> Key: MYFACES-2858
> URL: https://issues.apache.org/jira/browse/MYFACES-2858
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.2-SNAPSHOT
>Reporter: Werner Punz
>
> 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.



[jira] Commented: (MYFACES-2858) pointless oamsubmit inline rendering

2010-08-04 Thread Werner Punz (JIRA)

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

Werner Punz commented on MYFACES-2858:
--

Ok I just ran a test since I got the first basics working, the actual savings 
is 2-3 kbyte per page, which is not too shabby I guess.


> pointless oamsubmit inline rendering
> 
>
> Key: MYFACES-2858
> URL: https://issues.apache.org/jira/browse/MYFACES-2858
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.2-SNAPSHOT
>Reporter: Werner Punz
>
> 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.



[jira] Commented: (MYFACES-2858) pointless oamsubmit inline rendering

2010-08-04 Thread Jan-Kees van Andel (JIRA)

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

Jan-Kees van Andel commented on MYFACES-2858:
-

Never mind. I'll report my thingy in a separate issue. It's not related to your 
externalization.

Sorry for the unclear comment. :-)

> pointless oamsubmit inline rendering
> 
>
> Key: MYFACES-2858
> URL: https://issues.apache.org/jira/browse/MYFACES-2858
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.2-SNAPSHOT
>Reporter: Werner Punz
>
> 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.



[jira] Commented: (MYFACES-2858) pointless oamsubmit inline rendering

2010-08-04 Thread Werner Punz (JIRA)

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

Werner Punz commented on MYFACES-2858:
--

Ok the isolation so far works here, but I also want a compressed uncompressed 
version like we have for jsf.js, it is a 60% filesize difference between 
those two.
The second issue is, I have the same problem as with jsf.js if inline rendered 
already and included in a ppr case we do not habe any suppression
on the server side hence the script gets aloaded anew in auto eval cases 
(mozilla)


> pointless oamsubmit inline rendering
> 
>
> Key: MYFACES-2858
> URL: https://issues.apache.org/jira/browse/MYFACES-2858
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.0.2-SNAPSHOT
>Reporter: Werner Punz
>
> 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.



[jira] Commented: (MYFACES-2858) pointless oamsubmit inline rendering (patch available)

2010-08-16 Thread Leonardo Uribe (JIRA)

[ 
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 
.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){
 .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.



[jira] Commented: (MYFACES-2858) pointless oamsubmit inline rendering (patch available)

2010-08-17 Thread Jakob Korherr (JIRA)

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

Jakob Korherr commented on MYFACES-2858:


Acutally that's not true. It first was on api (in Werner's patch) and I moved 
it to impl, because it is an implementation detail.

However you're right. I did not think about using tomahawk standalone with 
Mojarra. This will currently not work. Thus putting it on shared may solve the 
problem, but I have to try this first.

If you put them on jsf.js, the scenario tomahawk + mojarra also won't work. I 
will try some scenarios and provide a patch afterwards!

> 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.



[jira] Commented: (MYFACES-2858) pointless oamsubmit inline rendering (patch available)

2010-08-17 Thread Jakob Korherr (JIRA)

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

Jakob Korherr commented on MYFACES-2858:


As with MYFACESTEST-24, we can remove the setUpFactories() workaround for the 
PartialViewContextFactory. I will also do a snapshot deploy of MyFaces test to 
verify that this is updated in the repo too and that no-one has build problems 
because of that.

> 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
>Assignee: Jakob Korherr
> 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.