You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Pashkin A. (JIRA)" <ji...@apache.org> on 2010/03/07 19:45:27 UTC

[jira] Created: (WICKET-2769) Request + Ajax + Anchors

Request + Ajax + Anchors
------------------------

                 Key: WICKET-2769
                 URL: https://issues.apache.org/jira/browse/WICKET-2769
             Project: Wicket
          Issue Type: Improvement
            Reporter: Pashkin A.


Ajax requests can not be executed again usually by URL.

I mean that if you change something in html then you can not just copy url and repeat that using url.
But there is hack like anchor # or location.hash javascript. to make url like "http://localhost:8080/site/search?q=text#type=documents", instead of location.href, becuase it will be executed immediately.

The main IDEA:

Url with anchors will be sent to a server and if Wicket can use a correct parser to make pageParameters then you can take that parameter
and repeat that html on a page that is necessarily.

_______________________________________
That works in PHP and other languages. But in Java implementations of Servers - I could not find the way to get anchors parameters only an query string.

So 
1. Am I wrong that Java Web Servers can not do it?
2. I am right that need to correct Tomcat or another java web server.
3. If WebServer can do that Wicket sould be correct to get Anchor parameters from somehwere or make Strategy to get request parameters (PageParameters)

sorry if I send it to another place than I should.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2769) Request + Ajax + Anchors

Posted by "Pashkin A. (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845040#action_12845040 ] 

Pashkin A. commented on WICKET-2769:
------------------------------------

The problem of AJAX is when you try to give users links to show that information page which is necessary.
For instance: 
1. you have a page http://localhost/index.html
2. then an user click Ajax search button there
3. then some info is updated but URL in browser is old (http://localhost/index.html) and user can not send link to another user or save it.

To correct it you can try javascript to correct URL:

1. use location.href - but it does not work  because every Browser make new a redirect when you make set to there.
2. use anchors location.hash - when you do that you see url in browser like: http://localhost/index.html#q=trytosearchsometing

So use anchors can help to make ajax links - which can be saved and repeat the steps to reproduce necessary information in the page.

Question is how to get anchors info from Requests?

if is it easy you need to support it. or anyway need to support it.



> Request + Ajax + Anchors
> ------------------------
>
>                 Key: WICKET-2769
>                 URL: https://issues.apache.org/jira/browse/WICKET-2769
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Pashkin A.
>
> Ajax requests can not be executed again usually by URL.
> I mean that if you change something in html then you can not just copy url and repeat that using url.
> But there is hack like anchor # or location.hash javascript. to make url like "http://localhost:8080/site/search?q=text#type=documents", instead of location.href, becuase it will be executed immediately.
> The main IDEA:
> Url with anchors will be sent to a server and if Wicket can use a correct parser to make pageParameters then you can take that parameter
> and repeat that html on a page that is necessarily.
> _______________________________________
> That works in PHP and other languages. But in Java implementations of Servers - I could not find the way to get anchors parameters only an query string.
> So 
> 1. Am I wrong that Java Web Servers can not do it?
> 2. I am right that need to correct Tomcat or another java web server.
> 3. If WebServer can do that Wicket sould be correct to get Anchor parameters from somehwere or make Strategy to get request parameters (PageParameters)
> sorry if I send it to another place than I should.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2769) Request + Ajax + Anchors

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844838#action_12844838 ] 

Juergen Donnerstag commented on WICKET-2769:
--------------------------------------------

I'm not sure I understand your request. Could you please explain it again.

> Request + Ajax + Anchors
> ------------------------
>
>                 Key: WICKET-2769
>                 URL: https://issues.apache.org/jira/browse/WICKET-2769
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Pashkin A.
>
> Ajax requests can not be executed again usually by URL.
> I mean that if you change something in html then you can not just copy url and repeat that using url.
> But there is hack like anchor # or location.hash javascript. to make url like "http://localhost:8080/site/search?q=text#type=documents", instead of location.href, becuase it will be executed immediately.
> The main IDEA:
> Url with anchors will be sent to a server and if Wicket can use a correct parser to make pageParameters then you can take that parameter
> and repeat that html on a page that is necessarily.
> _______________________________________
> That works in PHP and other languages. But in Java implementations of Servers - I could not find the way to get anchors parameters only an query string.
> So 
> 1. Am I wrong that Java Web Servers can not do it?
> 2. I am right that need to correct Tomcat or another java web server.
> 3. If WebServer can do that Wicket sould be correct to get Anchor parameters from somehwere or make Strategy to get request parameters (PageParameters)
> sorry if I send it to another place than I should.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WICKET-2769) Request + Ajax + Anchors

Posted by "Pashkin A. (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845040#action_12845040 ] 

Pashkin A. edited comment on WICKET-2769 at 3/14/10 7:26 AM:
-------------------------------------------------------------

