<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Max Rydahl Andersen wrote:
<blockquote cite="mid:op.t76aqdp8w1tq5a@reddevil.dns.smartcity.com"
 type="cite">
  <blockquote type="cite">
    <pre wrap="">Yes, It's possible.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
ok, so but wouldn't it make more sense to add it as a seperate tag instead of string based function embedded into an attribute of vpe:if ?

-max

  </pre>
</blockquote>
By my opinion no, because in VPE already exists some examples of using
vpe:if for testing various conditions, for examples:<br>
Example 1:<br>
    &lt;vpe:tag name="h:graphicImage" case-sensitive="yes"&gt;<br>
            &lt;vpe:if test="attrpresent('value')"&gt;<br>
Example 2:<br>
    &lt;vpe:if test="(@disabled='true')"&gt;<br>
            &lt;vpe:template children="yes" modify="yes"&gt;<br>
Examples 3:<br>
        &lt;vpe:if test="@disabled='on'"&gt;<br>
            &lt;vpe:template children="no" modify="no"&gt;<br>
Example 4:<br>
    &lt;vpe:tag name="img" case-sensitive="no"&gt;<br>
        &lt;!-- in this case the tag is a facelets's tag --&gt;<br>
        &lt;vpe:if test="attrpresent('jsfc')" &gt;<br>
            &lt;vpe:template children="no" modify="no"&gt;<br>
But  I haven't founded not  one tag  which  used for filter
functionality, except vpe:if, so I think it better to use vpe:if for
filtering templates using various <br>
functions like tld_version, attrpresent and others.
<blockquote cite="mid:op.t76aqdp8w1tq5a@reddevil.dns.smartcity.com"
 type="cite">
  <pre wrap=""></pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">In VPE was added support for taglib versions
see(<a class="moz-txt-link-freetext" href="http://jira.jboss.com/jira/browse/JBIDE-1466">http://jira.jboss.com/jira/browse/JBIDE-1466</a>).
Checks for versions was resolved in
org.jboss.tools.vpe.editor.template.expression.VpeFunctionTldVersionCheck
class.
Here some examples how it's can be used in template configuration file:
Example 1:
     &lt;vpe:tag name="f:testTldVersion" case-sensitive="yes"&gt;
         &lt;vpe:if test="tld_version('min=0.0 max=1.2')" &gt;
         &lt;vpe:template children="yes" modify="yes"&gt;
             &lt;div  style="background-color:red"&gt;
             Tld Check function
             &lt;/div&gt;
         &lt;/vpe:template&gt;
         &lt;/vpe:if&gt;
     &lt;/vpe:tag&gt;
 Example 2:
     &lt;vpe:tag name="f:testTldVersion" case-sensitive="yes"&gt;
         &lt;vpe:if test="tld_version('min=0.0')" &gt;
         &lt;vpe:template children="yes" modify="yes"&gt;
             &lt;div  style="background-color:red"&gt;
             Tld Check function
             &lt;/div&gt;
         &lt;/vpe:template&gt;
        &lt;/vpe:if&gt;
    &lt;/vpe:tag&gt;
 Example 3:
 &lt;vpe:tag name="f:testTldVersion" case-sensitive="yes"&gt;
         &lt;vpe:if test="tld_version('max=1.2')" &gt;
         &lt;vpe:template children="yes" modify="yes"&gt;
             &lt;div  style="background-color:red"&gt;
             Tld Check function
             &lt;/div&gt;
         &lt;/vpe:template&gt;
         &lt;/vpe:if&gt;
    &lt;/vpe:tag&gt;
Function tld_version() checks for taglib version in projects, here can
be 2 parametrs:
1) 'min' -  minimal taglib  version
2) 'max' - maximal taglib version
In function can' be specified only one paramter 'min'  or 'max'.
_______________________________________________
jbosstools-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jbosstools-dev@lists.jboss.org">jbosstools-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a>


        </pre>
      </blockquote>
      <pre wrap="">


      </pre>
    </blockquote>
    <pre wrap="">
    </pre>
  </blockquote>
  <pre wrap=""><!---->


  </pre>
</blockquote>
<br>
</body>
</html>