Hi, I have something like
<f:verbatim>
<script language='text/javascript'
src='<%=request.getContextPath()%>/path/to/your/script.js'/>
</f:verbatim>
or
<link rel="stylesheet" type="text/css"
href="<%=request.getContextPath()%>/myfaces.css" />
For localized javascript popup messages I have for example
<t:commandButton value="Message" onclick="alert('#{bundle.theMessage}');"/>
Hope this helps you,
I've no idea about other solutions...
Regards
Hans
Thomas Gaudin wrote:
Hi,
I must be missing something obvious but I am stuck with this...
Is there a myFaces tag equivalent to <afh:script> in ADF faces?
I don't understand how to include a javascript file without hardcoding
the context path :
I have a js script file in /scripts/myscript.js, how to include it so
as it works if the application is deployed in the root context ("/")
or in another context ("/mycontext/) ?
Also, anybody knows how to localize a message displayed in a alert()
javascript popup?
Thanks,
Thomas