Re: Problem with xtree - Velocity!!!

Matt Raible <lists-T7vlz3gD7BdF/EzeuO4KJwC/[email protected]>
Newsgroups gmane.comp.java.struts-menu.user
Message-ID <[email protected]>
Your code looks quite a bit different from the code in the example app 
for XTree.

<div class="container">
<script type="text/javascript">
<menu:useMenuDisplayer name="Velocity" config="/templates/xtree.html"
  bundle="org.apache.struts.action.MESSAGE">
if (document.getElementById) {
    <menu:displayMenu name="ToDoListMenuFile"/>
    <menu:displayMenu name="ToDoListMenuEdit"/>
    <menu:displayMenu name="CaseDetailMenuCase"/>
} else {
  var msg = "Your browser does not support document.getElementById().\n";
    msg += "You must use a modern browser for this menu.";
  alert(msg);
}
</menu:useMenuDisplayer>
</script>
</div>

Matt

Setareh Jalili wrote:

> Now I don't get any error and every thing seems fine, but nothing 
> related to tree gets displayed, just some test message. I am using the 
> same menu configuration for expandable menu, which works fine.
>
> Any idea?
> Could it be because of xtree.js? How I can find out that it works fine.
>
> Here is my code:
>
> <%@ include file="common/taglibs.jsp"%>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> <head>
>     <title>XTree (with Velocity) Example</title>
>
>     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>
>     <link rel="stylesheet" type="text/css" media="screen"
>         href="styles/global.css" />
>     <link rel="stylesheet" type="text/css" media="screen"
>         href="styles/xtree.css" />
>     <style type="text/css">
>     div.container {
>         position: absolute;
>         width: 200px;
>         top: 0px;
>         left: 0px;
>         height: 100%;
>         padding: 5px;
>         overflow: auto;
>     }
>     </style>
>     <script type="text/javascript" src="scripts/xtree.js"></script>
>
> </head>
> <body>
> hello
> <div>
>  <div class="container">
>  <script type="text/javascript">
>  <menu:useMenuDisplayer name="Velocity" 
> config="WEB-INF/velocity/templates/xtree.html" 
> bundle="org.apache.struts.action.MESSAGE" permissions="rolesAdapter">
>
>  <menu:displayMenu name="ToDoListMenuFile"/>
>  </menu:useMenuDisplayer>
>  </script>
> </div>
> <div id="content">
>     <p>
>         View Template:
>         <script type="text/javascript">
>           var loc = window.location.toString();
>           document.write('<a href="view-source:'+loc.substring(0,
>             
> loc.lastIndexOf("/"))+'/WEB-INF/velocity/templates/xtree.html">templates/xtree.html</a>'); 
>
>         </script>
>     </p>
> </div>
>
>
> </body>
>
> </html>
>
> Setareh
> -----Original Message-----
> From: Matt Raible [mailto:lists-T7vlz3gD7BdF/EzeuO4KJwC/[email protected]]
> Sent: Friday, August 13, 2004 1:05 PM
> To: Setareh Jalili
> Cc: struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: Re: [struts-menu] Problem with xtree - Velocity!!!
>
> It's in the log4j.jar file - in WEB-INF/lib.  Either that or
> commons-logging.jar.
>
> Matt
>
> On Aug 13, 2004, at 1:49 PM, Setareh Jalili wrote:
>
> > I solved this problem (javax.servlet.ServletException:
> > org/apache/velocity/context/Context ) with copying the velocity
> > libraries in tomcat lib folder. Now I am getting following error:
> >
> > java.lang.NoClassDefFoundError: org/apache/log/format/Formatter
> >
> > For this one I couldn't even figure out where the class file exists.
> > Could you pleaselet me know what the library name for this class is?
> >
> > Thanks,
> >
> > Setareh Jalili
> >
> >
> >
> > The information in this e-mail message including any attachments is
> > intended only for the named recipients above and may contain
> > confidential or privileged information. If you have received this
> > message in error, or are not the named recipient(s), please
> > immediately notify the sender by replying to the message and deleting
> > all copies of it from your computer. 
> >
> >  Ce courriel de même que toute pièce jointe s'adresse seulement au(x)
> > destinataire(s) désigné(s) et peut contenir des renseignements
> > confidentiels ou privilégiés. Si vous avez reçu ce message par erreur
> > ou que vous n'êtes pas un destinataire désigné, veuillez avertir
> > immédiatement l'expéditeur en répondant au message et effacez-en
> > toutes les copies dans votre ordinateur.
>
> The information in this e-mail message including any attachments is 
> intended only for the named recipients above and may contain 
> confidential or privileged information. If you have received this 
> message in error, or are not the named recipient(s), please 
> immediately notify the sender by replying to the message and deleting 
> all copies of it from your computer. 
>
> Ce courriel de même que toute pièce jointe s'adresse seulement au(x) 
> destinataire(s) désigné(s) et peut contenir des renseignements 
> confidentiels ou privilégiés. Si vous avez reçu ce message par erreur 
> ou que vous n'êtes pas un destinataire désigné, veuillez avertir 
> immédiatement l'expéditeur en répondant au message et effacez-en 
> toutes les copies dans votre ordinateur.
>




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
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.