average herbal penis size length

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.

 


Building Websites Without Technical Knowledge

There are a lot of reasons you might want to start a website. It is a great way to communicate with friends & family, and it is a great way to meet new people online and create conversations on the internet. Whether you have an idea or belief you want to promote, or a product you would like to sell, a personal or business website can be the solution to your marketing and communication goals. These days, a lack of technical knowledge doesn't have to be a barrier to getting started.

The good news is you don't need a degree in programming to start a new website. You don't even need to know a single line of code for that matter! If you can install software packages through a web-browser interface, you can set up a Content Management System (CMS) that will allow you to design, create, and manage any number of pages, articles, and stories. Some web hosts even have utilities like Fantastico that will automatically install a variety of Content Management Systems from blogs, to forums, to picture galleries or e-commerce websites.

Content Management Systems not only give websites more interactivity and functionality, they also allow people with few technical skills to get up and running with an online presence. The most popular ones like WordPress, Simple Machine Forums, phpBB, and Joomla are all free to use with varying regulations on how you can modify or transfer use of the software. Each of the programs also has discussion communities built around them where new and experienced users share advice & knowledge with the most common errors and user requests. If a problem pops up, there is a good chance that someone has already posted a step-by-step solution to it somewhere on the web.

As easy as it is to create and initially customize a new website, there is also no limit in how far you can take it. As you install easy to use CMS packages, some of the vocabulary will become a little more familiar and you'll naturally find yourself a little more comfortable with the technical aspects of your new hobby. So long as you keep regular back ups, you can confidently learn new skills by trial and error.

John McDonald writes about website building for new and perspective webmasters, including advice on web hosts and CMS programs.

 


Simple SEO Web Site Development Tips

So, you've bought your domain, got some hosting. Now what? You need to make sure that your web site is as friendly as possible to the search engines so that they send you some traffic. This process is called "search engine optimization" or SEO for short. It is probably the most important - and most neglected - part of web site development.

Here are some tips to help your SEO web site development.

1. Don't use frames

Frames may help you to control the layout of your site but they are a nightmare as far as the search engine robots are concerned and will make it difficult for your site to be crawled by the search engine spiders.

2. Make sure there's text on your pages

This even goes for the page featuring that expensive Flash movie that you're currently forcing visitors to your site to watch (or more likely press the "skip intro" link). Search engines don't know what's written on images or animations. They can only read text (the images search is their best guess based on the text on the page and the video search is based on the description of the video). So make sure they have text to read!

3. Separate style and content

This means using CSS as much as possible to control the layout of your pages. That way the spider can read more of your content if all the "this is how it should look" stuff is self contained in its own CSS file. The biggest snag with this is that CSS needs to be really well written if it is to look nice at different screen sizes, on different browsers and with varying amount of text on the page. Test at least in Internet Explorer and Firefox and play around with the width of the browser to see how well or badly your site copes.

4. Use a title tag

HTML design programs are good at putting in really generic titles such as "Page 1" or "Home Page" but they're almost certainly not what you want the search engines to think your site is about. Change the title to something meaningful. If possible make your title catchy and make sure it's short enough to be completely displayed when the search engine results are shown. This is basic SEO but you'd be amazed how many people don't do it.

5. Put in a meta description tag

Despite what you may read, the description tag is useful. It isn't often taken into account when Google or whoever decide which results to show, which is why some people say it isn't important. But it's normally used as the extract that's shown below the blue clickable link to your site. So if it says "XYZ home page constructed with Dreamweaver" instead of something interesting, that's what will likely show up below your title. And if it's blank, you're giving the search engines free reign to put whatever they want there.

6. Keep it simple

Spiders like simple. Despite all the advances in the internet, they're fairly dumb and the easier you make it for them to understand what your site is about, the more they will reward you.

Get more help on SEO web site development and do your best to make sure that your website gets the search engine results it deserves at http://www.squidoo.com/seowebsite

 


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