Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


puppy
Own Entries
1 Answer(s)      5 years and 7 months ago
Posted in : Java Server Faces Questions



Advertisement
View Answers

December 23, 2008 at 6:47 AM


Hi Friend,

Code to help in solving the problem :

<%@ page contentType="text/html" %>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>

<f:view>
<html>
<body>
<h:form>
<h:selectOneMenu id="som" value="#{MyBean.som}" title="select any one in this menu" onchange="submit()">
<f:selectItem id="si1" itemLabel="Thums Up" itemValue="11" />
<f:selectItem id="si2" itemLabel="Limca" itemValue="22" />
<f:selectItem id="si3" itemLabel="Pepsi" itemValue="33" />
<f:selectItem id="si4" itemLabel="Sprite" itemValue="44" />
<f:selectItem id="si5" itemLabel="Frooti" itemValue="55" />
<f:selectItem id="si6" itemLabel="Coca-Cola" itemValue="66" />
<f:valueChangeListener type="roseindia.MyBean" />
</h:selectOneMenu>
</h:form>
</body>
</html>
</f:view>

"MyBean.java"

package roseindia;

import java.util.*;
import javax.swing.*;
import javax.faces.event.*;

public class MyBean implements ActionListener,ValueChangeListener{
String som = "";
private Date today = new Date();
public void processAction(ActionEvent e){
JOptionPane.showMessageDialog(null,"Hi");
}

public void processValueChange(ValueChangeEvent ce){
JOptionPane.showMessageDialog(null, ce.getSource());
}

public String getSom(){
return som;
}

public void setSom(String som){
this.som = som;
}

public Date getToday(){
return today;
}

public void setToday(Date today) {
this.today = today;
}
}

For read more information on JSF visit to :

http://www.roseindia.net/jsf/

Thanks


