On 03.Aug.2003 -- 10:53 PM, Ralph Goers wrote:
> I'm trying to write an Input Module but am a little unclear on where and how
> they get used.  Although I have seen several input modules that support
> wildcards, I can't find any examples that do that in the sitemap.  

These are AFAIR the request-param, request-attr, and session-attr
modules. Actually, this functionality is a concession to the original
database actions. (modules were created during an overhaul of the
database actions.) I believe it's not a very useful feature since it
mimics the getAttributeValues() functionality with several differently
named attributes instead of multiple attributes with the same name in
case of request parameters. There is a difference, though: This way
one can guarantee that multiple fields use the same ordering
e.g. firstname-1:peter, firstname-2:paul, lastname-1:smith,
lastname-2:baker while firstname:{peter,paul} lastname:{smith,baker}
it is not clear that the ordering is correct.

> What would happen if I coded <map:parameter name="*"
> value="{request-param:*}"/> in the sitemap?

You'll get a parameter named "*" with the some request parameter. The
actual value depends on the names of the request parameters and might
be the empty string.

> getAttributeNames() doesn't take a name parameter, so if I specify
> {request:a*} how is the list limited - or does it always call
> getAttributeValues()?  This is of some concern to me because my input module

It does.

> should never return the full list of elements (that could be huge), so I
> expect that getAttributeNames() will have to return an empty Iterator.

getAttributeNames will return an iterator over all attribute
names. This contract is somewhat weak: jxpath based modules for
example return only a subset of available attribute names.

> What other components might call an input module to get a list of
> attributes? 

No idea. All of them might -- IIRC there's one meta module that
creates a XML representation of the available attributes.

        Chris.
-- 
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to