male herbal penis size photo

just another regularban.info web blog

MEMBERS:

Passing Parameters In A Data Table Using JSF

Some working knowledge of J2EE or JSF is assumed for this article.

Like some of you I've been frustrated with this technology known as JSF or Java Server Faces. There are several different flavors out there that are built on the shoulders of JSF. For instance Oracle's ADF (Application Development Framework). Oracle ADF Faces Components is a set of over a 100 JSF components that let you build a richer user interface for your Java EE applications. Oracle ADF Faces also includes many of the framework features most needed by JSF developers today.

That is great, and in many ways it will make life easier to develop in a JSF environment. Some items you will find available in these "add on" packages have a real benefit. For instance, as of the date of this article, I was very surprised that a File Upload is a feature still not implemented in JSF in respect to using natural jsf tags. There are ways to accomplish this task in JSF but they are not native JSF approaches. The process is a "no brainer" in just about every other framework available today, including asp.net.

Another simple task (I thought) was having a data table present the results of a query in an editable format. Possibly to update a user record or shopping cart. After working in other technologies it was very efficient to return a result set to a data table object and let that object take care of some of the trivial behaviors and characteristics of the table itself. When I started exploring JSF I was frequently and at every turn becoming more and more frustrated in trying to duplicate some of the most basic of processes similar to managing records through data tables.

There are not a whole lot of resources out there yet on JSF although it is growing steadily, and I found that all too often the resources that I was finding on the internet either didn't apply to the more simple tasks or the information was just completely wrong. One example of that was that it was stated in one article I read that you cannot use command buttons inside of a JSF data table. The recommendation was to use JSF hyperlinks instead when trying to perform an action from a data table due to a bug in the framework that prevented command button actions to fire if the button resided inside of a data table.

At first I thought "you've got to be kidding me"! Then I remembered that I've been finding a fair amount of "bogus" information in regards to JSF development so I decided to do further research and discovered that information to be less than accurate as well.

I simply had to find a way to populate a data table through a result set and get a command button to fire an action and pass all of the data in the data table to the backing bean to update the record. Multiple command buttons would exist as well as hidden fields pertaining to id numbers and so forth. Pretty basic stuff and we've all done it before with relative ease.

It turned out that the solution was in fact a simple one. "Binding". You've heard about it and read about it. But this approach was something a little different as far as I could find.

Many of the blogs and articles that I read dealt with passing the values as parameters and following the steps to define the parameters in faces.config files etc., then retrieving the parameters in a backing bean. Processing the passed data required another set of procedures to utilize mapping to each of the field parameters passed and then processing could begin.

That seemed like a whole heck of a lot to me just to retrieve form data. Then it occurred to me that I should be able to "bind" a text field component on a page to a backing bean. Once it is bound then all I have to do is extract the data. And that's all there is to it. My query returned results and pre-populated a data table including text fields with the values of the query pre-populated in the text fields.

Each one of those text fields was bound to a "HtmlInputText" type in my backing bean. It was not a String type like other approaches define. Doing that does require you to map parameters and populate that String variable through your set methods once the form is submitted.

What I found is that if I bind my text field to a property of text field type that it solved my problem of passing values from a data table, and I didn't have to define parameter fields anywhere in any xml file. Now that I had that figured that out I needed to figure out how to get the value of that property that I've bound my form field to, well why not getValue()?

I personally hadn't seen any examples online or in books for retrieving the value from a form binding it to the type of form element it was and simply use the getValue() to pull out the value of the object. Used like this getParameterFromForm().getValue().

Let me clarify that I am NOT saying that trying this approach isn't documented anywhere, I find it hard to believe that I've had some stroke of genius that no one has had before in the world of java, especially since I'm coming from .NET and ColdFusion.

After doing that I no longer had any problems passing form data to my backing bean. I was able to dynamically populate data tables with any number of records including any number of command buttons within that data table and I didn't have to concern myself with remembering to define parameters in any other areas of the application.

So put simply you can bind your form fields to properties of the same type in your backing bean, and then extract the value of that object using getValue() if you prefer over utilizing parameter string mapping and similar approaches for processing form data. I found it to be easier and less time consuming which has costs associated to it as well.

Ben Cortese is a developer and business analyst for the financial industry.

Copyright 2008. Article can be reprinted as long as author credits are given and content remains unchanged and intact.

 


Is Your Website a Grave Site?

Let's say you have a website. You probably feel pretty good about it. You have a presence. People can find you. You're out there. Sure, these are all good things; the only problem is everyone has a website. A website is the bare minimum.

A website is only just enough.

As a small business owner, as an entrepreneur as an upstart you must standout. You are the underdog. Underdogs don't out hustle the more established folks by doing just enough. And if you only have a website, you are only doing just enough.

Want to build your business and exceed your goals?

Do more than just enough.

Hold on, let's get down to it. If you consider how advanced the internet has become in just the last 5 years, if you only have a company website you aren't doing just enough.

You're doing less than enough.

You're doing enough to exist, but not enough to excel.

You're doing enough to be counted, but not enough to go over the top.

I'm sorry. I really like you. I wish you the best, but the truth is you're behind the curve.

You can change it, but to do that, first you need to change how you see the web and the possibilities. You've got to decide if you're serious about your business? Is your business concept a winner or a loser? Can it work? Is it working? What to do about it? More of the same isn't the answer. Making your website more pretty isn't going to cut it. You need to diversify.

I may be blunt, but I'm not exaggerating. Like John McCain says, "Time for some straight talk".

A business website should be only one piece of your web presence. You should also have a presence on every social networking website out there. You should have articles related to your business all across the information superhighway. You should belong to all the major (and some not so major) business networking sites. You should have a video on YouTube, a Face book, a MySpace and a Squidoo page. You should be everywhere other business owners congregate, share ideas, exchange referrals and talk shop.

