You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2006/01/06 23:35:12 UTC

DO NOT REPLY [Bug 38168] New: - [shale] Add spring like syntax for loading clay configs from classpath

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38168>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38168

           Summary: [shale] Add spring like syntax for loading clay configs
                    from classpath
           Product: Struts
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Shale
        AssignedTo: dev@struts.apache.org
        ReportedBy: rwynn@us.ibm.com


Clay loads configuration files from the classpath if the value is prefixed 
with 'META-INF'

This enhancement requests that a spring like notation be used to load 
configurations from the classpath.

<context-param>
  <param-name>clay-config-files</param-name>
  <param-value>
	classpath*:/META-INF/classpath-config.xml
  </param-value>
</context-param>

This way configurations can be loaded from any package.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


DO NOT REPLY [Bug 38168] - [shale] Add spring like syntax for loading clay configs from classpath

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38168>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38168


gvanmatre@comcast.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From gvanmatre@comcast.net  2006-01-16 21:26 -------
This patch only focuses on Clay's configuration file loading.  We should 
consider more of a global strategy as a product of the WebWork merger.  The 
fix will be in the 20060117 shale nightly build.

Besides XML configuration files, HTML templates can be loaded from the class 
path using the same notation.

<tr jsfid="classpath*:org/apache/shale/clay/example/widgets.html" 
        label="First Name:" 
        property="firstName" size="20" maxlength="30" 
        required="true" immediate="false"/>


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


DO NOT REPLY [Bug 38168] - [shale] Add spring like syntax for loading clay configs from classpath

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38168>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38168





------- Additional Comments From craig.mcclanahan@sun.com  2006-01-08 23:26 -------
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > >  It's also friendly to be
> > >  "gratuitously compatible" with other popular frameworks :-).
> > You know me... I just want everything to match. :)  
> > Can the "given a delimited list of paths, return a list of (?) URLs" code be
> > moved somewhere it can be used by validation, dialogs, Clay, etc.?
> 
> I believe that they all have dependencies with core shale.  Maybe the 
> core "util" package would be a good place for this common code.
> 

If there are only one or two classes, that makes sense ... if there's more, then
we'll probably want a specialize subpackage for configuration resource support
... maybe "org.apache.shale.util.config" or something.

We'll also want to ensure that the reload-if-the-config-is-changed capability is
carried over into this.  WebWork has some generalized code for this sort of
thing that we should look at, too.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


DO NOT REPLY [Bug 38168] - [shale] Add spring like syntax for loading clay configs from classpath

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38168>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38168





------- Additional Comments From craig.mcclanahan@sun.com  2006-01-06 23:45 -------
Makes sense to me ... and we should support the same concept on the other places
that Shale loads configuration information (such as the dialogs support).


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


DO NOT REPLY [Bug 38168] - [shale] Add spring like syntax for loading clay configs from classpath

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38168>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38168





------- Additional Comments From wsmoak@apache.org  2006-01-07 00:21 -------
(In reply to comment #3)

>  It's also friendly to be
>  "gratuitously compatible" with other popular frameworks :-).

You know me... I just want everything to match. :)  

Can the "given a delimited list of paths, return a list of (?) URLs" code be
moved somewhere it can be used by validation, dialogs, Clay, etc.?


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


DO NOT REPLY [Bug 38168] - [shale] Add spring like syntax for loading clay configs from classpath

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38168>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38168





------- Additional Comments From gvanmatre@comcast.net  2006-01-07 04:48 -------
(In reply to comment #4)
> (In reply to comment #3)
> >  It's also friendly to be
> >  "gratuitously compatible" with other popular frameworks :-).
> You know me... I just want everything to match. :)  
> Can the "given a delimited list of paths, return a list of (?) URLs" code be
> moved somewhere it can be used by validation, dialogs, Clay, etc.?

I believe that they all have dependencies with core shale.  Maybe the 
core "util" package would be a good place for this common code.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


DO NOT REPLY [Bug 38168] - [shale] Add spring like syntax for loading clay configs from classpath

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38168>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38168





------- Additional Comments From wsmoak@apache.org  2006-01-06 23:50 -------
Is the prefix really necessary?  I haven't looked at the way Clay loads config
files, but I did just work on validation, which can load multiple files
configured like this:

    <!-- Shale Validator Configuration Resources -->
    <context-param>
       <param-name>org.apache.shale.validator.VALIDATOR_RULES</param-name>
       <param-value>
           /org/apache/shale/validator/validator-rules.xml,
           /WEB-INF/custom-rules.xml
       </param-value>
    </context-param>

The code (which came from the Struts Action ValidatorPlugin) is here:
<http://struts.apache.org/struts-shale/shale-core/xref/org/apache/shale/validator/CommonsValidator.html#359>

Does Clay allow multiple config files?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


DO NOT REPLY [Bug 38168] - [shale] Add spring like syntax for loading clay configs from classpath

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38168>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38168





------- Additional Comments From craig.mcclanahan@sun.com  2006-01-06 23:59 -------
(In reply to comment #2)
> Is the prefix really necessary? 

Necessary?  Probably not.  But there is some minor risk of ambiguity otherwise
(although not enough for me to -1 the idea).  It's also friendly to be
"gratuitously compatible" with other popular frameworks :-).



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org