struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edgar P. Dollin" <ed...@blue-moose.net>
Subject RE: StrutsMenu Coolmenu4 images
Date Wed, 19 Mar 2003 16:27:08 GMT
I am not a committer so I am guessing to some degree, but it looks like
the image is not being passed through to coolmenus (look at the
generated code for save).  I am not a coolmenu expert either so I don't
know if coolmenus doesn't support the image or if struts-menu just
didn't generate the code required.

Since both coolmenus and strutsmenu are open source it shouldn't be too
hard to figure out the missing link.

My apologies for not being of more help.

Edgar

> -----Original Message-----
> From: Jack Zakarian [mailto:jzakarian@welchpartners.com] 
> Sent: Wednesday, March 19, 2003 11:08 AM
> To: Edgar Dollin
> Subject: RE: StrutsMenu Coolmenu4 images
> 
> 
> Hi Edgar,
> 
> I checked the generated HTML and it contained a base tag
> 
> <base href="http://d5l8ql11:9081/wp/">
> 
> and the menu script of :
> <script type="text/javascript">
> <!--
> 
> 	
> oCMenu.makeMenu('MainMenu','','Home','/wp/return-mainmenu.do',
'','','','
> ','','','','','',0,'','','');
>    
> 	
> oCMenu.makeMenu('Action','','Action'+cmTopMenuImage+'','','','
> ','','',''
> ,'','','','',0,'','',''); 
> oCMenu.makeMenu('TCancel','Action','Cancel','','','','','','',
> '','','','
> ',0,'submitAction("ServiceInvoice/add.do")','','');
> oCMenu.makeMenu('TClear','Action','Clear','','','','','','',''
> ,'','','',
> 0,'submitAction("ServiceInvoice/add.do")','','');
> oCMenu.makeMenu('TReset','Action','Reset','','','','','','',''
> ,'','','',
> 0,'submitAction("ServiceInvoice/edit.do")','','');
> oCMenu.makeMenu('TSave','Action','Save','','','','','','','','
> ','','',0,
> 'submitAction("ServiceInvoice/save.do")','','');
>     
> 	
> oCMenu.makeMenu('Query','','Query'+cmTopMenuImage+'','','','',
> '','','','
> ','','','',0,'','',''); 
> oCMenu.makeMenu('TField','Query','Field','','','','','','','',
> '','','',0
> ,'submitAction("ServiceInvoice/edit.do")','','');
> oCMenu.makeMenu('TList','Query','List','summary.do','','','','
> ','','',''
> ,'','',0,'','',''); 
> oCMenu.makeMenu('TNew','Query','New','add.do','','','','','','
> ','','',''
> ,0,'','','');
> 
> 	
> oCMenu.makeMenu('Add','','Add'+cmTopMenuImage+'','','','','','
> ','','',''
> ,'','',0,'','','');
> oCMenu.makeMenu('TAdd','Add','New 
> Record','add.do','','','','','','','','','',0,'','','');
> oCMenu.makeMenu('TDetail','Add','Detail','','','','','','','',
> '','','',0
> ,'submitAction("ServiceInvoice/adddetail.do")','','');
> 
>     
> 	
> oCMenu.makeMenu('Delete','','Delete'+cmTopMenuImage+'','','','
> ','','',''
> ,'','','','',0,'','',''); 
> oCMenu.makeMenu('TRecord','Delete','Record','','','','','','',
> '','','','
> ',0,'submitAction("ServiceInvoice/delete.do")','','');
> oCMenu.makeMenu('TSelected','Delete','Selected
> Detail','','','','','','','','','','',0,'submitAction("Service
> Invoice/de
> letedetail.do")','','');
> 
> oCMenu.construct();
> //-->
> </script>
> My men-config.xml contains :
>         <Menu  name="MainMenu"       title="menu.home.title"
> page="return-mainmenu.do"/>
>         <Menu  name="Action"         title="menu.action.title">
>             <Item  name="TCancel"    title="menu.action.cancel"
> onClick="submitAction(&quot;ServiceInvoice/add.do&quot;)"/>
>             <Item  name="TClear"     title="menu.action.clear"
> onClick="submitAction(&quot;ServiceInvoice/add.do&quot;)"/>
>             <Item  name="TReset"     title="menu.action.reset"
> onClick="submitAction(&quot;ServiceInvoice/edit.do&quot;)"/>
>             <Item  name="TSave"      title="menu.save.title"
> onClick="submitAction(&quot;ServiceInvoice/save.do&quot;)"
>               image="images/save.gif"/>
>         </Menu>
>         <Menu  name="Query"          title="menu.query.title">
>             <Item  name="TField"     title="menu.query.field"
> onClick="submitAction(&quot;ServiceInvoice/edit.do&quot;)"/>
>             <Item  name="TList"      title="menu.query.list"
> location="summary.do"/>
>             <Item  name="TNew"       title="menu.query.new"
> location="add.do"/>
>         </Menu>
>         <Menu  name="Add"            title="menu.add.title">
>             <Item  name="TAdd"       title="menu.add.new"
> location="add.do"/>
>             <Item  name="TDetail"    title="menu.add.detail"
> onClick="submitAction(&quot;ServiceInvoice/adddetail.do&quot;)"/>
>         </Menu>
>         <Menu  name="Delete"         title="menu.delete.title"> 
>             <Item  name="TRecord"    title="menu.delete.record"
> onClick="submitAction(&quot;ServiceInvoice/delete.do&quot;)"/>
>             <Item  name="TSelected"  
> title="menu.delete.selected" 
> onClick="submitAction(&quot;ServiceInvoice/deletedetail.do&quot;)"/>
>         </Menu>
> 
> Side not: I haven't tried you suggestion for LookupDispatchAction yet.
> 
> I tried different combinations of wp/images/save.gif, 
> /images/save.gif, /wp/images/save.gif but no luck.
> 
> Thanks,
> 
> Jack
> 
> -----Original Message-----
> From: Edgar Dollin [mailto:Edgar@BLUE-MOOSE.NET] 
> Sent: Wednesday, March 19, 2003 10:21 AM
> To: 'Jack Zakarian'; 'struts-user@jakarta.apache.org'
> Subject: RE: StrutsMenu Coolmenu4 images
> 
> I would start by looking at the generated HTML.  
> 
> One other thing to check is if your pages have any path 
> information, i.e. struts modules or general application 
> context then the images need either absolute images 
> references or leading slashes to resolve correctly.
> 
> Edgar
> 
> > -----Original Message-----
> > From: Jack Zakarian [mailto:jzakarian@welchpartners.com]
> > Sent: Wednesday, March 19, 2003 8:12 AM
> > To: 'struts-user@jakarta.apache.org'
> > Subject: StrutsMenu Coolmenu4 images
> > 
> > 
> > Hi,
> > 
> >  
> > 
> > I'm trying to use images with coolmenu4. I've added
> > image="images/save.gif" to 
> > 
> > <Menu> and to <Item> lines but it doesn't load.  I checked
> > the CoolMenuDisplayer4.java
> > 
> > code and it contains the following;
> > 
> >  
> > 
> >     private static final String TOP_IMAGE = "cmTopMenuImage";
> > 
> >     private static final String SUB_IMAGE = "cmSubMenuImage";
> > 
> >  
> > 
> > cmTopMenuImage and cmSubMenuImage are found in the 
> coolmenu4-config.js
> > 
> > i.e.
> > 
> >  
> > 
> > // Struts Menu specific javascript variables
> > 
> >  
> > 
> > // menu arrows
> > 
> > cmTopMenuImage='&nbsp;&nbsp;&nbsp;<img
> > src="images/Rarrow.gif" class="menuArrows" />'
> > 
> > cmSubMenuImage='&nbsp;&nbsp;&nbsp;<img
> > src="images/Rarrow.gif" class="menuArrows" />'
> > 
> >  
> > 
> > Also CoolMenuDisplayer4.java only loads the following arguments
> > 
> >  
> > 
> >     protected String[] getArgs(MenuComponent menu) {
> > 
> >         String[] args = new String[8];
> > 
> >         args[0] = menu.getName();
> > 
> >         args[1] = getParentName(menu);
> > 
> >         args[2] = getTitle(menu);
> > 
> >         args[3] = (menu.getLocation() ==
> > null)?EMPTY:menu.getLocation();
> > 
> >         args[4] = getTarget(menu);
> > 
> >         args[5] = (menu.getOnClick() == 
> null)?EMPTY:menu.getOnClick();
> > 
> >         args[6] = (menu.getOnMouseOver() ==
> > null)?EMPTY:menu.getOnMouseOver();
> > 
> >         args[7] = (menu.getOnMouseOut() ==
> > null)?EMPTY:menu.getOnMouseOut();     
> > 
> >  
> > 
> >         return args;
> > 
> >     }
> > 
> >  
> > 
> > How can I get images to load for my top and sub menu items?
> > 
> >  
> > 
> > Thanks,
> > 
> >  
> > 
> > Jack.
> > 
> >  
> > 
> >  
> > 
> > 
> 


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


Mime
View raw message