-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello, i am wondering if there is a way to pass values (like using el expressions for example) to element inside <head>?
From zul, you can use a header processing instruction: https://www.zkoss.org/wiki/ZUMLReference/ZUML/ProcessingInstructions
You can use these to generate usual <head> elements such as scripts, style, meta tags.
If you need to have finer control over the element, you can use the PageCtrl (cast page as PageCtrl to access this interface) and use addAfterheadTags: https://www.zkoss.org/javadoc/8.0.0/zk/org/zkoss/zk/ui/sys/PageCtrl.html#addAfterHeadTags(java.lang.String)) This lets you generate arbitrary HTML content after the default ZK head elements.
Most use cases don't need to go that specific though. If you need meta, script or style tags, processing instructions will do just fine, and support EL expressions.
Asked: 2022-02-01 19:57:23 +0800
Seen: 8 times
Last updated: Feb 02 '22