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 entriesselecting 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
ModuleNotFoundError: No module named 'entries'ModuleNotFoundError: No module named '
entries' Hi,
My Python... '
entries'
How to remove the ModuleNotFoundError: No module named '
entries... to install padas library.
You can install
entries python with following command
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
Own tag in XMLOwn tag in XML Hi....
Does XML let me make up my
own tags?
please anyone give the answerADS_TO_REPLACE_1
Thanks
Making own SDK - MobileApplicationsMaking
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
Importing Your Own PackageImporting 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
creating a own interceptor - Strutscreating 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
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-ServletHow 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 pdfwriterhow 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
Can I learn Hadoop on my own?Can I learn Hadoop on my
own? Hi,
I am beginner in Data Science... learn Hadoop on my
own?
Try to provide me good examples or tutorials links so that I can learn the
topic "Can I learn Hadoop on my
own?". Also tell me
Can I learn R on my own?Can I learn R on my
own? Hi,
I am beginner in Data Science... on my
own?
Try to provide me good examples or tutorials links so that I can learn the
topic "Can I learn R on my
own?". Also tell me which
how to create own tld and use it in jspx filehow 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 filehow 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
What is the best way to learn Java on my own?What is the best way to learn Java on my
own? Hi,
I am new to job market and after completing my graduation searching for better IT job in market... tutorials in Java.
What is the best way to learn Java on my
own?
Hi
Create your own Notepad in JavaCreate 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 InterceptorCreating
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
How to learn data science by own? Learning Data Science - How to learn data science by
own?
In this post we will tell you how you can learn data science by
own and
master the topics necessary to work on ML/DL projects? You can learn Data
Science by
own