big free herbal penis size pic

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.

 


How To Create A Money Making Website - Avoid This Mistake

I think the biggest mistake many of us make when we set out to build a website to make money is not to think out clearly how we are going to achieve this under our given set of circumstances.

We immediately jump on whatever bad wagon promises the best opportunity and hope to be able to achieve the same results. While hope is always nice it is action that will bring results. This is why it is imperative at the outset for you to figure out what you are prepared to do and how you are going to go about doing it.

For example list your strengths and what you are comfortable doing. Then you are going to look for ways and opportunities that will compliment your strengths.

If I had done this years ago I would have been a lot more successful. What I did instead was jump on the latest greatest opportunity, then when I would get the material I would be disappointed because many of the techniques listed where not in my field of expertise.

For example it would involve me having to cold call people to make sales and this is something I hate to do. So your first objective when setting out to build a website is to build it around a subject that you have some relationship with. Basically something that interests you.

Start out broad and be prepared to be taken down different paths that may yield more positive results in other words do not be too ridged.

Research is critical the more time spent researching the better your chances of success. Visit forums relative to your topics of choice and see what people are looking for - then with this information start to structure your site.

There are many site builders out there that can help. The one I used took care of the hosting and also helped me to market the site. This was very helpful especially starting out.

To conclude figure out what you want to do then be prepared to be adaptable based upon what the market demands. Then build a site that addresses their needs and provides solutions and you will make money.

To learn more about this software select any of the links below and watch free videos on how this works.

Watch These Free Videos At Site Build It Customer Reviews please allow time for the videos to load.

Learn how to publish a real website That works Site Build It Review. Sign Up for the free affiliates masters course.

http://www.lfdab.com/Site-Build-It-Customer-Reviews.php

 


14 Usability Tips for Login and My Account Pages

Sites that require users to log in to access certain information and/or purchase products add an additional layer of potential complication to the usability process. To avoid potential visitor confusion and the possibility for errors, it is important that any login process requires little or no thought on the part of the site visitor.

Once logged in, you must be sure that visitors are able to find the information they want and expect to find. My Account pages need to provide visitors with access and ability to view and change personal information, as necessary.

Login Access

Access to any login page (or the login form itself) should be available consistently across all pages of the site. Be sure the form or link is obvious and easily differentiated from other areas of the web page.

Security

If the information behind your login contains sensitive data, you need to use the appropriate security protocols, assuring visitors that that you take their information's security seriously.

Registration

If visitors are not already registered a link to a new user registration form should be present. It's also smart to have a global link to "register" for any new visitors to the site.

Account benefits

Non registered visitors should be treated to benefits of account registration. This information should be located on the same page as the new user registration form.

Lost password

All login forms should contain an option to reclaim passwords and/or username should they have been forgotten. This information must also be passed securely.

Remember me

You can provide additional convenience (though less security) by giving visitors the option of checking a "remember me" box which will allow them to stay logged in indefinitely.

Privacy

Provide a link to your sites privacy information/policy near the login form submit button or email field. This gives your visitors confidence that you will treat their information with respect.

Status

The visitor's "logged in" status should be displayed at all times with a ready access to logout at their convenience. When additional security is necessary it's a good idea to automatically log them out after a set period of inactivity.

Change info

Once logged in, visitors should have access to change their user information, including usernames, passwords, contact info, payment details, etc.

Change confirmation

Once the visitor has submitted their information to be changed, provide a confirmation screen that shows the old and new info. This prevents errors and helps insure information remains accurate.

Financial details

Provide links to relevant financial information such as transaction history, invoices, balances, payment methods, etc. Provide printable version of this information.

Up-sell opportunities

Visitors that are logged in provide you an interested, captive audience. Consider discreetly utilizing up-sell opportunities - without being overbearing.

Subscribed services

Provide visitors access to the information/services to which they are subscribed. Also provide additional subscription options, if applicable.

Information management

Allow users to change the way they receive information, providing alternate methods such as snail mail, HTML or text based emails or to turning off communication entirely.

When visitors create an account with you they are making a commitment to you to enjoy the services or information that you provide. It's important not to let the usability process break down after visitors are committed. In fact, it's even more important to treat registered visitors respectfully and appropriately, ensuring they have access to the information they need. This develops long-term relationships and keeps them coming back.

Stoney deGeyter founded Pole Position Marketing in 1998 working from a home office and has since turned it into a leading search engine marketing business with a small team of seasoned Reno SEO marketing experts. Stoney pioneered the concept of Destination Search Engine Marketing which is the driving philosophy on how Pole Position marketing helps their clients expand their online presence and improve online conversion rates.

Stoney DeGeyter - 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).