Click Framework  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: CLK-393
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Bob Schellink
Reporter: Bob Schellink
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Click

Improve Control resource deployment

Created: 13/Jun/08 03:43 AM   Updated: 01/Oct/08 10:49 PM
Component/s: core
Affects Version/s: 1.5 M2
Fix Version/s: 1.5 M2


 Description  « Hide
Currently Control resource deployment is a two step process:

#1 override onDeploy and copy the resources to the web folder
#2 register each Control that must deploy resources in click.xml

A disadvantage of this approach is that Controls must be instantiated to call their onDeploy method. This means that Context cannot be used in a Control constructor, without explicit checking for Context availability.

One of the side effects of module support (CLK-347) is that another option became available for deploying resources. This option is based upon convention. When creating a jar containing Click resources simply make the resources available under the folder 'META-INF/web' and Click will automatically copy all the resources to the application web folder. Click will keep the directory structure as defined under 'META-INF/web' when copying resources.

This makes the deployment a bit easier as everything is done in one step.

Using this approach there is also no need to instantiate Controls to invoke the deploy method. Thus Context can safely be used in a Control constructor.

 All   Comments   Change History      Sort Order:
Bob Schellink [16/Jul/08 06:51 AM]
Fix checked into trunk

Bob Schellink [17/Jul/08 09:05 PM]
Doco updated, will be available in 1.5-M2