The problem of AJAX is when you try to give users links to show that information page which is necessary.
For instance: 
1. you have a page http://localhost/index.html
2. then an user click Ajax search button there
3. then some info is updated but URL in browser is an old (http://localhost/index.html) one and user can not send link to another user or save it.

To correct it you can try javascript to correct URL:

1. use location.href - but it does not work  because every Browser make a new redirect when you make set to there.
2. use anchors location.hash - when you do that you see url in browser like: http://localhost/index.html#q=trytosearchsometing

So use anchors can help to make ajax links - which can be saved and repeat the steps to reproduce necessary information in the page.

Question is how to get anchors info from Requests?

if is it easy you need to support it. or anyway need to support it.



      was (Author: kadkaz):
    The problem of AJAX is when you try to give users links to show that information page which is necessary.
For instance: 
1. you have a page http://localhost/index.html
2. then an user click Ajax search button there
3. then some info is updated but URL in browser is old (http://localhost/index.html) and user can not send link to another user or save it.

To correct it you can try javascript to correct URL:

1. use location.href - but it does not work  because every Browser make new a redirect when you make set to there.
2. use anchors location.hash - when you do that you see url in browser like: http://localhost/index.html#q=trytosearchsometing

So use anchors can help to make ajax links - which can be saved and repeat the steps to reproduce necessary information in the page.

Question is how to get anchors info from Requests?

if is it easy you need to support it. or anyway need to support it.


  
> Request + Ajax + Anchors
> ------------------------
>
>                 Key: WICKET-2769
>                 URL: https://issues.apache.org/jira/browse/WICKET-2769
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Pashkin A.
>
> Ajax requests can not be executed again usually by URL.
> I mean that if you change something in html then you can not just copy url and repeat that using url.
> But there is hack like anchor # or location.hash javascript. to make url like "http://localhost:8080/site/search?q=text#type=documents", instead of location.href, becuase it will be executed immediately.
> The main IDEA:
> Url with anchors will be sent to a server and if Wicket can use a correct parser to make pageParameters then you can take that parameter
> and repeat that html on a page that is necessarily.
> _______________________________________
> That works in PHP and other languages. But in Java implementations of Servers - I could not find the way to get anchors parameters only an query string.
> So 
> 1. Am I wrong that Java Web Servers can not do it?
> 2. I am right that need to correct Tomcat or another java web server.
> 3. If WebServer can do that Wicket sould be correct to get Anchor parameters from somehwere or make Strategy to get request parameters (PageParameters)
> sorry if I send it to another place than I should.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WICKET-2769) Request + Ajax + Anchors

Posted by "Pashkin A. (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pashkin A. closed WICKET-2769.
------------------------------

    Resolution: Later

It can be resolve like was suggested. but hope that functionality will add to wicket like Ajax functionality that an develoer does not think what to do in that case.

> Request + Ajax + Anchors
> ------------------------
>
>                 Key: WICKET-2769
>                 URL: https://issues.apache.org/jira/browse/WICKET-2769
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Pashkin A.
>
> Ajax requests can not be executed again usually by URL.
> I mean that if you change something in html then you can not just copy url and repeat that using url.
> But there is hack like anchor # or location.hash javascript. to make url like "http://localhost:8080/site/search?q=text#type=documents", instead of location.href, becuase it will be executed immediately.
> The main IDEA:
> Url with anchors will be sent to a server and if Wicket can use a correct parser to make pageParameters then you can take that parameter
> and repeat that html on a page that is necessarily.
> _______________________________________
> That works in PHP and other languages. But in Java implementations of Servers - I could not find the way to get anchors parameters only an query string.
> So 
> 1. Am I wrong that Java Web Servers can not do it?
> 2. I am right that need to correct Tomcat or another java web server.
> 3. If WebServer can do that Wicket sould be correct to get Anchor parameters from somehwere or make Strategy to get request parameters (PageParameters)
> sorry if I send it to another place than I should.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2769) Request + Ajax + Anchors

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845055#action_12845055 ] 

Martin Grigorov commented on WICKET-2769:
-----------------------------------------

As far as I know Java Servlet API doesn't provide access to the fragment part of the request URI (http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html#getRef()).

You may need to implement AjaxBehavior that will read the location.hash and send it back to the server. 
This is how Vaadin seems to work:  http://vaadin.com/book/-/page/advanced.urifu.html

The drawback is that the page will be loaded first and then part of it will be re-rendered (with the ajax response).

> Request + Ajax + Anchors
> ------------------------
>
>                 Key: WICKET-2769
>                 URL: https://issues.apache.org/jira/browse/WICKET-2769
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Pashkin A.
>
> Ajax requests can not be executed again usually by URL.
> I mean that if you change something in html then you can not just copy url and repeat that using url.
> But there is hack like anchor # or location.hash javascript. to make url like "http://localhost:8080/site/search?q=text#type=documents", instead of location.href, becuase it will be executed immediately.
> The main IDEA:
> Url with anchors will be sent to a server and if Wicket can use a correct parser to make pageParameters then you can take that parameter
> and repeat that html on a page that is necessarily.
> _______________________________________
> That works in PHP and other languages. But in Java implementations of Servers - I could not find the way to get anchors parameters only an query string.
> So 
> 1. Am I wrong that Java Web Servers can not do it?
> 2. I am right that need to correct Tomcat or another java web server.
> 3. If WebServer can do that Wicket sould be correct to get Anchor parameters from somehwere or make Strategy to get request parameters (PageParameters)
> sorry if I send it to another place than I should.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.