struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yasserzamani <...@git.apache.org>
Subject [GitHub] struts pull request #118: [WW-4105] OgnlUtil improved in order to only setti...
Date Wed, 15 Feb 2017 14:16:22 GMT
Github user yasserzamani commented on a diff in the pull request:

    https://github.com/apache/struts/pull/118#discussion_r101285251
  
    --- Diff: core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java
---
    @@ -160,7 +160,20 @@ private void copyStack(ActionInvocation invocation, CompoundRoot
root) {
             Map<String, Object> ctxMap = invocation.getInvocationContext().getContextMap();
             for (Object object : list) {
                 if (shouldCopy(object)) {
    -                reflectionProvider.copy(object, invocation.getAction(), ctxMap, prepareExcludes(),
includes);
    +                String actionConfigClassName = invocation.getProxy().getConfig().getClassName();
    --- End diff --
    
    @lukaszlenart , I study a lot but, while user can equip any custom `ObjectFactory` to
create actions (here user has many options like spring aop, javassist, jdk, cglib or any other
library), it seems there is no way to determine which properties to set and which should be
skipped **except asking from user itself**.
    
    While there are `includes` and `excludes` available for user, but for save user from a
lot of typing and also more readability, **what do you think about featuring a new optional
parameter named `editableClass` like below?**
    ```xml
    <result type="chain">
        <param name="actionName">myOriginalAction</param>
        <param name="editableClass">me.myname.myactions.MyOriginalAction</param>
    </result>
    ```
    or
    ```xml
    <interceptor-ref name="chainStack">
        <param name="chain.editableClass">me.myname.myactions.MyOriginalAction</param>
    </interceptor-ref>
    ```
    After this featuring, rest of codes of this PR will work and fixes issue in a clean gracefully
way.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message