Wednesday, August 24, 2005

Using Ajax in a simple JSF Application - Introduction

I am going to start another tutorial on how to integrate Ajax with JSF soon. This is going to be a very simple JSF application with no GIS component. I hope that this could be of some help to GIS and non-GIS JSF developers alike.
Before I talk about this application, here is a nice article that demonstrates how to create a JSF textbox component with auto-complete feature using Ajax technique:
https://bpcatalog.dev.java.net/ajax/textfield-jsf/design.html

The above article discusses how to build a custom component that manages the necessary javascript code and can be easily used in a web page. I have, however, used a different approach to create a similar text box. It is simpler in a sense that it doesn't require you to create a custom TextBox component. The downside though is you will have to manage the Javascript code in the jsp page on your own. So if you do not mind writing/using the javascript code yourself, then you might want to give this a try.

The application that I will be discussing will have a text box to enter a country name. As you type a new character in the text box, it will dynamically get upto 5 matching country names from the server and list those names for you to choose from. Once the text box has the selected country name and you submit the form, it will give you a brief description of that country.
To accomplish the Ajax protion of the application, I have used the third strategy discussed in the following article:
https://bpcatalog.dev.java.net/nonav/ajax/jsf-ajax/frames.html
If you are a GIS Developer and have gone through my previous discussion on Integrating Ajax with ArcGIS Server, the idea is pretty much the same.

If you would like, you can download this application from here. In order to run this application, simply extract the ajax folder from the zip file, put the JSF jar files in WEB-INF\lib folder and deploy it in a servlet container.

Next time, I will discuss the code behind this application. Stay tuned!!

30 Comments:

At 10:57 PM, Blogger Infactahost.com said...

Hey, you have a great blog here! I'm definitely going to bookmark you!

I have a hosting site/blog. It pretty much covers hosting related stuff.

Come and check it out if you get time :-)

 
At 2:58 AM, Blogger Tony said...

I've really enjoyed reading your blog. Very interesting.

My submit article here site has lots of info pertaining to submit article here.

Come visit sometime :)

 
At 5:35 AM, Anonymous Anonymous said...

I downloaded the application, it worked fine, but when i tried doing some experiment on it, i.e, i moved the country.jsp to a folder under ajax/pages, the drop down worked fine when the page was loaded for the first time but then i got a js error once i clicked on the OK button. i was uable to trace the reason, could you please help me in that.

The structure became like this
ajax
|----index.jsp
|----pages/country.jsp
|----WEB-INF
|----js

 
At 9:03 AM, Anonymous Anonymous said...

Hi there!

I am starting to learn JSF and AJAX, your articles teach me lots of detals. I tried to download the application, but the link does not work. Would you kindly email me the example package to
yj1912@gmail.com.

Thank You!

 
At 12:53 PM, Anonymous Find antique dealers said...

Hey, you have a great blog here! I'm definitely going to bookmark you!I have a hosting site/blog. It pretty much covers hosting related stuff.Come and check it out if you get time :-)

 
At 6:05 AM, Anonymous sildenafil said...

Thanks for info the application is giving me some problems I don't why, I'm gonna ask my brother he's better than me on this haha
Thanks for sharing.

 
At 2:33 AM, Anonymous Anonymous said...

