Results 1 to 12 of 12
  1. #1
    parag_patil is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default Generate Applet from XML file

    Hi,

    I want to generate applet from the xml file. XML file will contain the field type and its validation, which will be parsed while loading the applet and accordingly the applet will be generated.
    Anybody have any idea of framework that does this.For your reference I have specified the xml sample which is parsed to generate applet.

    <applet name="ABC">
    <Field1 type="dropdown" required="1" readonly="0" options="Array" defaultvalue="">
    <label> Option Type
    <option name="Val1">Val1</option>
    <option name="Val2">Val2</option>
    </label>
    </Field1>

    <Field2 type="dropdown" required="1" readonly="0" options="Array" defaultvalue="">
    <label> Field2
    <option name="Val1">Val1</option>
    <option name="Val2">Val2</option>
    </label>
    </Field2>

    <Field3 type="text" maxlength="15" validate="Int" required="1" readonly="0" size="15" >
    <label>Field3</label>
    </Field3>

    <ExpiryDate type="date" required="1" readonly="0" showtime="0" defaultvalue_sel="today" defaultvalue="today" size="15">
    <label>Expiry Date</label>
    </ExpiryDate>


    </applet>

    So above xml file will be parsed and the desired applet should be genrated.

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    I have used the SwiXML library in the past for creating XML designed Swing UI components. such as a dialog box, where I wanted its look and behavior to be entirely data driven. I remember at the time the swixml being very easy to extend, such as to add custom tags for things that I wanted to be displayed that it at the time did not support. So it should be possible to build an applet. You might need to create a wrapper stub applet class though that boots up as an an applet and then url fetches the XML file. e.g. it might be more practical to create a generic player kind of applet, where your XML driven UI generates a Panel that is the main content and function of this applet.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    This topic is a new one for me. Last night I saw this and search on Google and I found this. travishein, have you seen that before?

  4. #4
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    No, I hadn't seen that. looks neat. Thanks!

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  6. #6
    parag_patil is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default SWIXML rocks

    Hi,

    Thanks for letting me know about swixml. I think xul has some issues with IE and chrome, moreover the XForms do not run on Internet explorer. Initially I thought to go with XUL but as I said it has lots of issues as far as browser compatibility is concerned. Thats what I think. Anyway, thanks for the help.

    Regards

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    I'm not sure about the chrome. But with IE 7 I've some issues with rendering. I try to add some CSS files but styles are not properly added there.

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  9. #9
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    One more thing I want to pointed, and forget it before.

    If you have red only the article I've posted earlier, may confuse that how to deal with IE. Read the following, then you can have much better understanding.

    Mark Finkle’s Weblog XUL/E – What If

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    One more thing I want to pointed, and forget it before.

    If you have red only the article I've posted earlier, may confuse that how to deal with IE. Read the following, then you can have much better understanding.

    Mark Finkle’s Weblog XUL/E – What If

  11. #11
    cultclassic is offline Member
    Join Date
    Mar 2011
    Posts
    64
    Rep Power
    0

    Default

    FireFox 4.0 beta does not support Remote XUL by default. Hope the add it in the final release.

  12. #12
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. How to generate excel file from a JSP
    By malarkal in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 04-07-2010, 01:06 PM
  2. Automatically Generate an XML file
    By svpriyan in forum XML
    Replies: 2
    Last Post: 06-25-2009, 05:46 AM
  3. Generate a Class file
    By Daniel in forum New To Java
    Replies: 6
    Last Post: 04-20-2009, 05:37 AM
  4. generate XML file from GUI Swing
    By ninja in forum AWT / Swing
    Replies: 1
    Last Post: 03-26-2009, 10:26 PM
  5. Generate an executable file
    By romina in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:30 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •