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

Werner Punz commented on MYFACES-2714:
--------------------------------------

No Objections from my side, but I would prefer an even better solution, since 
we are highly modular we could use
the included xhr load functinality to load the scripts in dev mode one by one.

The function which could be used theoretically would be 
myfaces._impl.core._Runtime.loadScript = function(src, type, defer, charSet):

That however means that the myfaces._impl.core._Runtime must be loaded upfrond 
and then a series
of myfaces._impl.core._Runtime.loadScript must be issued like following

myfaces._impl.core._Runtime.loadScript("./myfaces/_util/_Lang.js", 
"text/javascript", false, "utf-8");
myfaces._impl.core._Runtime.loadScript("./myfaces/_util/_Dom.js", 
"text/javascript", false, "utf-8");

Not sure how the correct syntax for jsf resource requests is in that case

So in the end a debug build just has to include the core and a loader file 
which issues the loadScript commands 
on the fly.

That way we would not have a full single huge file which is hard to debug, but 
instead single files loaded dynamically.

The other way would be to render the jsf.js files one by one in dev mode as 
separate includes.
I would prefer a multi file include solution for dev purposes over the single 
file one, because it is easier to debug that way.

Mojarra just includes one file because they are not modular (which if the 
codebase in this area grows will become a maintenance nightmare),
since we do not have this nightmare why not be more modular in our includes as 
well?


> Include uncompressed jsf.js file and use it when development mode is used
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-2714
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2714
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>    Affects Versions: 2.0.0
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-2714-2.patch
>
>
> Reading some blogs about jsf 2.0, I notice mojarra include an uncompressed 
> jsf.js file and use it when development mode is used. It is difficult to 
> debug myfaces javascript for users and I think it is worth to do it too.

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