Skip to Content
author's profile photo Former Member
Former Member

Help me with this Code!!

Thanks for stopping by,

Following code works fine:

<hbj:hoverMenu id="hover1" standAlone="false" > <hbj:hoverMenuItem id="1" text="New" onItemClick="itemClicked" >
      <hbj:hoverMenu id="hoversub12">
      	<hbj:hoverMenuItem 
       	  id="1112" 
       	  text="Folder" 
       	  linkRef="http://www.sap.com" 
       	  linkTarget="_self" />
	</hbj:hoverMenu>
</hbj:hoverMenuItem>
    
<hbj:hoverMenuItem id="" text="Details" hoverItemDivider="true" />
	
<% hover1.setMenuTrigger(com.sapportals.htmlb.enum.HoverMenuTrigger.ONLRCLICK); %>
</hbj:hoverMenu>
	
		<hbj:image id="image_logo2"
    		alt="Image not available"
     		hoverMenuId="hover1"
     		src="" >
     		<% 	IResource rs2 = componentRequest.getResource(IResource.IMAGE, "images/context.jpg");
       	 		image_logo2.setSrc(rs2.getResourceInformation().getURL(componentRequest));
	     	%>
		</hbj:image>

It won't work if try to do this:

<%String hoverID="hover1";%>

<hbj:hoverMenu id="<%=hoverID%>" standAlone="false" > <hbj:hoverMenuItem id="1" text="New" onItemClick="itemClicked" >
      <hbj:hoverMenu id="hoversub12">
      	<hbj:hoverMenuItem 
       	  id="1112" 
       	  text="Folder" 
          ....
            ...
            </hbj:image>

Whatz wrong with it?? Iam trying to generate 5 Such Menus and want to make these IDs unique in the for Loop..

Thanks again!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 18, 2005 at 02:40 PM

    This is probably because the hoverMenu tag doesn't allow you to use inline script for the ID property. Therefore you could try somethine like

    <%String hoverID = "hover1";%>

    <hbj:hoverMenu id="hover" standAlone="false" >

    <%

    hover.setID(hoverID);

    %>

    </hbj:hoverMenu>

    This may or may not work as I haven't tested it

    D

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.