[ 
https://issues.apache.org/jira/browse/CLK-661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884893#action_12884893
 ] 

Bob Schellink commented on CLK-661:
-----------------------------------

The main goal of <pages> is to define a "set" consisting of {package, 
autobinding, automapping}, although automapping is of dubious use since 
defining a package implies automapping=true. I'm also not sure that autobinding 
should be switched on/off at the page level, instead if could be moved to the 
app level. In the XmlConfigService impl you'll note that the last autobinding 
setting overrides the others, so it is currently an application wide setting as 
well.

For automapping I'd imagine something like this:

protected void loadPagePackages() {
  boolean autobinding = false;

  addPagePackage("com.mycorp", autobinding);
}

or perhaps the more abstract version:

protected void loadAutoMapping() {
  addAutoMapping("com.mycorp", false);
}

Building the autoMapped pages can be done with:

protected void buildAutoMapping(Set<String> pagePackages) {
  ...
}

Btw I haven't looked at the code so there might be some pitfalls I'm 
overlooking.

> Add Java based configuration
> ----------------------------
>
>                 Key: CLK-661
>                 URL: https://issues.apache.org/jira/browse/CLK-661
>             Project: Click
>          Issue Type: Improvement
>            Reporter: Bob Schellink
>            Assignee: Finn Bock
>             Fix For: 2.3.0-M1
>
>         Attachments: abstract-config-service.patch, defaultconfigservice.patch
>
>
> click.xml has grown over the years especially since we introduced the service 
> based architecture. Some of the problems with xml based configurations is:
> - no compile time checking
> - no JavaDoc help in IDE
> I propose we add a new DefaultConfigService class that is Java based which 
> XmlConfigService extends from.
> Its advantages is the polar opposite of xml disadvantage:
> - compile time checking
> - JavaDoc help in IDE
> - More powerful configuration options, e.g. its possible to configure 
> FileUpload in ways not exposed by xml config. Also possible to create more 
> powerful algorithms e.g. which templates to include/exclude.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to