Loading ...
Sorry, an error occurred while loading the content.

change to ? (was: a change to

Expand Messages
  • Sean Corfield
    ... (I already had the core of this post as a phone conversation with Christian but wanted to share some of my thoughts here with everyone else) Yes, my
    Message 1 of 40 , Dec 28, 2006
    • 0 Attachment
      On Dec 27, 2006, at 9:32 AM, Christian Ready wrote:
      > I like the approach of using <parameter> for <xfa>'s but I think
      > its fine to leave query strings in the <relocate> verb. My
      > reasoning is that you are relocating to a URL and URL's sometimes
      > have query strings in them.

      (I already had the core of this post as a phone conversation with
      Christian but wanted to share some of my thoughts here with everyone
      else)

      Yes, my approach here would be different to <xfa>.

      With <xfa>, I felt that adding URL parameters to the XFA value was
      just somehow "wrong" and discussions with several long-time
      Fuseboxers confirmed that sense (although most admitted they did it
      anyway). Hence was born the idea of strict mode making it illegal to
      add URL parameters to XFA values - strict mode is intended to be both
      a migration tool (highlighting deprecated features to encourage
      adopting new, better Fusebox practices) as well as simply preventing
      poor practice (and, again, encourage adopting better Fusebox practices).

      That meant that for <xfa> it was reasonable to have strict mode throw
      an exception for & in an XFA value. Also if you used the (new)
      <parameter> child tag, clearly you should get an exception for & in
      an XFA value.

      For <relocate> tho', URL parameters are much more common and there
      really isn't a "better" practice. But this is also ripe for adding
      <paramater> child tags - the presence of which *would* throw
      exceptions for & in the URL. There is a wrinkle, however, and that is
      when to add a ? to the URL.

      Consider:

      <relocate url="#myself##xfa.something#">
      <parameter name="id" value="#attributes.id#"/>
      </relocate>

      How would Fusebox know that the actual URL value already includes a ?
      in the expanded value?

      If there's no #..# then Fusebox can just inspect the value:

      <relocate url="http://google.com/?q=fusebox">
      <parameter name="id" value="#attributes.id#"/>
      </relocate>

      and also in this case it could figure out it needed to add the ? as
      well:

      <relocate url="http://google.com/">
      <parameter name="q" value="fusebox"/>
      <parameter name="id" value="#attributes.id#"/>
      </relocate>

      Thoughts? Comments?

      I'm leaning toward adding <parameter> to <relocate> for the general
      release of Fusebox 5.1 but I need feedback on the above issue first.

      Thanx,
      Sean A Corfield -- (904) 302-SEAN
      An Architect's View -- http://corfield.org/

      "If you're not annoying somebody, you're not really alive."
      -- Margaret Atwood
    • Sean Corfield
      ... Well, that s an interesting question. I considered using getBaseTemplate() but that doesn t help locate a path. Maybe listLast(getBaseTemplatePath(), / )
      Message 40 of 40 , Jan 17, 2007
      • 0 Attachment
        On Jan 17, 2007, at 8:57 PM, Barney Boisvert wrote:
        >>>> self - default "index.cfm"
        > I just noticed this. Shouldn't that use #listLast(cgi.script_name,
        > "/")# at the very least, or even #contextPath##cgi.script_name#, if
        > you wanted to go for broke. The latter probably doesn't work on
        > non-J2EE CFML runtimes though, right?

        Well, that's an interesting question.

        I considered using getBaseTemplate() but that doesn't help locate a
        path. Maybe listLast(getBaseTemplatePath(),"/") would work in most
        cases?

        I'd rather not rely on CGI variables (and I don't want to rely on
        getPageContext() stuff to get the context path for portability reasons).

        How many people actually use a 'self' value other than plain ol'
        index.cfm?

        Sean A Corfield -- (904) 302-SEAN
        An Architect's View -- http://corfield.org/

        "If you're not annoying somebody, you're not really alive."
        -- Margaret Atwood
      Your message has been successfully submitted and would be delivered to recipients shortly.