Related Tutorials/Questions & Answers:
Own Entries - Java Server Faces Questions
their own entries in the Drop Down list.I want to use in this ValueChangeListener...Own Entries  Hi All, I have Date & Format Drop Down List boxes fields.when we click on the date field in the format field it should display
selecting entries
selecting entries  I have a textbox by the name country in the browser...and I have some entries of country in database like india, china, australia etc... As soon as I start to type "c" in the textbox , china should appear
Advertisements
Show all the entries of zip file.
Show all the entries of zip file. In this tutorial, We will  discuss how to show all the entries of a zip file.  The ZipFile   class is used to read entries of zip files. The entries() methods of ZipFile class 
class with in its own objects?
class with in its own objects?  Is it a good idea to declare a class with in its own objects
Own tag in XML
Own tag in XML  Hi.... Does XML let me make up my own tags? please anyone give the answer Thanks
Importing Your Own Package
Importing Your Own Package  I would like to know if it is possible to create a class with your own methods so that you can import them when writing programs
Making own SDK - MobileApplications
Making own SDK  Hi all, I am trying to make my own universal installer for installing the JavaME mobile application to all the phones supports java.For this where from i start to think
How to fetch entries/values from database to a jsp page one by one?
How to fetch entries/values from database to a jsp page one by one?  I have a table in Microsoft SQL server Management Studio with two columns title... to display different database entries of the each column in different blocks. Now
to display NEXT and previous option after 10 entries in java
to display NEXT and previous option after 10 entries in java  As after jsp code we refer to java for connectivity and i want that directly only 10 entries will be open and next there will be pages. so what would i do for coding
creating a own interceptor - Struts
creating a own interceptor   i want to create own interceptor how i will create and which class i want implement  Hi friend, Interceptors: An intercept is a method used to intercept a business method
You handle your own transaction
You handle your own transaction  How do you handle your own transaction
creating own ArrayList without Collections?
creating own ArrayList without Collections?  How can we write our own arraylist without using collections in JAVA
Import My Own Package (Automatically)
Import My Own Package (Automatically)   How can I import my own package in every java program ( automatically )....? For example :- java.lang.String... automatically imported, we need not to import
How to create own help forum - JSP-Servlet
How to create own help forum  Hi All, My client given requirements, they need to create their own help forum, I need to do case study for, how to create any forum. if you have any documentation or technical ideas please
how to make list in our own style in pdfwriter
how to make list in our own style in pdfwriter  can u please any of one help me i want to make a list as follows in pdf file from java by pdfwriter account calculation ------------------------- amount -100.00
Creating your own package in java
the real classes in the package. To know more about how to create own package and subpackage click on the following links Create Your Own Package Create
how to create own tld and use it in jspx file
how to create own tld and use it in jspx file  I wanted to add fmt as own tag and internationalize add.title=Add. please help me solve the problem. <!-- Document : add Created on : Mar 4, 2012, 7:00:38 PM
how to create own tld and use it in jspx file
how to create own tld and use it in jspx file  I wanted to add fmt as own tag and internationalize add.title=Add. please help me solve the problem. <!-- Document : add Created on : Mar 4, 2012, 7:00:38 PM
Create your own Notepad in Java
Create your own Notepad in Java           You must have worked with Notepad to write programs. Now its turn to create notepad by own with the help of java language
Creating own Interceptor
Creating own Interceptor Though Interceptors are provided by default in the stack, one can also create custom interceptors and add it to already existing list of interceptors. It is very easy to create your own interceptor. Custom made
What is "Bring Your Own Device" (BYOD)?
What is "Bring Your Own Device" (BYOD)? Bring your own device or as commonly... with their own tech devices ranging from mobile phones to laptops to tablets or other... of desktops all over the world in an unprecedented way. By referring to bring your own
I need to display parts of my own website on another website in an iframe
I need to display parts of my own website on another website in an iframe  I need to display parts of my own website on another website in an iframe. please refer me how do i do
How to put our own wanted thread into running state..?
How to put our own wanted thread into running state..?  How to put our own wanted thread into the running state by stopping already running one
Identify correct and incorrect statements about the purpose and use of the deployment descriptor elements for environment entries, EJB references, and resource manager connection factory r
of the deployment descriptor elements for environment entries, EJB... descriptor elements for environment entries, EJB references, and resource... ENTRIES are stored directly in the environment naming context, or in any
Retriving zip file stored in database into my own filesystem
Retriving zip file stored in database into my own filesystem  Hi all, I have a table named tempdb with tempid and zipfile as two column.Currently I am using sybase db. create table tempdb(tempid int,zipfile image) i have
Is there a data structure like a class that doesn't need to be defined as a class in it's own file?
Is there a data structure like a class that doesn't need to be defined as a class in it's own file?  I am new to java, and I am trying to make a complex program with ArrayLists of objects. Within the classes of these objects, I
Writing SEO Articles for Own Website,How to Write Effective SEO Articles for Own Website
Writing SEO Articles for Own Website Writing SEO articles for our own website requires a lot of commitment and hard work on our part. The article written by us must be capable in selling our services and publicizing our
we can create our own header file in java?n how to create?
we can create our own header file in java?n how to create?  we can create our own header file in java?n how to create
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p  Hi, I have designed a "back" button for jsp page. Now I want to disable Browser's default button So that people will use "back
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p  Hi, I have designed a "back" button for jsp page. Now I want to disable Browser's default button So that people will use "back
Create Your Own Package
Create Your Own Package       The package to which the source file belongs is specified with the keyword package at the top left of the source file, before the code
Task Scheduling in JAVA
after one day and make reports according to the entries then save all entries
Java example program to get IP address of own system
Java example program to get IP address of own system       java get own IP address An IP... address of our own system in a java program we will be using InetAddress class
Website Development Applications ? Design Your Own Website At The Drop Of A Hat
Website Development Applications – Design Your Own Website At The Drop... you can get started on your own. Easy to use templates Even with the basics.... This will provide the basic structure that you can use. You just have to add your own text
Subset Tag (Control Tags) Example Using Count
the count parameter. The count parameter indicates the number of entries... is of integer type and it sets the number of entries to be kept
How to Create Jar File using Java
in the jar file.  In this section, we are going to create our own jar file... specify the meta-information about the JAR file and its entries. Then we have
Sorting Arrays
Java NotesSorting Arrays Why you shouldn't write your own sort A favorite computer science topic it sorting, putting a collection of data in some order... of the java.util.Arrays.sort() methods; they do not write their own, except perhaps
Multi Clipboard
Multi Clipboard Multi Clipboard gives you a clipboard for text- and source-code editor contents that holds multiple entries. You can collect some snippets by adding them to the Multi Clipboard and then paste any of them
Introduction to Map and SortedMap Interface
rather it has own interface hierarchy. Map provides a more general way... in a java.util.Map.Entry object. A set of these map entries can be obtained by calling a map's... that maintains a doubly-linked list running through all of its entries
JSF Tutorial and examples
of the author shows how we can create our own components based on the model...-unselected'. We can change it by altering the entries in the file tree-control... entries in the file. The default values will be present there. Fig
Java LinkedList Example
Java LinkedList Example In this section we will discuss about the own implementation of Linked List in Java. Linked List is a part of Data Structure. In Linked List nodes are connected by a link this link is referred to as one node
PHP Variable Server
, and script locations. The entries in this array are created by the server.../xml;q=0.9,*/*;q=0.8Http accept charset root : ISO-8859-1,utf-8;q=0.7,*;q=0.7Http accept encoding : gzip,deflateHttp accept language : en-us,en;q=0.5Http
C3P0 Hibernate
Hibernate has its own connection pool but not suited for industrial use. In this section, you will learn how to use third party connection pool C3P0 with Hibernate
Hibernate C3P0
Hibernate has its own connection pool but not suited for industrial use. In this section, you will learn how to use third party connection pool C3P0 with Hibernate
Magazine Mobile Application
that are using their own mobile applications. Magazines are taking advantage... can offer their own mobile applications. Different types of sports magazines can have their own applications too. In fact, publications that deal
Code Management
is capable of hosting its own independent set of log tail viewers.   ..., logger Insertions at certain method entries, substitution of System out's... different pieces. Creole adds its own perspective to the eclipse platform
Log4E-Code Management
framework. Thus you might be able to adapt to your own logger by defining your own templates using the preferences. It has active support for Log4j, Commons
Window Container in Flex4
4. Spark Window container is provide a way if user want to create own window... have create Window component and used this component in own application...; The system provide a native window but user want to create own window then use
User Defined Exception
User Defined Exception       As we come across Built -in-exception, you create own customized... the required constraint in application. For this, you create your own customized Exception
User Defined Exception
User Defined Exception       As we come across Built -in-exception, you create own customized... the required constraint in application. For this, you create your own customized Exception
Advertisements
 

 

 

DMCA.com