request.setAttribute("websiteModel", new DomainAdminAction.DomainAdminEditPageModel( "domainWebsiteAdminEdit.title", request, response, mapping, dd));
          if (request.getAttribute("websiteModel") == null) {
              request.setAttribute("websiteModel", actionForm);
          }

I am sorry, but this is the code I am trying to compile, but getting compile error as shown below.

Shervin Asgari wrote:
Hello all! This is an important question and I think this is a feature which isn't supported in Struts.

I have to actionform classes with two pagemodels inner classes. Lets say We have action class X and actionclass Y with the pagemodel X:A and Y:B

To go from X to Y actionclass is no problem, but when I suddenly want to go from Y to X I cannot.

I want to set some values in the basemodel inner class of actionclass X from the actionclass Y, with this code:

request.setAttribute("websiteModel", new DomainAdminAction.DomainAdminEditPageModel( "domainWebsiteAdminEdit.title", request, response, mapping, dd));
           if (request.getAttribute("domainWebsiteModel") == null) {
               request.setAttribute("domainWebsiteModel", actionForm);
           }

I get this compile error:
No enclosing instance of type DomainAdminAction is accessible. Must
qualify the allocation with an enclosing instance of type
DomainAdminAction (e.g. x.new A() where x is an instance of
DomainAdminAction).

What I want to do is insert the object 'dd' to the pagemodel, because the jsp site I want to go to require the 'dd' object.

Shervin


Reply via email to