13.07.2015 Views

IBM WebSphere Portlet Factory Overview - Lotus

IBM WebSphere Portlet Factory Overview - Lotus

IBM WebSphere Portlet Factory Overview - Lotus

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

I have a value that I want to translateinto a meaningful name. For example,instead of displaying the DepartmentCode, I want to display the DepartmentName.I have an edit form that allows users toselect a name (like Department Name),but I really need to save the associatedvalue (like Department Code).I want to populate my select list (orsimilar control) with a value that is notreturned from my database, such as ablank or an option such as “any.”The most common way to do this is byadding a Lookup Table builder to yourModel. The Lookup Table builder creates alookup table, which is used to translatebetween some computer-readable ID and ahuman-readable name, often the result of adatabase query. The table also caches theresults across different users, including theopportunity to prevent data from becomingstale. This builder:• Lets you access a data source byentering a SQL statement, pointing toan XML variable, or typing in someXML.• Adds to the query results anyname/value pairs you want to include inthe select list (for example, blank).• Creates methods that do the translationbetween name/value pairs.Next, add the relevant page control builderto your Model, pointing it at the LookupTable builder. Builders that work withLookup Table include Data Field Modifier,Select, Text, and Radio Button Group.You can also have the Rich Data Definitionbuilder (RDD) automatically create andapply a lookup table. This can beespecially useful if you use the same lookupnumerous times. See the help for RDD formore informationOne of the builders I used in my Modelgenerated a label that I do not like. I wantto shut off label generation.ORI want to provide my own label for thefield.Data Field ModifierData Field Modifier is a builder that is usefulfor a number of different tasks. Basically,this builder can be used to control the pageelements created by Data Page builder (aswell as the higher-level builders thatleverage Data Page).This builder lets you select one or morefields and one or more data types (likedouble, string, and so on). You can thenperform modifications including hiding,formatting, labeling, and determining thedisplay of child elements.Data Column Modifier and Rich DataDefinitionThese builders can be used to specify fieldlabels.<strong>WebSphere</strong> <strong>Portlet</strong> <strong>Factory</strong> V6.0.1 Getting Started Guide - 25 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!