6 Replies Latest reply on Jan 8, 2008 1:25 PM by dsleeper

    UrlRewrite problem 3.1.3

    Magnus Byrkjeflot Newbie

      Hello.

      Just downloaded the latest 3.1.3 GA and tried using it in my project. I've been using 3.1.2SP1 until now.

      Seems there is a problem with the javascript "actionUrl" parameters not being url rewritten as before. I'm using the UrlRewrite library and all has worked ok until now. All other URL's are fine (form, link), but the page crashes on reRender because of the "actionUrl" javascript parameters.

      magbyr...

        • 1. Re: UrlRewrite problem 3.1.3
          Alexander Smirnov Master

          For a compability with a portal environment, AJAX action url have a additional parameter ( directLink=true ) now, as a signal to a portal engine do not convert this url to a portal.
          Can you provide such parts of the generated html for a Richfaces 3.1.2 and 3.1.3 ?

          • 2. Re: UrlRewrite problem 3.1.3
            Magnus Byrkjeflot Newbie

            Yes. Below is the source of a button that is working.

            <a style="float: left;" class="Btn2" onclick="A4J.AJAX.Submit('_viewRoot','editform',event,{'parameters':{'editform:_id76':'editform:_id76'} ,'actionUrl':'/user/magbyr/order/editorder.jsf'} );return false;" name="editform:_id76" id="editform:_id76" href="#">Add</a>


            Here the 'actionUrl' parameter is rewritten with the right outbound URL of "/user/magbyr/order/editorder.jsf". In 3.1.3 this parameter is not rewritten, and therefore "/user/order/editorder.jsf".

            The UrlRewrite library changes the way response.encodeURL() behaves. Seems like the 'actionUrl' parameter is not encoded with this method but all other url's are. Form action's and direct links are ok.

            • 4. Re: UrlRewrite problem 3.1.3
              Magnus Byrkjeflot Newbie

              Div with a4j:support tag in 3.1.2SP1:

              <div style="width: 100%; height: 100%;" onclick="A4J.AJAX.Submit('_viewRoot','diaryForm',event,{'oncomplete':function(request,event,data){Position.clone($('day8'), $('diaryForm:eventPanelContainer'), {setWidth: false, setHeight: false}); $('diaryForm:eventPanelContainer').show();},'parameters':{'addEventDateLong':'1199746800000','diaryForm:_id159:1:_id161:1:_id175':'diaryForm:_id159:1:_id161:1:_id175'} ,'actionUrl':'/user/magbyr/diary.jsf'} )"> </div>


              Same div in 3.1.3GA:

              <div style="width: 100%; height: 100%;" onclick="A4J.AJAX.Submit('_viewRoot','diaryForm',event,{'oncomplete':function(request,event,data){Position.clone($('day8'), $('diaryForm:eventPanelContainer'), {setWidth: false, setHeight: false}); $('diaryForm:eventPanelContainer').show();},'parameters':{'addEventDateLong':'1199746800000','diaryForm:_id159:1:_id161:1:_id175':'diaryForm:_id159:1:_id161:1:_id175'} ,'actionUrl':'/user/diary.jsf?javax.portlet.faces.DirectLink=true'} )"> </div>


              In the latest case the 'actionUrl' parameter is not being encoded with response.encodeURL (inserting the current navigating user's name) like in 3.1.2... This makes exceptions on my side...

              • 5. Re: UrlRewrite problem 3.1.3
                Magnus Byrkjeflot Newbie

                Is there any quick fix for this issue, or should I file a bug report?

                I'm not able to upgrade to latest version, and I just hope this could be fixed in some later version...

                • 6. Re: UrlRewrite problem 3.1.3
                  dsleeper Newbie

                  I am having the same problem.

                  Is there a possible fix to this issue?