herbal cialis overnight

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.

 


Web Developer Suite - Master PHP, ASP or CF Dreamweaver Websites With These WebAssist Extensions

Millions of web designers and developers have chosen Adobe Dreamweaver as their software of choice for website creation. Even with the incredible amount of built-in functionality that comes standard with Dreamweaver, there are many web applications that require a vast amount of hand coding to implement. Web Developer Suite from WebAssist is a Dreamweaver extension bundle that helps eliminate hand coding and opens up a vast dynamic frontier for the average Dreamweaver user.

Web Developer Suite consists of the following individual WebAssist Dreamweaver extensions:

  • DataAssist - for complete database administration
  • SecurityAssist - for user management, login, cookies and sessions
  • Digital File Pro - for mastering file upload and download
  • Universal Email - for processing form email on your website
  • Dynamic Dropdowns - for dynamic dropdown menu creation
  • Cookies Toolkit - add server-side cookies with one click
  • Pro Maps for Google - dynamic or static Google maps API integration
  • Validation Toolkit - for validating any type of form information
  • iRite - for integrating WYSIWYG text editors into websites
  • Database Starter Kits - for both PHP and ASP

Each extension is installed individually within the Dreamweaver extension manager, and is accessed via the WebAssist toolbar added to Dreamweaver. The real value of the Web Developer Suite lies in the ability to code advanced website function in a fraction of the time it would take to hand code. Each extension operates from a wizard-like interface that clearly walks you through the steps needed to configure your task.

DataAssist creates complete database administration page sets with a few clicks of the mouse. Automatically generate web pages that add, delete, update, view or search your database. If you use Dreamweaver templates, DataAssist allows you to use your site template when generating pages. The resulting pages flow seamlessly into your website and are fully customizable via CSS.

SecurityAssist generates all the pages and code needed to create secure user registration and log in pages for your site. It teams up with Cookies Toolkit to utilize cookies and session variables to prevent unauthorized access to any pages you wish to restrict on your website.

If you need a Dreamweaver extension to control digital file upload and download, Digital File Pro is the extension of choice. Through a wizard-like interface, you can easily enable database file upload and download through your website. It's an excellent tool for webmasters who provide digital files such as MP3s, e-books, PDFs, images, photos, videos and any other type of downloadable file format.

Web Developer Suite also includes Universal Email, which is an extremely handy extension for emailing form input from your website. Universal Email even operates without a database, so it makes a great tool for emailing website contact form submissions. Emails can be formatted as text or HTML, and Universal Email includes a WYSIWYG HTML editor for creating your HTML email messages.

Pro Maps for Google inserts static or dynamic Google maps into your website. Addresses can be entered manually, from a file or even from your database recordset. The Google map API is fully configurable, with custom pointers, map controls and size. It's an excellent extension for inserting maps into dynamic websites.

Web Developer Suite also includes Validation Toolkit, which is WebAssist's form validation extension. Validate your form input client-side or server-side with a wide assortment of validation rules. By controlling form data input on your website, you can help reduce spam submissions and protect the integrity of your data.

The final Dreamweaver extension included in the Web Developer Suite is WebAssist's WYSIWYG form field text editor, iRite. Based on the popular FCKeditor, iRite allows you to insert a text editor in a Dreamweaver form for inputting valid XHTML code without needing any knowledge of HTML. iRite is a great extension for developing custom content management systems or just a simple way for clients to keep their own websites updated.

Web Developer Suite from WebAssist is an excellent addition to anyone's Dreamweaver toolbox. The cost of Web Developer Suite is a steal for the enormous amount of website function that is packaged in the bundle. Web designers can offer much greater website functionality to their clients and recoup the cost of the extensions in one project. There is no restriction on the number of sites you can build with Web Developer Suite, and no restrictive "per site" licensing. For web designers looking to push their websites to a new level, WebAssist Web Developer Suite is a must-have Dreamweaver add-on.

Read more about Web Developer Suite or find more Dreamweaver extensions such as WebAssist Super Suite, Web Designer Suite and Adobe Dreamweaver Developer Toolbox at JustDreamweaver.com, your source for Dreamweaver extensions, tutorials, Dreamweaver books and videos, extension reviews and more.

 


Page Titles and Meta Tags

Page titles

To help obtain high page rankings with search engines, the contents of your page title are one of the most important things that need to be dealt with. The page title is the first amount of information provided to a search engine describing the contents of the page. You should also be aware that the page title provides information about the contents not only to search engines, but to visitors as well. The page title will show up at the top of the browser window. Your page title should include your keywords and should be no longer than 60 characters long. If it is too long, your visitor will only see the first part. An easy way to figure out the length of a page title is to type it into a word processor that contains a word count feature. Since your page title needs to be a certain length, it is important to make the best use of the space, and although some words that are not key, will use up that valuable space, the title itself still needs to make sense. A keyword in your title can be repeated, but having the same words more than two times is not recommended. Compare your page title to others and see what makes their content look appealing enough to catch a potential visitor's eyes. Your page title needs to stand out between the other nine titles on the search engine results page. As you design your site, remember the fact that visitors may be directed to somewhere other than the homepage because the search engine believes it is the best match for a keyword. With this in mind, all pages of your website should be considered unique and have their own title.

Meta tags

For your site to be effective, you need to develop Meta tags. These tags are a site description and a keyword list. It is important to note that not all search engines use these Meta tags. Starting with your home page, you will need to insert two Meta tags. The first is a Meta description sentence and the second is a Meta keyword list. The information you put here is for search engines to use when they review your site. This review process is known as crawling and is done with a program called a spider or robot. The description tag serves two purposes. The spiders search it for keywords and it is also displayed to a surfer as they view search engine results. The information obtained by the spiders is kept in a database that is used when a person types in a query to a search engine. When you create your Meta keyword list, order them from the most relevant to the least. The first part of your list should contain the keywords that best describe your site and are unique enough that when someone does a search, there is not a large amount of competition to go up against. Make sure that all the keywords used in the description tags are again listed. The words at the end of your list are known as wildcards and include synonyms and words that could have been spelled wrong when someone was doing a search. During your Meta tag creation process, do not be afraid to go to other people's websites and see what they have used. Type in the same words you would like to include in your lists and see what the search engines display. This is a very good way to help determine your competition.

Pat L. started out creating a few niche sites and during that process gained huge amounts of knowledge in the website development process. You can visit http://www.abundantarticles.com for more information about developing and creating a website.

 


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