RE: Localize options

"Mike Warne" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <38DBEF1546BBDD4CB9B1F6F724E345026244C3@hnl1-exchange3>
The localize task creates Java files, which can be compiled into class files.  Localize uses the XMLC libraries, and does not produce HTML files.  XMLC creates DOM Documents that represent your HTML.  See http://xmlc.enhydra.org 

You should be able to write a simple program that takes the DOM object and writes it back out as a file.  The DOM object class created has a method  toDocument() the creates a HTML string representing the Doc. 

If your document was originally Hello.html, XMLC creates a Java Object HelloHTML.class:

       HelloHTML hello = new HelloHTML();
       System.out.print( hello.toDocument();

Hope this helps.
Mike.

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Sunday, January 26, 2003 1:21 AM
To: [email protected]
Subject: [Barracuda] Localize options


Hi
I am using the Localize ant task.
Is there an option to turn off the part where it generates *.html files to
.java files..

All I wanted to do is get it to generate localised html files
from a master property file without generating java equivalent files.

Thanks....


----- Original Message -----
From: "Christian Cryder" <[email protected]>
To: <[email protected]>
Sent: Friday, January 24, 2003 3:28 PM
Subject: [Barracuda] RE: Barracuda: Strange?


> This email has been forwarded to the new Barracuda list at
> http://barracudamvc.org, and all replies should be directed there.
> ----------------------------------------------
> Christian Cryder [[email protected]]
> Internet Architect, ATMReports.com
> Barracuda - http://barracudamvc.org
> ----------------------------------------------
> "Coffee? I could quit anytime, just not today"
>
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]]On
> > Behalf Of Kirk Daries
> > Sent: Friday, January 24, 2003 8:00 AM
> > To: [email protected]
> > Subject: Barracuda: Strange?
> >
> >
> > Hi,
> >
> > I've come across some strange behaviour when rendering one of my pages.
> >
> > The bit that is giving the problem is my model that generates
> > column totals.
> >
> > The problem revolves around the following logic.
> >
> > The page at any time can contain 1 to N number of columns.
> >
> > If the page has no currency/numerical columns, don't display and
calculate
> > the Page totals.
> > Else.
> > Go ahead and display the Totals.
> > E.g.
> >
> >  <<1.jpg>>
> > Notice the 'Page Total' Amounts in '1.jpg'
> >
> > Here's the offending html snippet.
> > .
> > .
> >
> > <tr class="Dir::Get_Data.PageTotal.PageTotalRow">
> >  <td class="transparent"></td>
> >  <td class="Dir::Iterate_Start.PageTotal Dir::Iterate_Next.PageTotal
> > Dir::Discard">[DISCARD]</td>
> >  <td class="Dir::Get_Data.PageTotal.total" align="Center"
> > valign="top">[PAGE
> > TOTAL]</TD>
> >  <td class="Dir::Iterate_End.PageTotal Dir::Discard">[DISCARD]</td>
> > </tr>
> >
> >
> > The bit that is giving the problem is the directive with in the <TR>
> > element, namely:
> > Dir::Get_Data.PageTotal.PageTotalRow
> >
> > The 'PageTotalRow' is just used to determine if we should display
> > the row at
> > all and hence loop through the columns calculating totals.
> >
> > Here is the code from the model.
> >
> > } else if (key.equals("PageTotalRow")) {
> >   if (this.userContext.getSumColumns(this.userDefinedCols)) {
> >     return new BComponent();
> >   } else {
> >     return null;
> > }
> >
> > So... if totals should be calculated... a 'new BComponent' is
returned...
> > and the rest of the directives should then be processed.
> >
> > Else
> >
> > Null is returned.. and the row should be 'hidden' and the rest of the
> > directives not processed.
> >
> > But for some reason.. this is the output I'm getting(2.jpg).. as soon as
I
> > add the 'Dir::Get_Data.PageTotal.PageTotalRow' directive to the TR.
> >  <<2.jpg>>
> > Barracuda doesn't log any warnings or errors. Notice how it ignores the
> > 'Discard' directive as well?
> >
> >
> > At first I thought that the problem is that the 'PageTotal' model is a
> > IterativeModel and I can't access the 'PageTotalRow' key before the
> > Iterate_Start method
> > is reached. That said... I moved the key to a Model without the
> > IterativeModel interface.. with exactly the same result.
> >
> > Needless to say.. I'm stumped... :(
> > Anyone got any ideas why I'm getting this behaviour?
> >
> > Regards
> > KD
> >
> > Ps.
> > If I completely remove the directive... everything works great..
> > but I end up with unneccesary processing on pages that don't require
it...
> > and unneccesary output.
> >
> >
>
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda
>

_______________________________________________
Barracuda mailing list
[email protected]
http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.