You can set grailsContext.useWrapper = useWrapperArg here, so that you don't have to test for it later.