|
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.
5 Massive But Simple Steps to a Profitable Website - Exposed!
There are many individuals across the nation that dream about creating a profitable website in order to add an additional income stream to their household or so that they can use the website to work from home on their own terms for their own business. The funny thing is that creating a profitable web business is already a reality for thousands of individuals across the nation and millions of individuals around the world. So what is it that they know that you do not know? Creating a profitable website takes a great deal of time, effort, and innovation for the website to succeed and create an income for the individual that created it. A great deal of time if you intend to pay all your bills with it that is! There are 5 steps that you must follow in order to create a profitable website that has the ability to provide a decent income for the creator. The first thing that you must do, like any entrepreneur, is come up with an idea for what type of website you would like to create. With the fluidity of the internet, the possibilities are virtually endless when it comes to what type of website to create and how to design the website to be appealing to the individuals you are trying to attract. The next thing that you will need to determine is how you would like to make this website profitable. There are a number of different ways that you can use to make a website into a profitable enterprise, including selling a product, selling a service, becoming an affiliate marketer, or create some type of membership community. Websites that are unique and innovative are generally the ones that are mostly the best received and tend to generate their creators the largest incomes. After the type of website has been determined, it is time to design the website and create the content of the website. The content of the website should be concise and well thought out as well as free of any grammatical or spelling errors. The intent of the content of a profitable web business is to keep the visitor's attention long enough for you to sell them your product, your service, or persuade them to travel on to another company's website as a referral. The next step to take in creating a profitable website is to determine how you are going to market your website. Individuals that create websites that are intended to be used for affiliate marketing will still need to market their website in order to attract individuals that they can use as referrals to the other company's website. There are nearly a dozen different marketing techniques that can be used on the internet and, in some cases - multiple marketing methods can be used in order to expand the number of individuals who see the website, helping it to become a profitable website much more quickly. The last step in creating a profitable web business is continuing to review, revamp, and revise your website so that the information remains current and relevant to the needs of the visitors to your website. By following these 5 steps for creating a profitable website, you should be able create a profitable web business that you can eventually make your full time job if that is what you are going after.
Main Arenas for Starting Up a New Website
Selecting a domain name - Domain name provides an identity to a website. It confirms your space on the internet as it denotes the name of your website that is entered by a user in search box to land on your site. For instance- yahoo.com, sujivan.org, usa.net and so on. Usually the user should opt for a domain name that ends with .com, .net or, org. These are the most common extensions used by the surfers. Many companies offer domain names at discounted rate, so keep an eye on online discounts if you want to purchase domain name at discounted price. Web Hosting - Every website that is being launched requires a web hosting for database support and web application. Many service providers offer free web hosting service, this should be avoided and instead go for companies providing this service by taking some nominal monthly fees. Otherwise chances of the host offering free web hosting to put up their banner on your site is there which may prove harmful for your business. If the user does not have much traffic they can go for shared hosting and when increases switch on to solo web hosting traffic. Website design and development- Next step is to hire a professional web designer to design your site. Take a note that the designer should have knowledge of HTML which is basic requirement for web designing. If you desire increased traffic to your site make sure that it is pleasant looking, fast downloadable and dynamic. Once web design part is complete then move for website development. Hire a professional web developer to develop advance functionality of your website. Content creation - Content management and creation is one of the most important aspects of any website. It can be considered as heart of any site, as relevant information, goals, objectives, discussions, etc fall under the content category. Can you imagine any website without content? Not possible, it's the backbone of every site whether personal or commercial. The content should be to the point and relevant, devoid of any grammatical errors. Search engine optimization - To get increased traffic to your website, it is essential that it is visible in first or second page of major search engines like Google, msn and yahoo. This can be done by search engine optimization of certain keywords that the user is likely to enter in the search box. Higher rank in the search engine lands more visitors at your website. You can hire an SEO expert or give this work to your web development company who has this facility. Thus these were certain essential key steps for starting up a successful website. These are followed by other website enhancing tools like online marketing, multimedia designs, graphics, flash, ecommerce, database application, logo design and website maintenance.
|
* About Archives
Categories:
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). |