this is good news roger

//assume i have this ParentPackage annotation declaration

package org.apache.struts2.convention.actions.parentpackage;
import org.apache.struts2.convention.annotation.ParentPackage;
/**
 * <p>
 * This is a parent package usage action.
 * </p>
 */
@ParentPackage("class-level")
public class ClassLevelParentPackageAction {
    public String execute() {
        return null;
    }
}
//and here is testResultPath method which tests class-level assignment
    public void testResultPath() throws Exception {
        ServletContext context = mockServletContext("/class-level");
        // Test with a result path
        PackageConfig packageConfig = createPackageConfigBuilder("/namespace"); 
    
        this.conventionsService = new ConventionsServiceImpl("/not-used");
        DefaultResultMapBuilder builder = new DefaultResultMapBuilder(context, 
container, "dispatcher,velocity,freemarker");
        Map<String, ResultConfig> results = 
builder.build(ClassLevelResultPathAction.class, null, "action", packageConfig);

//the association between annotation value 'class-level', package and namespace 
are clear
        verify(context, "/class-level", results, false);
    }

//i notice this assignment in struts-plugin.xml for 
struts.convention.default.parent.package specifies convention-default
  <constant name="struts.convention.default.parent.package" 
value="convention-default"/>
//where convention-default is resolved as extending struts-default
  <package name="convention-default" extends="struts-default">

//i also notice if i specify ParentPackage package-level value i could resolve 
to a specific package of org.apache.struts2.convention.actions.parentpackage
@org.apache.struts2.convention.annotation.ParentPackage("package-level")
package org.apache.struts2.convention.actions.parentpackage;

//the question is which namespace is assigned for any value for ParentPackage
//ParentPackage("class-level") namespace?
//ParentPackage("package-level") namespace?
//ParentPackage("convention-default") namespace?

Thanks!
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Wed, 19 May 2010 02:30:31 -0700
> From: roger.var...@googlemail.com
> To: user@struts.apache.org
> Subject: Re: Interceptor stack
> 
> 
> 
> 
> Paweł Wielgus wrote:
> > 
> > Hi,
> > try to follow this example:
> > 
> > http://poulwiel.blogspot.com/2009/09/config-browser-plugin-in-struts2.html
> > 
> 
> I was using config-browser - that's how I knew the interceptor stack didn't
> contain my custom interceptors. In the end, I've solved it - I needed the
> @ParentPackage annotation on my actions and then my stack was the one that
> was being used.
> 
> Regards
> -- 
> View this message in context: 
> http://old.nabble.com/Interceptor-stack-tp28592300p28605946.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
                                          
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1

Reply via email to