Search This Blog

Friday, July 17, 2009

File UpLoad in Iceface

Hi all,

Here is the code to rename the uploaded file

In JSF page:


actionListener="#{fileupload.action}" uploadDirectory="C:\Upload" uploadDirectoryAbsolute="true"/>





In Manager Bean:

To display the uploaded file name in jsf page

String fileName;

public String getFileName() {
return fileName;
}

public void setFileName(String fileName) {
this.fileName = fileName;
}

Calender Functionality

Hi All,

Here the calendar functionality in Iceface as follows

In JSF page :

renderAsPopup="true" renderMonthAsDropdown="true" renderYearAsDropdown="true" rendered="true"
style="height: 22px; left: 936px; top: 216px; position: absolute; width: 118px" value="#{SiteTwo.selectInputDate1Bean.date1}" valueChangeListener="#{site.valueChangeListenerDate}"/>


“SiteTwo.selectInputDate1Bean.date1” is automatically generated by class names “SelectInputDateBean” when we create calendar in java class with bellow coding for single Calendar Instance.

private SelectInputDateBean selectInputDate1Bean = new SelectInputDateBean();

public SelectInputDateBean getSelectInputDate1Bean() {
return selectInputDate1Bean;
}

public void setSelectInputDate1Bean(SelectInputDateBean sidb) {
this.selectInputDate1Bean = sidb;
}

In Managed Bean:

In managed bean we have to handle event on which component has generated event and take the value and assigned to Managed bean property as bellow



public void valueChangeListenerDate(ValueChangeEvent event){
if(event.getComponent().getId().equalsIgnoreCase("selectInputDateOfInstallation")){
this.alternateEnergyInstalledDate = (Date)event.getNewValue();
System.out.println("--------------DATE OF INSTALLATION--------"+alternateEnergyInstalledDate);

}else if(event.getComponent().getId().equalsIgnoreCase("SiteTwodateLeaseRental")){


}else if(event.getComponent().getId().equalsIgnoreCase("SiteTwolandLordClosureDate")){
this.landLordInitialDiscussionStartDate = (Date)event.getNewValue();

}

JSF +Spring+Hibernate Rocks





For Beginners Who want to carry a carreer in j2EE just try to learn JSF.

JSF is new standard framework, developed through Java Community Process (JCP), that makes it easy to build user interfaces for java web applications by assembling reusable components in a page. You can think of JSF framework as a toolbox that is full of ready to use components where you can quickly and easily add and reuse these components many times in a page and capture events generated by actions on these components. So JSF applications are event driven. You typically embed components in a jsp page using custom tags defined by JSF technology and use the framework to handle navigation from one page to another. Components can be nested within another component , for example, input box, button in a form.

JSF is based on well established Model-View-Controller (MVC) design pattern. Applications developed using JSF frameworks are well designed and easy to maintain then any other applications developed in JSP and Servlets.

JSF eases the development of web applications based on Java technologies. Here are some of benefits of using JSF:

*

JSF provides standard, reusable components for creating user interfaces for web applications.
*

JSF provides many tag libraries for accessing and manipulating the components.
*

It automatically saves the form data and repopulates the form when it is displayed at client side.
*

JSF encapsulates the event handling and component rendering logic from programmers, programmers just use the custom components.
*

JSF is a specification and vendors can develop the implementations for JSF.
*

There are many GUIs available these days to simplify the development of web based application based on JSF framework.

JSF Components

JSF includes mainly:

1. Set of APIs to represent and manage state of components that helps server side validation, event handling, page navigation, data conversion etc.
2. JSP custom tag library to create UI components in a view page.

The UI (user interface) created using JSF technology runs on server and output is shown to the client. Goal of JSF is to create web applications faster and easier. Developers can focus on UI components, events handling, backing beans and their interactions rather than request, response and markup. JSF hides complexities to enable developers to focus on their own specific work.



U can take a chance(risk) for Iceface . Its really good and in demand comparing to Richface and other technologies.

I ll start a blog for beginners. step by step

Wednesday, July 15, 2009

Jump to the River

Nothing in this world is sale able if its not free. java is free.



But its not absolute free. You have to put your hard work and labor. This much of things you have to pay.


Don t panic.Just start reading (Writing programs)

From beginning Don t think its difficult. Other technologies are easy.Nothing is Impossible

Impossible itself says I am possible

If you want to buy a book then u can go for HeadFirst java, By Kathy Siera

Don t download the pdf

Why????
Because . Its difficult to study from the machine.
Study from Books, Do Programming in your machine.

Step by step we will proceed.


If any query u can reach me at

lnmjava@gmail.com