Can't deal with wicket atmosphere
I migrate my app from 5 to 6 and everything work fine. However i'm unable to try atmosphere due to network 500 server error Here is my configuration : FilterHolder atmosphere = new FilterHolder(AtmosphereFilter.class); atmosphere.setName(AtmosphereApplication); atmosphere.setClassName(org.atmosphere.cpr.AtmosphereFilter); atmosphere.setInitParameter(applicationClassName, com.mycompany.WicketApplication); atmosphere.setInitParameter(org.atmosphere.filter, org.apache.wicket.protocol.http.WicketFilter); atmosphere.setInitParameter(org.atmosphere.useWebSocket, true); atmosphere.setInitParameter(org.atmosphere.useNative, true); atmosphere.setInitParameter(org.atmosphere.cpr.CometSupport.maxInactiveActivity, 3); atmosphere.setInitParameter(filterMappingUrlPattern, /atmosphere/*); atmosphere.setInitParameter(org.atmosphere.websocket.WebSocketProtocol, org.atmosphere.websocket.protocol.EchoProtocol); bb.addFilter(atmosphere, /atmosphere/*, 0); FilterHolder wicket = new FilterHolder(org.apache.wicket.protocol.http.WicketFilter.class); wicket.setName(wicket.csstest); wicket.setClassName(org.apache.wicket.protocol.http.WicketFilter); wicket.setInitParameter(applicationClassName, com.mycompany.WicketApplication); wicket.setInitParameter(WicketFilter.FILTER_MAPPING_PARAM, /*); bb.addFilter(wicket, /*, 1); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Can-t-deal-with-wicket-atmosphere-tp4649792.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Back button is troubling session management...
Hi, After I log in that application, I am not suppose to see login page of the app when I press back button. Though I am not able to go to login url as I am checking user session in login page and redirects him to home page if the session is present. But, when back button is pressed, that logic is skipped and login pageis displayed. How to handle this issue? How can I reload login page after pressing back button? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Back-button-is-troubling-session-management-tp4649793.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Ajax refresh not working in a case .... while working in similar other cases!!!
Hi, I am trying to refresh ajax container after firing an event. The code is: *final WebMarkupContainer searchContainer = new WebMarkupContainer( searchContainer); searchContainer.setOutputMarkupId(true);* AjaxFallbackButton ajaxSearchButton = new AjaxFallbackButton( searchButton, searchForm) { @Override public void onSubmit(AjaxRequestTarget target, final Form? form) { if (target != null) { try { // some actions... } catch (Exception exception) { } *target.add(searchContainer);* } } } Label userLabel = new Label(userLabel, List of Users); Label numberOfUserLabel = new Label(numberOfUserLabel, new Integer( numberOfUsers).toString()); final PageableListViewUserDomain userDomainListView = new PageableListViewUserDomain( user, userDomainList, resultsPerPage) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItemUserDomain listItem) { // populating list } }; * userDomainListView.setVisible(!userDomainList.isEmpty()); userLabel.setVisible(!userDomainList.isEmpty()); numberOfUserLabel.setVisible(!userDomainList.isEmpty()); searchContainer.add(userLabel); searchContainer.add(userDomainListView); searchContainer.add(numberOfUserLabel); * But the list view is not getting refreshed? I am using the same technique in other pages and it is working.. what be the reason..?? Any suggestion can work for me... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh not working in a case .... while working in similar other cases!!!
Did you look at wicket ajax debugin browser? It usually gives quite good clues about what's missing ... 2012/6/9 kshitiz k.agarw...@gmail.com: Hi, I am trying to refresh ajax container after firing an event. The code is: *final WebMarkupContainer searchContainer = new WebMarkupContainer( searchContainer); searchContainer.setOutputMarkupId(true);* AjaxFallbackButton ajaxSearchButton = new AjaxFallbackButton( searchButton, searchForm) { @Override public void onSubmit(AjaxRequestTarget target, final Form? form) { if (target != null) { try { // some actions... } catch (Exception exception) { } *target.add(searchContainer);* } } } Label userLabel = new Label(userLabel, List of Users); Label numberOfUserLabel = new Label(numberOfUserLabel, new Integer( numberOfUsers).toString()); final PageableListViewUserDomain userDomainListView = new PageableListViewUserDomain( user, userDomainList, resultsPerPage) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItemUserDomain listItem) { // populating list } }; * userDomainListView.setVisible(!userDomainList.isEmpty()); userLabel.setVisible(!userDomainList.isEmpty()); numberOfUserLabel.setVisible(!userDomainList.isEmpty()); searchContainer.add(userLabel); searchContainer.add(userDomainListView); searchContainer.add(numberOfUserLabel); * But the list view is not getting refreshed? I am using the same technique in other pages and it is working.. what be the reason..?? Any suggestion can work for me... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
setHeaders not working in 1.5
Hi, I want to remove login page from browser cache after user logs in. I am using the code : protected void setHeaders(WebResponse response) { *response.setHeader(Pragma, no-cache); response.setHeader(Expires, 0); response.setHeader(Cache-Control, no-cache, max-age=0, must-revalidate, no-store);* } But it is not working. *Even I have tried the changes given in * https://cwiki.apache.org/WICKET/caching-in-wicket-15.html *https://cwiki.apache.org/WICKET/caching-in-wicket-15.html* What I am missing?? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setHeaders-not-working-in-1-5-tp4649796.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh not working in a case .... while working in similar other cases!!!
I have never tried out that beforeI have enabled debug mode but I to debug the ajax part? Can you please tell me ?? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794p4649797.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh not working in a case .... while working in similar other cases!!!
Ajax debug is a small hover window visible in browser when you have application configuration in development mode. ** Martin 2012/6/9 kshitiz k.agarw...@gmail.com: I have never tried out that beforeI have enabled debug mode but I to debug the ajax part? Can you please tell me ?? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794p4649797.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh not working in a case .... while working in similar other cases!!!
I got the problem atleast...what is happening that it is using the same search object (where results are being stored and then displayed in container) and not creating the new one for new searches. Actually what I want is when user searches anything, the results are refreshed only. I am storing the results in an object and displaying them using listview which is again a part of container. Can you suggest me anything out here? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794p4649799.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh not working in a case .... while working in similar other cases!!!
Listview has this parameter reuseitems, if you set it to false it will rebuild when its container is refreshed. 2012/6/9 kshitiz k.agarw...@gmail.com: I got the problem atleast...what is happening that it is using the same search object (where results are being stored and then displayed in container) and not creating the new one for new searches. Actually what I want is when user searches anything, the results are refreshed only. I am storing the results in an object and displaying them using listview which is again a part of container. Can you suggest me anything out here? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794p4649799.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Back button is troubling session management...
Hi, where did you pu the logic to check if user has already signed in (onInitialize, onBeforeRender, etc...)? Could you show your code? Hi, After I log in that application, I am not suppose to see login page of the app when I press back button. Though I am not able to go to login url as I am checking user session in login page and redirects him to home page if the session is present. But, when back button is pressed, that logic is skipped and login pageis displayed. How to handle this issue? How can I reload login page after pressing back button? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Back-button-is-troubling-session-management-tp4649793.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh not working in a case .... while working in similar other cases!!!
Okk...actually when I analysed more, what I found is that when I enter new value in text field, the event takes the old value only. Even I am now refreshing the form too. Then I found that the field sets its value to old one after getting refreshed. My field is of final type. But that should not be the problem as I am using the same technique in other pages too... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794p4649802.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh not working in a case .... while working in similar other cases!!!
clearinput can be used with forms when submit is not done but model is changed ** Martin 2012/6/9 kshitiz k.agarw...@gmail.com: Okk...actually when I analysed more, what I found is that when I enter new value in text field, the event takes the old value only. Even I am now refreshing the form too. Then I found that the field sets its value to old one after getting refreshed. My field is of final type. But that should not be the problem as I am using the same technique in other pages too... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794p4649802.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Back button is troubling session management...
Hi, My code to check user session is: if (UserSession.get().checkUserSession()) { // redirecting user to home page setResponsePage(Home.class, new PageParameters()); } * UserSession is* public class UserSession extends WebSession { /** * */ private static final long serialVersionUID = 1L; public UserSession(Request request) { super(request); // TODO Auto-generated constructor stub } private Object myObject; // if you use java = 1.5 you can make use of covariant return types public static UserSession get() { return (UserSession)Session.get(); } public boolean checkUserSession() { if(myObject==null) return false; else return true; } public void logout() { get().invalidate(); myObject = null; } public Object getMyObject() { return myObject; } public void setMyObject(Object myObject) { this.myObject = myObject; } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Back-button-is-troubling-session-management-tp4649801p4649804.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Back button is troubling session management...
I used the same logic in onBeforeRender and it is working... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Back-button-is-troubling-session-management-tp4649801p4649805.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax refresh not working in a case .... while working in similar other cases!!!
I am able to solve this field related problem...just container is not getting refreshed... here is the code, I have modified a bit as per requirement: public Search(String id) { searchContainer.add(searchForm); searchContainer.add(new SearchResultPanel(searchResultPanel, searchDomain, error, searchContainer)); add(searchContainer); } public SearchResultPanel(String id, SearchDomain searchDomain, final WebMarkupContainer searchContainer) { super(id); ListUserDomain userDomainList = new ArrayListUserDomain(); ListOrganizationDomain organizationDomainList = new ArrayListOrganizationDomain(); userDomainList = searchDomain.getUserDomainList(); organizationDomainList = searchDomain.getOrganizationDomainList(); int numberOfUsers = searchDomain.getNumberOfUsers(); Label userLabel = new Label(userLabel, List of Users); Label numberOfUserLabel = new Label(numberOfUserLabel, new Integer( numberOfUsers).toString()); final PageableListViewUserDomain userDomainListView = new PageableListViewUserDomain( user, userDomainList, resultsPerPage) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItemUserDomain listItem) { String name = ((UserDomain) listItem.getModelObject()) .getName(); Label userName = new Label(userName, name); listItem.add(userName); } }; userDomainListView.setVisible(!userDomainList.isEmpty()); userLabel.setVisible(!userDomainList.isEmpty()); numberOfUserLabel.setVisible(!userDomainList.isEmpty()); add(userLabel); add(userDomainListView); add(numberOfUserLabel); int numberOfOrganization = searchDomain.getNumberOfOrganizations(); Label organizationLabel = new Label(organizationLabel, List of Organizations); Label numberOfOrganizationLabel = new Label( numberOfOrganizationLabel, new Integer(numberOfOrganization).toString()); final ListViewOrganizationDomain organizationDomainListView = new ListViewOrganizationDomain( organization, organizationDomainList) { private static final long serialVersionUID = 1L; @Override protected void populateItem( final ListItemOrganizationDomain listItem) { String organization = ((OrganizationDomain) listItem .getModelObject()).getOrganization(); Label organizationName = new Label(organizationName, organization); listItem.add(organizationName); } }; organizationDomainListView .setVisible(!organizationDomainList.isEmpty()); organizationLabel.setVisible(!organizationDomainList.isEmpty()); numberOfOrganizationLabel.setVisible(!organizationDomainList.isEmpty()); add(organizationLabel); add(organizationDomainListView); add(numberOfOrganizationLabel); add(new AjaxPagingNavigator(navigator, userDomainListView) { /** * */ private static final long serialVersionUID = 1L; @Override protected void onAjaxEvent(AjaxRequestTarget target) { target.addComponent(searchContainer); } }); } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-refresh-not-working-in-a-case-while-working-in-similar-other-cases-tp4649794p4649806.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Panel not getting refreshed...
Hi, It's to late to have searchResultPanel.setOutputMarkupId(true); in onSubmit() You need to set this before the first rendering, because ajax need it in order to know how to re-redner the panel. Regards, Sebastien. On Sat, Jun 9, 2012 at 9:56 PM, kshitiz k.agarw...@gmail.com wrote: Hi, I want to refresh a panel : *public SearchResultPanel(String id, SearchDomain searchDomain, final WebMarkupContainer searchContainer) { *super(id); ListUserDomain userDomainList = new ArrayListUserDomain(); ListOrganizationDomain organizationDomainList = new ArrayListOrganizationDomain(); userDomainList = searchDomain.getUserDomainList(); organizationDomainList = searchDomain.getOrganizationDomainList(); int numberOfUsers = searchDomain.getNumberOfUsers(); Label userLabel = new Label(userLabel, List of Users); Label numberOfUserLabel = new Label(numberOfUserLabel, new Integer( numberOfUsers).toString()); final PageableListViewUserDomain userDomainListView = new PageableListViewUserDomain( user, userDomainList, resultsPerPage) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItemUserDomain listItem) { listItem.add(userName); } }; add(userLabel); add(userDomainListView); add(numberOfUserLabel); int numberOfOrganization = searchDomain.getNumberOfOrganizations(); Label organizationLabel = new Label(organizationLabel, List of Organizations); Label numberOfOrganizationLabel = new Label( numberOfOrganizationLabel, new Integer(numberOfOrganization).toString()); final ListViewOrganizationDomain organizationDomainListView = new ListViewOrganizationDomain( organization, organizationDomainList) { private static final long serialVersionUID = 1L; @Override protected void populateItem( final ListItemOrganizationDomain listItem) { } }; add(organizationLabel); add(organizationDomainListView); add(numberOfOrganizationLabel); add(new AjaxPagingNavigator(navigator, userDomainListView) { /** * */ private static final long serialVersionUID = 1L; @Override protected void onAjaxEvent(AjaxRequestTarget target) { target.addComponent(searchContainer); } }); } } I am refreshing it like this: AjaxFallbackButton ajaxSearchButton = new AjaxFallbackButton( searchButton, searchForm) { @Override public void onSubmit(AjaxRequestTarget target, final Form? form) { if (target != null) { try { searchResultPanel.setOutputMarkupId(true); target.add(searchResultPanel); } catch (Exception exception) { error(exception.getMessage()); error = true; } } } }; searchForm.add(ajaxSearchButton); searchContainer.add(searchForm); searchContainer.add(searchResultPanel); add(searchContainer); *But panel is not getting refreshed..what can be the problem?? Is it because I am passing searchDomain in panel class and forming 2 views from that object domain ??* -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panel-not-getting-refreshed-tp4649807.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Panel not getting refreshed...
re-redner re-render On Sat, Jun 9, 2012 at 10:01 PM, Sebastien seb...@gmail.com wrote: Hi, It's to late to have searchResultPanel.setOutputMarkupId(true); in onSubmit() You need to set this before the first rendering, because ajax need it in order to know how to re-redner the panel. Regards, Sebastien. On Sat, Jun 9, 2012 at 9:56 PM, kshitiz k.agarw...@gmail.com wrote: Hi, I want to refresh a panel : *public SearchResultPanel(String id, SearchDomain searchDomain, final WebMarkupContainer searchContainer) { *super(id); ListUserDomain userDomainList = new ArrayListUserDomain(); ListOrganizationDomain organizationDomainList = new ArrayListOrganizationDomain(); userDomainList = searchDomain.getUserDomainList(); organizationDomainList = searchDomain.getOrganizationDomainList(); int numberOfUsers = searchDomain.getNumberOfUsers(); Label userLabel = new Label(userLabel, List of Users); Label numberOfUserLabel = new Label(numberOfUserLabel, new Integer( numberOfUsers).toString()); final PageableListViewUserDomain userDomainListView = new PageableListViewUserDomain( user, userDomainList, resultsPerPage) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItemUserDomain listItem) { listItem.add(userName); } }; add(userLabel); add(userDomainListView); add(numberOfUserLabel); int numberOfOrganization = searchDomain.getNumberOfOrganizations(); Label organizationLabel = new Label(organizationLabel, List of Organizations); Label numberOfOrganizationLabel = new Label( numberOfOrganizationLabel, new Integer(numberOfOrganization).toString()); final ListViewOrganizationDomain organizationDomainListView = new ListViewOrganizationDomain( organization, organizationDomainList) { private static final long serialVersionUID = 1L; @Override protected void populateItem( final ListItemOrganizationDomain listItem) { } }; add(organizationLabel); add(organizationDomainListView); add(numberOfOrganizationLabel); add(new AjaxPagingNavigator(navigator, userDomainListView) { /** * */ private static final long serialVersionUID = 1L; @Override protected void onAjaxEvent(AjaxRequestTarget target) { target.addComponent(searchContainer); } }); } } I am refreshing it like this: AjaxFallbackButton ajaxSearchButton = new AjaxFallbackButton( searchButton, searchForm) { @Override public void onSubmit(AjaxRequestTarget target, final Form? form) { if (target != null) { try { searchResultPanel.setOutputMarkupId(true); target.add(searchResultPanel); } catch (Exception exception) { error(exception.getMessage()); error = true; } } } }; searchForm.add(ajaxSearchButton); searchContainer.add(searchForm); searchContainer.add(searchResultPanel); add(searchContainer); *But panel is not getting refreshed..what can be the problem?? Is it because I am passing searchDomain in panel class and forming 2 views from that object domain ??* -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panel-not-getting-refreshed-tp4649807.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org