[
https://issues.apache.org/jira/browse/MYFACES-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18056588#comment-18056588
]
Werner Punz commented on MYFACES-4737:
--------------------------------------
the namespace issue is a problem in the renderer, I guess the main namespace
defintely should work, I do not see any reason why a . should prevent things,
however the renderer needs to adapt to reserve the namespace, so I guess change
is really needed!
the main namespace definitely always should work and if not we have a bug on
our plate)
namespace xxx.yyy
namespace reservation goes like this window.xxx = window.xxx || {};
window.xxx.yyy = window.xxx.yyy || {};
This is code the renderer definitely does not have yet! I assume Mojarra has
the same issue!
Workaround, you can prereserve the namespace up until the xxx level then you
can use it for xxx.yyy the renderer (have yet to look into the code) will then
pass it through!
Also question, namespace reservation should this be part of the commandscript
renderer at all? I am 50/50 on this, it probably wont hurt to add it!
> h:commandScript can't make a function in a namespace.
> -----------------------------------------------------
>
> Key: MYFACES-4737
> URL: https://issues.apache.org/jira/browse/MYFACES-4737
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 4.0.3
> Environment: macOS Tahoe 26.1, Apache Tomee web 10.1.2, Apache
> NetBeans 28, Temurin JDK build 21.0.8+9-LTS
> Reporter: Johan Borchers
> Assignee: Werner Punz
> Priority: Minor
> Attachments: image-2025-12-17-13-39-25-303.png,
> image-2025-12-17-13-42-23-466.png, image-2025-12-17-13-46-31-788.png,
> image-2025-12-29-13-07-53-716.png
>
>
> The h:commandScript can't make a function in a namespace.
> When I want my functions to go into a predefined JS namespace (object) then
> it places the function in the global JS namespace with a name of the
> [namespace][escape sequence for the dot][name of the function]
> With Mojarra this is working.
> !image-2025-12-17-13-39-25-303.png|width=586,height=586!
> The functions go into the global namespace with MyFaces.
> !image-2025-12-17-13-42-23-466.png|width=356,height=164!
>
> With Mojarra the functions go into the namespace.
> !image-2025-12-17-13-46-31-788.png|width=305,height=143!
> I hope that MyFaces will also support the placing in namespaces.
> Because we are using Open Liberty server side.
> The example with the namespace is from the book :
> The Definitive Guide to Jakarta Faces in Jakarta EE 10
> Bauke Scholtz
> Arjan Tijms
--
This message was sent by Atlassian Jira
(v8.20.10#820010)