On Mon, Jan 18, 2010 at 09:25, Caleb James DeLisle
<[email protected]> wrote:
> Hello all,
>
> I am working on refactoring the registration page. I have a mockup which uses 
> the view
> action so that the register action is not needed, I'm not sure if it makes 
> more sense to
> remain a template or be moved to an application, any thoughts on this?
>
> There are a few apis which would make this job a lot easier and cleaner.
>
> I would like to provide Velocity access to ConfigurationSource. There would 
> be a
> configuration parameter which a list of configuration parameters that Velocity
> is allowed to read. I think it makes the most sense to add a 
> VelocityContextInitializer
> to the default Configuration implementation which injects a 
> ConfigurationSource wrapper.
> Perhaps name it $configurationsource

No one is supposed to directly use ConfigurationSource and instead
create MyCompnentConfiguration component with proper getters to cover
your needs that will take care of communicating with
ConfigurationSource component.

>
>
> Currently (in my mockup) there is no way to tell the guest who is registering 
> that their
> chosen user name is taken or is invalid if the captcha is wrong, this is 
> because the username
> is checked by $xwiki.createUser after the captcha is verified. If we add the 
> following two
> apis then all of the checking can be done on the Velocity side.
>
> $xwiki.isUsernameAvailable(String name)
> This will check if the name is the name of the superuser then check if a 
> document
> exists by that name. Should I be using an EntityReference? I lean toward 
> string because
> that is what the user types in.

Note that this kind of api is supposed to go in rightsmanager plugin
and not in $xwiki

>
> $util.compilePattern(String regex)
> Returns a Pattern or null if regex is invalid because Perl5Util methods all 
> throw
> exceptions which Velocity can't catch.
>
>
> I appreciate any thoughts/advice you have to offer.
>
> Thanks,
>
> Caleb
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to