commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Nabbefeld <Peter.Nabbef...@gmx.de>
Subject Re: [jelly] Expression/Test syntax
Date Sun, 04 Jul 2004 17:50:15 GMT
Dion Gillard schrieb:

>Try:
>
><core:if test="${var != null}">
></core:if>
>
>  
>
Thank You for Your answer, but it doesn't work. In the following 
fragment I've changed 'org.jdesktop.jdic.desktop.Desktop' to 
'org.jdesktop.jdic.desktop.Desktoppo', and that should give me the error 
message - but it leads me to 'otherwise' and states, that this is just a 
simple test.

    <j:catch var="help.browser.exception">
      <j:new var="help.browser.url" className="java.net.URL">
        <j:arg type="java.lang.String" 
value="http://www.example.com/index.html"/>
      </j:new>
      <j:invokeStatic className="org.jdesktop.jdic.desktop.Desktoppo" 
method="browse">
        <j:arg type="java.net.URL" value="${help.browser.url}"/>
      </j:invokeStatic>
    </j:catch>
    <j:choose>
      <j:when test="${help.browser.exception != null}">
        <j:invokeStatic className="javax.swing.JOptionPane" 
method="showMessageDialog">
          <j:arg type="java.awt.Component"/>
          <j:set var="help.browser.error.message.1" 
encode="false"><![CDATA[<html>A problem occured while starting the 
browser.<br>Possible cause: jdic package not installed.<br>see: 
https://jdic.dev.java.net/<br>]]></j:set>
          <j:set var="help.browser.error.message.2" 
encode="false"><![CDATA[</html>]]></j:set>
          <j:arg type="java.lang.Object" 
value="${help.browser.error.message.1} --${help.browser.exception}-- 
${help.browser.error.message.2}"/>
        </j:invokeStatic>
      </j:when>
      <j:otherwise>
        <j:invokeStatic className="javax.swing.JOptionPane" 
method="showMessageDialog">
          <j:arg type="java.awt.Component"/>
          <j:set var="help.browser.test.message" 
encode="false"><![CDATA[<html>This is just a <i>simple</i> 
test.</html>]]></j:set>
          <j:arg type="java.lang.Object" 
value="${help.browser.test.message} ${help.browser.exception}"/>
        </j:invokeStatic>
      </j:otherwise>
    </j:choose>

Any idea?

Kind regards

Peter Nabbefeld

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message