sqlLookup

Description

Allows to fill a field with a selected item from sql request.

parameter

Name Mandatory Description
dbURL yes DB url.
dbDriver yes Driver.
dbLogin yes User login.
dbPassword yes User password.
dbQuery yes The query to do (SELECT ... FROM ...).
dbQueryParams no Parameters who replace '?'.
cols yes list of columns in the view.
hiddencols no list of hidden columns.
updates no list of attribute with attached to the column index.
hiddenupdates no list of attribute with a hidden-columns index.

example

<field attributeName="action" type="sqlLookup">
    <label language="FR">Action</label>
    <label language="EN">Action</label>

    <param name="dbURL">...</param>
    <param name="dbDriver">...</param>
    <param name="dbLogin">...</param>
    <param name="dbPassword">...</param>

    <param name="dbQuery">SELECT * FROM `tab` WHERE column='?' ...;</param>
    <param name="dbQueryParams">AttributeName1;...;...</param>

    <param name="cols">ColumnName1;ColumnName2;ColumnName3;...</param>
    <param name="hiddencols">ColumnName4;ColumnName5;ColumnName6;...</param>
    <param name="updates">AttributeName1=1;AttributeName2=3;AttributeName3=6;...</param>
    <param name="hiddenupdates">ObjectName1=1;ObjectName2=3;ObjectName3=6;...</param>
</field>


It would be nice if the SQLLookuo could reset dependent fields.

This will allow dependent lists.

--Eric Fesler, 21-Sep-2008

Attachments

SqlLookup_test.xml Info on SqlLookup_test.xml 2643 bytes
  Page Info My Prefs Log in
This page (revision-) last changed on 22:13 21-Sep-2008 by Eric Fesler.
 
  Page Info My Prefs Log in
This page (revision-) last changed on 22:13 21-Sep-2008 by Eric Fesler.
 

Referenced by
FormFieldComponents

JSPWiki v2.4.6-beta
[RSS]
<<May 2024
MonTueWedThuFriSatSun
293012345
6789101112
13141516171819
20212223242526
272829303112