Re: View references

"Simen Brekken" <[email protected]>
Newsgroups gmane.comp.web.maverick.general
Message-ID <001b01c2f7ce$6ca4ab90$0200000a@moonraker>
MessageI have to agree with you after all, especially after I started fiddeling with the config transform step, it's incredibly powerful for large applications where common sequences of controllers acting on one Model & Form repeat itself. Like CMS systems for example.

  ----- Original Message ----- 
  From: jim moore 
  To: [email protected] 
  Sent: Monday, March 31, 2003 11:26 PM
  Subject: Re: [Mav-user] View references


  i agree. i'm -1 on this as well.

  --jim
    ----- Original Message ----- 
    From: Schnitzer, Jeff 
    To: [email protected] 
    Sent: Monday, March 31, 2003 4:03 PM
    Subject: RE: [Mav-user] View references


    Maverick 1.0 worked this way - global views did not need to be explicitly referenced in the commands.  This resulted in several questions a month on the mailing list from newbies trying to figure out why their application didn't work when they did this:



    <command name="blah">

      <controller class="blah.Blah"/>

      <view path="blah.jsp"/>

    </command>



    People get used to leaving the view name off when there is only one view listed, even if you need to be able to reference one of the globals.  I even found myself making this mistake a few times.  After some debate, we changed this behavior in Maverick 2.0, and since then this problem has not come up again.



    I'm -1 on changing this behavior.  It's not that much more typing.  If you really want to minimize the config file, the transformation facility offers a much more elegant solution.



    Jeff Schnitzer

    [email protected]



    -----Original Message-----
    From: Taavi Tiirik [mailto:[email protected]] 
    Sent: Monday, March 31, 2003 3:45 AM
    To: [email protected]
    Subject: Re: [Mav-user] View references



    Simen,



    This is my maverick.xsl file that adds a view named "authentication" to every protected command.



    <command name="..." protected="true">

       ...

    </command>



    But yes, i think it would make sense to modify view lookup code to search from amongst global view definitions as well. Would it break anything?



    with best wishes,

    Taavi



      ----- Original Message ----- 

      From: jim moore 

      To: [email protected] 

      Sent: Sunday, March 30, 2003 9:30 PM

      Subject: RE: [Mav-user] View references



      if you want behavior where the global views are referenced by all commands, you can use a transformation on maverick.xml. if specified, maverick will run maverick.xml through an xsl before loading it. This xsl could easily copy all global views for you under each command. actually--this has come up so often on this list that someone may have already written an xsl to do this.



      --jim
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.