Username: Password:
Not registered yet? Click Here
Search
Title/Subject only
Title -and- text
Home
Forums
Articles
Resources
Software Forums: Display Message

Author: Aylin Yorulmaz
E-mail: [email protected]
Date: 8/1/2003 2:19:30 AM
Subject: jscript use in JSP
Message: Hello,
I found a tree menu script and trying to fill its fields
by database retrieved info by EJB inside my JSP. Codes work seperately perfect but i couldn't integrate my java code with jscript. Please help.
Thank you very much,
Aylin


<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page import="java.util.*" %>
<%@ page import="tr.com.erdemir.duks.menu.*" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>
DUKS LAB ANA MENU
</title>

<script language="JavaScript" src="tree.js"></script>

<script language="JavaScript">
var TREE_ITEMS = new Array();
TREE_ITEMS = [
['ýKS - Labarotuvarlar', 'http://www.softcomplex.com/',
<%!

HashMap [] resultMenuler = new HashMap[5];

int i = 1;
%>
<%
TreeMap ustMenuler = (TreeMap) request.getAttribute("ustMenuler");
/*Iterator ustMenulerIterator = ustMenuler.values().iterator();*/

Iterator ustMenulerIterator = ustMenuler.values().iterator();

while (ustMenulerIterator.hasNext())
{
MenuBean ustMenu = (MenuBean) ustMenulerIterator.next();
%>
['<%=ustMenu.getMenuAdi()%>', '<%=ustMenu.getUygulamaAdi()%>',
<%
resultMenuler[i-1] = (HashMap) request.getAttribute("menuler" + i);
Iterator menulerIterator = resultMenuler[i-1].values().iterator();
while (menulerIterator.hasNext())
{
MenuBean menu = (MenuBean) menulerIterator.next();

%>
['<%=menu.getMenuAdi()%>', '<%=menu.getUygulamaAdi()%>'],

<% }
i++;
}
%>
],
['DUKS Ana Sayfa', 'http://www.softcomplex.com/services.html'],
['Yardim', 'http://www.softcomplex.com/contacts.html'],
]
];

</script>


<script language="JavaScript" src="tree_items.js">
</script>


</head>

<body>

<script language="JavaScript">
new tree (TREE_ITEMS, tree_tpl);
</script>

<br><a href="LogoutKontroller">Ana Menuden Cikis</a>

<br><br>
</body>
</html>

You must be logged in to post a reply...

Back to the Folder



 Java -- Anything related to Java...
 jscript use in JSP by Aylin Yorulmaz  at 8/1/2003 2:19:30 AM
© 2002 - SoftwareForum.org - All Rights Reserved ...A software developer's forum