cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject CForms: some renamings on the Widget interface
Date Mon, 13 Jun 2005 18:31:40 GMT
[repost as the original seems to have been lost]

Hi all,

As part of the stabilization work on CForms, there are a couple of 
changes I'd like to do on the naming-related methods of the Widget 

Today we have:
- getId() which returns the local name of widget.
- getRequestParameterName() which returns the combination of the parent 
widgdet's requestParameterName with the local name.

Working with advanced templates and Ajax stuff, I find these names 
increasingly annoying and confusing:
- each widget produces an HTML element with an "id" attribute filled 
with getRequestParameterName(), and not getId()!
- this getRequestParameterName is really tooooo long to type, especially 
in templates where we have no IDE autocompletion.

Ideally, I'd like to do the following renaming:
- getId() --> getName()
- getRequestParameterName() --> getId()
But since the meaning of getId() changes, this is likely to cause weird 
things in existing code.

So I propose the following:
- getId() --> getName()
- getRequestParameterName() --> getFullId()
- deprecate and remove later getId() and getRequestParameterName().

Once getId() will have been removed for some time, we'll be able to 
reintroduce it as an equivalent to getFullId().



Sylvain Wallez                        Anyware Technologies  
Apache Software Foundation Member     Research & Technology Director

View raw message