Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None

      Description

      Create ActionConfigs for Action class methods that do not already have aliases

      The initial "dynamic method invocation" implementation does not create an ActionConfig, but scans for a "!" and invokes the method directly. The implementation doesn't allow these alias methods to be browsed, overrridden with static actions, nor can they have their own validators, type convertors or resources.

      Rather than scan for dynamic method references at run time, an alternate approach would be to scan the configuration when it is first loaded and create ActionConfigs for all potential alias methods.

      See also http://www.mail-archive.com/dev%40struts.apache.org/msg25916.html

        Activity

        Hide
        Don Brown added a comment -

        To resolve this issue, we need to find a way to post-process a built configuration object, in order to scan for loaded action configs and build some more. The easiest solution would be to simply put the code in DefaultConfiguration. A close second would be to add a hook in the building of runtime configuration in DefaultConfiguration then subclass DefaultConfiguration for Struts, putting the code there. Another possibility would be to add a method to ConfigurationProvider so that a provider would have a chance at modifying the runtime configuration. Of the three, I like the second option.

        Show
        Don Brown added a comment - To resolve this issue, we need to find a way to post-process a built configuration object, in order to scan for loaded action configs and build some more. The easiest solution would be to simply put the code in DefaultConfiguration. A close second would be to add a hook in the building of runtime configuration in DefaultConfiguration then subclass DefaultConfiguration for Struts, putting the code there. Another possibility would be to add a method to ConfigurationProvider so that a provider would have a chance at modifying the runtime configuration. Of the three, I like the second option.
        Hide
        Ted Husted added a comment -

        Bumping issues to 2.1.x, except those that involve backward-compatability with Struts 1 or WebWork 2.

        Show
        Ted Husted added a comment - Bumping issues to 2.1.x, except those that involve backward-compatability with Struts 1 or WebWork 2.
        Hide
        Brian Pontarelli added a comment -

        If the post-processing has to know all of the already loaded configuration than the options you listed are the only ones. However, if it doesn't this can be handled by a custom ConfigurationProvider which can simply add the aliases.

        There is still one problem with configuration that I can't seem to find a way around. We need some mechanism for introducing new ConfigurationProviders and handling the configuration prior to the initialization process. I think that by fixing the configuration mechanism to have more lifecycle and for Struts to allow plug points at each stage we will effectively fix all of these issues.

        Perhaps a new enhancement or changing this one makes the most sense.

        Show
        Brian Pontarelli added a comment - If the post-processing has to know all of the already loaded configuration than the options you listed are the only ones. However, if it doesn't this can be handled by a custom ConfigurationProvider which can simply add the aliases. There is still one problem with configuration that I can't seem to find a way around. We need some mechanism for introducing new ConfigurationProviders and handling the configuration prior to the initialization process. I think that by fixing the configuration mechanism to have more lifecycle and for Struts to allow plug points at each stage we will effectively fix all of these issues. Perhaps a new enhancement or changing this one makes the most sense.
        Hide
        Don Brown added a comment -

        All the necessary hooks should now be in place, so we just need someone to make it happen.

        Show
        Don Brown added a comment - All the necessary hooks should now be in place, so we just need someone to make it happen.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ted Husted
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development