Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » JET Best way to escape standard Jet tags
JET Best way to escape standard Jet tags [message #507217] Tue, 12 January 2010 14:34 Go to next message
Adrian Missing name is currently offline Adrian Missing nameFriend
Messages: 5
Registered: July 2009
Junior Member
Hello,

I need to output a JSP file (with JSTL).

c:if is a standard JET tag, but also a standard JET tag.

What is the best way of escaping the c:if tag in JET ?

I'm using the JET directive to alias the c prefix to cc, and it works ( http://help.eclipse.org/help32/topic/org.eclipse.jet.doc/ref erences/syntax/jetSyntaxDirectives.xhtml) :
Quote:
<%@taglib id="org.eclipse.jet.controlTags" prefix="cc"%>


Is there another and better way ?

Sample (in this samlpe c:if must be a generated JSTL tag and must not be executed by the JET engine) :
Quote:
<%@taglib id="org.eclipse.jet.workspaceTags" prefix="ws"%>
<%@taglib id="org.eclipse.jet.controlTags" prefix="cc"%>
<%@jet imports="org.eclipse.emf.ecore.EObject com.natixis.sphinx.ide.eclipse.codegen.emf.* com.natixis.sphinx.ide.eclipse.codegen.util.* com.natixis.sphinx.ide.eclipse.codegen.model.*"%>
<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jstl/core"
version="2.0">
<c:if test="${debugEnabled}">
some HTML
</c:if>
</jsp:root>


Thanks for your input
Re: JET Best way to escape standard Jet tags [message #507254 is a reply to message #507217] Tue, 12 January 2010 16:15 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Adrian:

Unfortunately, there is no alternative to defining a different tag
library prefix via the <%@taglib%> directive.

Paul
Previous Topic:[XPAND] Need for formatting commands?
Next Topic:JMerger Example and Standalone Use
Goto Forum:
  


Current Time: Sun Oct 06 20:55:29 GMT 2024

Powered by FUDForum. Page generated in 0.02486 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top