(m1) jelly swing frame doesn't show?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

(m1) jelly swing frame doesn't show?

Harrison.Curtis
I have a couple questions with regard to using jelly:swing in a maven.xml.
I'm trying to bring up a GUI (Frame) to report missing required properties.
Embedded in the goal that is processing the properties is the following:

  <goal name=....
      .
      .
      .
     <j:if test="${size(missingProps) gt 0}">
        <s:frame var="frame" size="400,150" location="200,200"
title="Missing Properties">
           <s:panel>
              <s:titledBorder title="Missing Required Properties"/>
              <s:tableLayout>
                 <j:forEach var="prop" items="${missingProps}">
                    <echo>Missing Required Property: ${prop}</echo>
                    <s:tr>
                       <s:td>
                          <s:label text="Property:"/>
                       </s:td>
                       <s:td>
                          <s:textField var="${prop}"/>
                       </s:td>
                    </s:tr>
                 </j:forEach>
              </s:tableLayout>
           </s:panel>
           <s:panel>
              <s:button>
                 <s:action name="Exit">
                    <echo>selected to shut down process due to missing
properties</echo>
                    <ant:fail>Shutdown build - Required properties
missing</ant:fail>
                 </s:action>
              </s:button>
           </s:panel>
           <windowListener var="event" closing="${onClosing}" />
        </s:frame>
        ${frame.setVisible(true)}
        ${frame.show()}
        <ant:fail>Shutdown build - ${size(missingProps)} required properties
missing</ant:fail>
     </j:if>
      .
      .
      .
  </goal>

I know I go through the frame and panel setup, but the Frame never shows.
Can I do this within a goal; expecting Maven to pause until the GUI is
closed?  I noticed that all the Jelly:Swing tests spawn off a separate java
process as shown below, is this what I need to do?

  <goal name="demo:swing" prereqs="create-classpath"
    description="Runs a sample Swing demo, creating a Swing UI from Jelly
script">
    <java classname="org.apache.commons.jelly.Jelly" fork="yes">
      <classpath refid="test.classpath"/>
      <arg value="src/test/org/apache/commons/jelly/swing/example.jelly"/>
    </java>
  </goal>

Thank you for your help,
Bud Curtis

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]