Seam’isms @RequestParameter

Seam has the notion of passing a Request Parameter to a class, but there’s a catch, depending on how things are being done (and there’s nothing to say I’m doing it right) @RequestParameter isn’t quite as flexible as I think it should be.

First you can’t set the parameter programmatically since the Request Parameter declared will always be set when hitting the page, whether it is passed or not. As an example, if you set the parameter via a setter method, the parameter will be reset to null if no parameter is passed via the URI overwriting the previous change. Not the use case I’m use to, it would be nice to have an option for RequestParameter to ignore the setter when no parameter is present. Something like:

@RequestParameter( ignoreifnull=true )

Leave a Reply