There could be several tags in JSF and Facelets but with the help of this blog story on Facelets UI Tags, I’ll try to explain all the UI tags in facelets.
Given Below are the List of UI faceletes tags…
- ui:component
- ui:composition
- ui:debug
- ui:decorate
- ui:define
- ui:fragment
- ui:include
- ui:insert
- ui:param
- ui:remove
- ui:repeat
Now lets see what is the use of these UI tags in Facelets one by one…
1. ui:component - If you want to insert a new instance in to the JSF component tree, Use the UI Component tag. As it’s really designed to do the same thing!
While inserting new instance of UI Component please keep in mind that it must be defined inside the particular tag, as anything which is defined outside this tag will be simply ignored by the JSF view handler.
- ui:composition – This tag is basically used to warp the content that means you can use the same content into another facelet.
- ui:debug – Used to display information about JSF componenets tree.
- ui:decorate - Is a templating tag that can be used to decorate content included from another Facelet as well.
- ui:define – used to define name content that will be inserted into a template.
- ui:fragment – It can be consider as a ui:component but still its different. It inserts new UI component instance into the JSF component tree.
- ui:include - For including a document that uses “src” attributes.
- ui:insert – To inserting a template and uses ui:define tags to pass values within facelets.
- ui:param – used to pass objects between facelets as a name variable.
- ui:remove – use when you want to remove something or wanted to restrict from to be display.
- ui:repeat – when you want to iterate over a collection of objects.
This is just an introduction about UI facelet tags in JSF. I will show you some more definition with examples in coming stories. Where you will learn how to use these ui tags in JSF and their syntax to use.
For working on this technology you must have prior knowledge of java and JSF. You can find these tutorials on IT Technologies based website such as http://www.roseindia.net/java or http://www.roseindia.net/jsf
August 19th, 2008 | Posted in Java Examples, Java Magazine, Java Programming | No Comments
Basically UDP is used to send the data in both the directions but still different from TCP/IP. The major difference is a security and speed. Both are the solution of same problem “sending data over internet connection”.
In this tutorial you will be going through the concept of UDP, what is UDP Ports with maximum examples on UDP or User data protocol.
Reference:
http://www.roseindia.net/software-tutorials/detail/18363
User Datagram Protocol Tutorial – Step by Step Guide
http://www.roseindia.net/java/example/java/net/udp/
August 19th, 2008 | Posted in Java Magazine | No Comments
Here I’m not going to explain the basics or fundamentals of JSP. But if you want to learn it sees the previous post in JSP or go through http://www.roseindia.net/software-tutorials/detail/6241
This tutorial will explain you each and everything, which is really required for any programmer in the beginning. So just go through the above given tutorial for deep basic knowledge.
Later through this blog, I’ll explain other things in JSP that would help you to learn it fast.
August 13th, 2008 | Posted in JSP | No Comments
Before you read about declaration tags in JSP, you must know what is JSP and why it is used in programming. So lets see the …
Quick answers about JSP
JSP Stands for Java Server Pages
What is it? – Sever Side Scripting Language, a Java Servlet Technology
Developed by – Sun
What are Tags in JSP?
JSP tags are used to declaring values, importing packages, inserting codes and defining expression. In JSP there are four types of tags that can be used for different purpose in JSP programming.
In JSP you can define these tags in different ways. If your are looking for detailed tutorial on JSP then visit the given link:
http://www.roseindia.net/jsp/
Declaration Tags
But here we are going to learn about only one tag, which is Declaration Tag.
You can write declaration tags within <%! And %>
These tags are basically used for embedding Java Codes. You can define functions and variables into this and can use it anywhere in the program.
For the example of declarative tags in JSP visit http://www.roseindia.net/jsp/jspdeclaratives.shtml
Here you will find an example code to print the value using declarative tags in JSP.
Reference http://www.roseindia.net/software-tutorials/detail/6240
August 13th, 2008 | Posted in JSP, Java Examples | No Comments
Example of calculating and adding two numbers in Java
The given example of java is basically designed for the beginners who want to make career in the java technologies. When you start learning java there are certain things that you must keep in mind such as… what is the structure of Java Programming or where to start from and how to stop.
What are the methods or functions and how they work. It’s great if you learn the standard definition of these concepts as they really help beginners in programming.
But anyways in this example I’ll show you how to add or calculate two different numbers using java program.
Apart from this you will be able to find out the difference between variables and instance variables. So, just go through the tutorial for developing your applications of calculating two numbers.
URL: http://www.roseindia.net/software-tutorials/detail/21571
Except this example, we got lots more for you to improve your programming skills in the java programming. Here are the few from the top list:
1. Calculating the maximum and minimum using Java Program
http://www.roseindia.net/answers/viewanswers/2104.html
2. What is a singleton class? Why and where we used and give me one example.
http://www.roseindia.net/answers/viewanswers/2101.html
3. And Communication between java program and database
http://www.roseindia.net/answers/viewanswers/2106.html
So here you can find lots of examples and tutorials for the basic and advance level.
August 11th, 2008 | Posted in Java Examples | No Comments
In this section, you will study the use of if-else ladder in jsp.
A ladder is the vertical or inclined set of steps. Here we are providing you an example to show the if-else ladder. We have defined integer variable i and initialize it with value 2. We are using if-else loop for the ladder and defined if-else condition in scriplet tag. The loop will travel up to down and if the condition gets true then it will be displayed on the browser.
Here is the code of ifElseLadder.jsp
Programming Code
- - - - - - - - - - - - - - - - - - - - - - -
<html>
<head>
<title>if-else Ladder Example</title>
</head>
<body>
<h2>if-else Ladder example</h2>
<%
int i=2;
if(i == 1)
out.println(”A number 1 is odd.”);
else if (i == 2)
out.println(”A number 2 is even and prime.”);
else if (i == 3)
out.println(”A number 3 is odd and prime.”);
else if (i == 4)
out.println(”A number 4 is even.”);
%>
</body>
</html>
- - - - - - - - - - - - - - - - - - - - - -
August 4th, 2008 | Posted in Java Examples, Java Programming | No Comments
This is a simple java array example that will show you how to get and print palindrome numbers using array in java. Apart from this you will learn I/O packages and Input and output streams in java.
You will be able to find out the benefit of using loops and implementing it in your Java Program. Just go through the reference website to check the peace of code that will illustrate it to you in better ways.
Reference:
http://www.roseindia.net/java/java-conversion/array-palindrome-number-in-java.shtml
You can visit here http://www.roseindia.net/software-tutorials/detail/21572 for more examples of printing Palindrome Numbers in Java.
August 2nd, 2008 | Posted in Java Examples | No Comments
This is a multidimensional array example in Java and here we will calculate the sum of two matrix. In the previous example you have seen that how to calculate the sum of three different static numbers in java.
The example is same as the earlier one but still it’s different because this one is written using multidimensional array. But overall the method of calculating the numbers is similar.
Just go through the example to find out different ways of calculating the data’s using array in Java Programming.
http://www.roseindia.net/software-tutorials/detail/21573
August 2nd, 2008 | Posted in Java Examples | No Comments
This is again another simple example to learn java fast. In this example you will see how to calculate the addition of two numbers in Java. Apart from this, here you will find out the use of system.out.println() as well.
Earlier It was quite difficult to learn java through a book but thanks to number of free online java examples website who makes it possible to learn it fast without facing much problem with ready made examples and their descriptions.
Reference:
http://www.roseindia.net/java/java-conversion/calculating-three-number.shtml
http://www.roseindia.net/software-tutorials/detail/21574
August 2nd, 2008 | Posted in Java Examples | No Comments
This Java Array Example is going to explain the method of changing array values. Using this example you will learn how to define array, assigning values to it and changing the value of these array.
Like any other Java Example, this is too easy to understand. After going through this Java array example, you will be able to write your own array program with many more manipulation to it.
So it’s very simple and easy to learn for any javas fresher, which are worried about use of array, assigning value to them and then changing it with different data’s.
See the given Java Array Examples resources for the sources code…
http://www.roseindia.net/java/java-conversion/changing-the-value-of-array-in-java.shtml
http://www.roseindia.net/software-tutorials/detail/21575
August 2nd, 2008 | Posted in Java Examples, Java Programming | No Comments