File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Combo Box and Getting Data from the BEA Content Repository Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Combo Box and Getting Data from the BEA Content Repository

Jacquelynne Galante
Greenhorn

Joined: Jun 14, 2006
Posts: 2
Hello,

I am not sure if this question belongs here or in the Intermediate section, but I am definitely a

Beginner to Java so that is why I chose to post my question here. I am really confused and there is so

much information out on the internet that I am having a tough time figuring out what to use and where to

put the code.

I have a list of courses that I am supposed to create a Training portlet for to allow users to pick one

or more courses (with what I would think would be a combo box) and then have that information sent in an

email to the course administrator. I also need to create an Admin page that can update the BEA content

repository. I am at least started on the request.jsp file that I am trying to use to create the combo

box with the course information and a submit button, but I am really stuck on how to get the combo box

to show up and then how to get that information sent in an email once the user clicks on the Submit

button. I will include what I have so far. Please let me know if I am in the right spot or if I should

move this to the Intermediate section.

Thank you,

Jackie

Here is my code:

& lt %@ page language="java" contentType="text/html;charset=UTF-8"%>
& lt %@ page import="portlets.util.PortalTips.Utils"%>

& lt %@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
& lt %@ taglib uri="netui-tags-html.tld" prefix="netui"%>
& lt %@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
& lt %@ taglib uri="content.tld" prefix="cm"%>
& lt %@ taglib prefix="utility" uri="http://www.bea.com/servers/p13n.tags/utility"%>
& lt %@ taglib uri="http://www.bea.com/servers/portal/tags/personalization" prefix="pz"%>


& lt %-- Retrieve the content and display each node name in a list. --%>
& lt pz:contentSelector rule="CurrMissCommTraining" id="nodes" useCache="false" cacheTimeout="300"

cacheScope="application" cacheId="MissCommTraining"/>
& lt % Arrays.sort(nodes, new Utils.NodeComparator("Course", "Description"));
java.lang.System.out.println(nodes); %>

& lt table>
& lt tr>
& lt th align="left">Missile Community Course Description& lt /th>
& lt /tr>
& lt tr>
& lt td> Please submit your name, office code, phone number, and BAND Level for the course you

would like to attend. You will be notified by the course administrator as to whether you have been

registered for the course, depending on need and availability.& lt /td>
& lt /tr>
& lt /table>


& lt utility:notNull item="& lt %=nodes%>">
& lt ul>
& lt utility:forEachInArray array="& lt %=nodes%>" id="node"
type="com.bea.content.Node">
& lt li>& lt cm:getProperty id="node" name="cm_nodeName" conversionType="html"/>& lt /li>
& lt /utility:forEachInArray>
& lt /ul>
& lt /utility:notNull>

& lt form name="checkForm">

& lt SCRIPT LANGUAGE="JavaScript">& lt !--
for (var i=0;i& lt 10;i++)
document write(i + ': & lt INPUT TYPE="CHECKBOX" NAME="box' + i +'">');
//-->& lt /SCRIPT>

& lt P>

& lt INPUT TYPE="BUTTON" onklick="show()" VALUE="Show">
& lt INPUT TYPE="BUTTON" onklick="set()" VALUE="Set">
& lt INPUT TYPE="BUTTON" onklick="unset()" VALUE="Unset">
& lt INPUT TYPE="BUTTON" onklick="reverse()" VALUE="Reverse">

& lt /FORM>


& lt netui:html>
& lt head>
& lt title>
Missile Community Training Registration
& lt /title>
& lt /head>
& lt body>
& lt netui:form action="RegisterforMCTraining">
& lt table>
& lt tr valign="top">
& lt td>Name:& lt /td>
& lt td>
& lt netui:textBox dataSource="{actionForm.name}"/>
& lt /td>
& lt /tr>
& lt tr valign="top">
& lt td>Office Code:& lt /td>
& lt td>
& lt netui:textBox dataSource="{actionForm.officecode}"/>
& lt /td>
& lt /tr>
& lt tr valign="top">
& lt td>Phone Number:& lt /td>
& lt td>
& lt netui:textBox dataSource="{actionForm.phonenumber}"/>
& lt /td>
& lt /tr>
& lt tr valign="top">
& lt td>Band Level:& lt /td>
& lt td>
& lt netui:textBox dataSource="{actionForm.bandlevel}"/>
& lt /td>
& lt /tr>
& lt /table>
& lt br/> 
& lt netui:button value="Submit" type="submit"/>
& lt /netui:form>
& lt /body>
& lt /netui:html>





Thanks in advance for your help!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38353
    
  23
Welcome to the Ranch. I am afraid I don't think I can help; what you have posted isn't actually Java. You might be able to find help on some of the other fora in this site (there is a JavaScript forum, even though JavaScript is a completely different language).

Beginners to Java could do much worse than going through the Java tutorial. If you click on "big index" on the right you can navigate to whichever page you want, including the page about comboboxes.

You will find that the Java tutorial uses the construct "addActionListener(this)" which I have just described as an abomination, on this thread. If you follow the links I have posted you get other threads where the same thing is discussed and some of us have posted our opinions.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

Duped in the HTML forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Combo Box and Getting Data from the BEA Content Repository