[url=http://hoovervacuumbags.weebly.com/]Hoover vacuum bags[/url] http://hoovervacuumbags.weebly.com/

 
At 4:14 PM, Anonymous video surveillance said...

Build a custom component needs to manage javascript code... so I could be a little bit easier to use it in a web page.

 
At 2:27 AM, Blogger hibeyond said...

black boots

Chocolate boots

sand boots

Chestnut boots

gray boots

pink boots

grey boots

pink boots

 
At 1:20 PM, Anonymous buy online percocet said...

You are helping others to grow their knowledge by sharing such a valuable information you have.

 
At 12:59 PM, Anonymous pharmacy said...

Thanks for the tutorial, It will be my first experience with ajax. There are a lot of people have recommended me to do it.

 
At 3:15 PM, Anonymous Generic Viagra said...

I know it is going to be a perfect tutorial because you know exactly what you are saying, and that's perfect because I want to experiment with Ajax because according to you it could be a perfect application and I believe you.

 
At 1:28 PM, Anonymous vrnjacka banja said...

Very well written. You got every point explained. Loved the whole article! Many thanks!
vrnjacka banja smestaj
vrnjacka banja privatni smestaj

 
At 3:46 AM, Anonymous pepa prase said...

I really appreciate sharing this great post. Keep up your excellent work.
bojanke za decu
bojanke

 
At 6:05 AM, Anonymous banja srbija said...

Excellent post. I want to thank you for this informative read. I will bookmark this site and visit again..
Banje u Srbiji
Banje Srbije

 
At 4:59 AM, Anonymous film art said...

I'm really enjoyed reading this article and whole website, thanks a lot for this informations!

 
At 6:12 AM, Anonymous get girlfriend give bj said...

I will bookmark this site and visit again. It is very informative. Thanks for sharing.

 
At 9:38 AM, Anonymous loperamide said...

Nice mini tutorial. Thank you.

 
At 5:18 PM, Anonymous price per head bookmaking said...

Hi, great article. The way you explained it is really awesome and makes every one to read till the end. keep posting..

 
At 7:20 AM, Anonymous Diana said...

Pretty effective data, thank you for this post.

 
At 9:56 AM, Anonymous Anonymous said...

clomid discharge | do you need a prescription for clomid - buy clomid nolvadex, clomid 3-7 twins

 
At 5:16 AM, Anonymous Anonymous said...

I'm extremely impressed with your writing skills and also with the layout on your weblog. Is this a paid theme or did you customize it yourself? Either way keep up the nice quality writing, it is rare to see a great blog like this one these days.
my web page :: apartments for rent

 
At 1:16 AM, Blogger Seacanoeist Mark said...

Welcome to mmoggg website to buy RS Gold, offer a lot, of course, Diablo 3 Gold or Diablo 3 Gold Kaufen and Cheap RS Gold, to be purchased at any time, at any time shipment, and look forward to your visit!

 
At 2:11 PM, Anonymous Anonymous said...

Nice post. I was checking continuously this blog and I'm impressed! Very useful info particularly the last part :) I care for such info much. I was seeking this certain info for a long time. Thank you and best of luck.

Look into my site; Online Casino

 
At 7:05 PM, Anonymous Anonymous said...

Ι аm гeаlly impгeѕseԁ with your writing talеnts as smaгtlу as with the stгuсture
to your ωеblog. Is thаt thіs а рaid tορіс οг
did you customіze it youгѕelf?
Anуωay κeeρ uρ the excellеnt hіgh quаlіty wгіtіng, іt is
raгe to pеer a great weblog likе this one today.
.

my web pagе payday loans

 
At 6:34 AM, Anonymous Anonymous said...

I used to be able to find good info from your content.


My web-site ... free microsoft points

 
At 3:55 AM, Anonymous Anonymous said...

Excellent blog here! Also your website a lot up fast!

What web host are you using? Can I am getting your associate
link to your host? I wish my website loaded up as fast as yours lol

Feel free to surf to my blog post - league of Legends hack

 
At 9:20 AM, Anonymous Anonymous said...

Good day! I know this is kinda off topic but I was wondering if you knew where I could get a captcha plugin for my comment form?
I'm using the same blog platform as yours and I'm having trouble finding one?
Thanks a lot!

Take a look at my webpage :: Minecraft Crack

 
At 5:46 PM, Blogger Kzaxcpnd Molluskxbny said...

I believe that we are not real GW2 Gold Guide social workers. We may be doing social work in the Buy GW2 Gold Guide eyes of the people, but we are really contemplatives in the heart of Guild Wars 2 Guide the world.

 
At 5:46 PM, Blogger Kzaxcpnd Molluskxbny said...

Stray birds of summer come to my window to sing GW2 Gold Guide and fly away. And yellow leaves of autumn, which Buy GW2 Gold Guide have no songs, flutter and fall there Guild Wars 2 Guide with a sign.

 
At 11:46 PM, Anonymous How to learn Chinese said...

Since our founding in 2002, Hanbridge Mandarin has provided thousands of learners with high-quality campus-based courses, online classes, and intensive cultural immersion programs. Utilizing?easy, fun and rewarding methods, we work hard to ensure our students can understand, use and ultimately master Mandarin communication skills.


More Chinese learning tags : learning Chinese online | Mandarin Online Course | how to learn Chinese

 

Post a Comment

<< Home