cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: CForms: some renamings on the Widget interface
Date Wed, 15 Jun 2005 18:34:17 GMT
Sylvain Wallez wrote:
> 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 
> interface.
> 
> 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().

+1

In order to be consistent (and as already proposed from somebody else we change 
from <fd:widget id="foo"/> to <fd:widget name="foo"/>, right?

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Mime
View raw message