You must be there.

No excuses.

No exceptions.

Sure, it takes time to set up marketing mechanisms across the many websites that are available, but it's time well invested because your company website isn't the end all to be all of generating buzz and finding leads on the internet, your website is just the beginning.

Make a commitment to your business and cease and desist looking at those social networking sites as options. They aren't options, they are necessities.

If you need more reasons to justify putting your resources into more than a company website, just take a look at Barack Obama's surge. Obama-mania owes much of its energy and support to the social networking sites that it uses. Get involved and secure some of that same viral power for your business. 99% of it is free and 100% of it is good business.

Welcome to the first day of your new way of looking at promoting your business on the net.

Go get started yesterday.

Timothy Crawford is a professional copywriter, consultant, speaker and all around creative media guru. For more tips visit his website at: http://www.timothycrawford.com

For marketing and advertising book reviews go to: http://www.squidoo.com/ADGameBooks

For my advertising, marketing and copywriting blog go to: http://www.timothycrawford.com/blog

Timothy Crawford - EzineArticles Expert Author

 


Website Success

Getting your website done up for your online marketing business? What are your expectations for a good website? What are the important factors that you are emphasizing on to get the desired results from your website? How do you plan to achieve such desired results that will project your website favorably with visitors and customers alike?

Designing a good website and making it work for you and your online business requires tremendous effort in meticulous planning, serious consideration and purposeful fine-tuning. Without all these factors, the vast amount of time, money and effort spent on starting up the website can all be wasted easily.

To achieve website success, it is imperative to consider the following points:

(1) Planning

Draft the plan for your website. What is the exact purpose for the website? This is important because it will set the direction that should be taken for the whole process of designing your website.

(2) Content consideration

Content is the meat and forms an integral part of the website. It is important to think about what content should be included on the website. Another aspect will be how often the content should be updated and how to get reoccurring content.

(3) Designing the website

This plays an important role in keeping your visitors for the first four seconds. The design of your website must speak its intention and desirability very clearly. What it has to show to the visitors must be made known in that very short time span. No beating around the bush whatsoever. It must be distinctly clear in sending its message across.

(4) Encouraging visitor participation

The website for whatever reason it is being designed must attempt to bring in visitors not only for the sake of traffic but also getting them involved by participating in the signing up of the free articles and newsletters that you are offering. The whole process must one of interaction, not just a one-way communication.

(5) Setting up the website

This poses no problems simply because there are professional web designers that you can approach for a certain fee, or alternatively, there are nowadays user-friendly software that you can purchase to design and build your own website, bearing in mind that the design has to be somewhat agreeable within limits to the intention of the website.

(6) Execution of follow-up

It will be extremely damaging if some visitor poses you a question but it is not being followed up within the same day. This reflects poorly on the efficiency on your part. It tarnishes the image of your online customer service.

(7) Promoting your website

In any marketing campaign, there is the element of promotion. After having posted your new website, it is crucial to spend some time in promoting it. It is new and therefore it has not garnered recognition or publicity withing this short period of time. It must be given some push through promoting it. There would be teething problems initially, so the website must be given close attention and nurturing, at least in this initial phase of being hosted.

(8) Executing maintenance of the website

Having set up the website on the internet, it is very important to maintain it. Enliven it with new and fresh content. Make it appealing as each day passes by and visitors returning looking forward to reading new information. Put a warm smile on your website everyday. It will be like what honey is to bees. The path to website success is being subtly laid ahead.

The prerogative after the website is being hosted is obviously getting visitors to know and come to your website. Without visitors to your website, the whole purpose of designing and hosting it will be defeated.

How do you plan to attract visitors to your website? There are several ways of realizing this plan:

(1) Submission of your website to various search engines

Submitting your site to various search engines will help in some way. Of course, it would be advisable not to place full reliance on them as they can be inconsistent. If budget permits, bidding for a spot on the search engine would be a more viable alternative simply because an extra bit of control can be exercised. Overture.com is one good choice.

(2) Put up various free offers

Who would not want to accept free offers if given? This can be best executed by explaining why the visitors in accepting the free offers would understand more about their problems on hand. "Grab free information relating to your backaches. You'll receive more of such information if your just sign in and allow me to mail you these free related information on a weekly basis".

(3) Put up ads online

It is a good opportunity to put up ads online. Run your paid ads in e-zines. Put your ad buried in another person's e-zine, or you can choose to buy a full page ad. The whole process will induce the source of incoming traffic to your website.

(4) Use word-of-mouth

This method is viral and is usually effective. Let the world know about your website by inserting your personal signature file on your name cards, brochures, leaflets, just to name a few. Inevitably, as this usually turns viral, it will lead to more website visibility.

The internet provides the opportunities for online success. All that is needed to be done is to leverage ourselves with technology. It is equally crucial to understand that website success needs good effort in planning, designing, hosting, promotion and maintenance of the website. Nothing is further from the truth that a well-maintained website is one guaranteed of success in the long run.

Webmaster: Jeremy Long Chia Teik.

For latest updates on how to increase traffic, raise page ranking, write effective articles and powerful squeeze pages, create explosive blog marketing system, learn about viral marketing, and bring in massive income from your internet marketing business, please Click here

Jeremy Long Chia Teik - EzineArticles Expert Author

 


Pages 
* About

Archives
    * February 2008
    * January 2008

Categories:
* Uncategorized

Last Updated:

regularban.info is proudly powered by WordPress MU running on  regularban.info.
Create a new blog and join in the fun!
Entries (RSS) and Comments (RSS).