Re: Decide if a page is expired or the user is inactive in AJAX settings?

2013-10-04 Thread Ernesto Reinaldo Barreiro
Use events to record user activity except for self AJAX updating events:
e.g create you own event that is generated for each user activity not
coming from self updating behaviors.


On Fri, Oct 4, 2013 at 8:51 PM, Behrooz Nobakht  wrote:

> Hello,
>
> Let's assume that I have a page that has a set of components. Many of the
> components use automatic AJAX update behavior to pull changes and refresh
> themselves in the page.
>
> Additionally, I use a custom version of AjaxSelfUpdatingBehavior in which
> if the page is not changed in a maximum timeout, it automatically displays
> a modal to the user and stops all the automatic AJAX updates of the
> components above.
>
> However, this approach has a bug: if the user continues to work on the same
> page and operates some AJAX actions, the expiration modal is displayed,
> however, logically, this should not happen because the user was active on
> the page but using the AJAX features. Notice, when the user works with one
> AJAX component, such activity is not visible to all the components and the
> behavior that controls expiration timeout.
>
> So, the general question is that how to detect if the user has been
> inactive on a page that uses components with AJAX self updating behavior?
> i.e. the page should be expired if *none* of the components and the page
> itself receive *no* activity from the user. Is there a standard Wicket way
> to do this?
>
> Thanks in advance for your discussions and ideas.
>
> Regards,
> Behrooz Nobakht
>



-- 
Regards - Ernesto Reinaldo Barreiro


Decide if a page is expired or the user is inactive in AJAX settings?

2013-10-04 Thread Behrooz Nobakht
Hello,

Let's assume that I have a page that has a set of components. Many of the
components use automatic AJAX update behavior to pull changes and refresh
themselves in the page.

Additionally, I use a custom version of AjaxSelfUpdatingBehavior in which
if the page is not changed in a maximum timeout, it automatically displays
a modal to the user and stops all the automatic AJAX updates of the
components above.

However, this approach has a bug: if the user continues to work on the same
page and operates some AJAX actions, the expiration modal is displayed,
however, logically, this should not happen because the user was active on
the page but using the AJAX features. Notice, when the user works with one
AJAX component, such activity is not visible to all the components and the
behavior that controls expiration timeout.

So, the general question is that how to detect if the user has been
inactive on a page that uses components with AJAX self updating behavior?
i.e. the page should be expired if *none* of the components and the page
itself receive *no* activity from the user. Is there a standard Wicket way
to do this?

Thanks in advance for your discussions and ideas.

Regards,
Behrooz Nobakht


Re: jquery.ui.calendar hiddenDays

2013-10-04 Thread Selom
Hello Sebastien,
You're absolutely right.

Je n'ai pas bien vu.
Shame on me   and Sorry. 

Thank you very much.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jquery-ui-calendar-hiddenDays-tp4661704p4661706.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: jquery.ui.calendar hiddenDays

2013-10-04 Thread Sebastien
Hi,

hiddenDays option is available since fullcalendar 1.6.2
http://arshaw.com/fullcalendar/docs/display/hiddenDays/

Latest wicket-jquery-ui-calendar release (6.11.0) is embedding fullcalendar
1.6.4

Announcement:
https://groups.google.com/forum/?fromgroups#!topic/wicket-jquery-ui/b6BK-U-tJ7w
Changelog:
https://github.com/sebfz1/wicket-jquery-ui/wiki/%5Bchangelog%5D-wicket-jquery-ui-6.11.0

Thanks & best regards,
Sebastien




On Fri, Oct 4, 2013 at 4:38 PM, Selom  wrote:

> Hi,
> For going forward with I  am  using  wicket-jqueryui
>   .
>
> I would like to hide some days in the calendar, setting like this :
> options.set("hiddenDays","[2,5]");
> But nothing happened.
> I noticed  also that there is no such *hiddenDays *in the
> *fullCalendar.min.js*
> fullCalendar v1.6.1
> Thank for your help.
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/jquery-ui-calendar-hiddenDays-tp4661704.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
>
>


jquery.ui.calendar hiddenDays

2013-10-04 Thread Selom
Hi,
For going forward with I  am  using  wicket-jqueryui
  .

I would like to hide some days in the calendar, setting like this : 
options.set("hiddenDays","[2,5]"); 
But nothing happened.
I noticed  also that there is no such *hiddenDays *in the
*fullCalendar.min.js*
fullCalendar v1.6.1
Thank for your help.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jquery-ui-calendar-hiddenDays-tp4661704.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: PagingNavigator inside repeater

2013-10-04 Thread frasese
Tested and working...

Thanks a lot



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PagingNavigator-inside-repeater-tp4661701p4661703.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: PagingNavigator inside repeater

2013-10-04 Thread Martin Grigorov
Hi,


On Fri, Oct 4, 2013 at 1:05 PM, Francisco Saez  wrote:

> Hi all,
>
> I have a list of elements wich a sub-list of elements for each of them.
> For example:
> * Category 1
>- Element 1.1
>- Element 1.2
> *Category 2
>- Element 2.1
>- Elemnt 2.2
>
> I have no problmes when I try to paginate the root list of elements (in
> the example, categories). But when I try to paginate each sub-list I have
> some problems. Links appear with correct page number, but nothing happen
> when I click they.
>
> I've tried with PaginNavigator and also with AjaxPagingNavigartor (with a
> WebMarkupContainer). Here is the code:
>
> 
> Category title
>
> 
> 
> 
>
>  Test Name
>
> 
> 
>
> 
> 
> 
>
> 
>
> -
>
> final HashMap> achievementsMap =
> projectLogic.getAchievements();
>
> PageableListView categoriesListView = new
> PageableListView("categories", projectLogic.getCategories(), 5) {
>
> @Override
> protected void populateItem(ListItem item) {
> final Category category = (Category) item.getModelObject();
>
> //title
> item.add(new Label("cat_title", category.getDescription()));
>
> WebMarkupContainer wmc = new WebMarkupContainer("container");
> item.add(wmc);
>
> //achievements list
> PageableListView achievementsListView = new
> PageableListView("achievements",
> achievementsMap.get(category.getId()), 5) {
>
> @Override
> protected void populateItem(ListItem item) {
> final Achievement achievement = (Achievement)
> item.getModelObject();
>
> Label l = new Label("name", achievement.getDescription());
> item.add(l);
>
> }
> };
> wmc.add(achievementsListView);
>
> //navigator
> PagingNavigator pn = new AjaxPagingNavigator("navigator",
> achievementsListView);
>

See 
org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator#onAjaxEvent
Repeaters cannot be updated with Ajax and that's why their parent is
repainted.
Just add: wmc.setOutputMarkupId(true)


> wmc.add(pn);
> }
> };
> add(categoriesListView);
>
> add(new PagingNavigator("navigator0", categoriesListView));
>
> -
>
> Any idea of what is happening??
>
> Thanks in advance and regards.
>
>


PagingNavigator inside repeater

2013-10-04 Thread Francisco Saez
Hi all,

I have a list of elements wich a sub-list of elements for each of them.
For example:
* Category 1
   - Element 1.1
   - Element 1.2
*Category 2
   - Element 2.1
   - Elemnt 2.2

I have no problmes when I try to paginate the root list of elements (in the 
example, categories). But when I try to paginate each sub-list I have some 
problems. Links appear with correct page number, but nothing happen when I 
click they.

I've tried with PaginNavigator and also with AjaxPagingNavigartor (with a 
WebMarkupContainer). Here is the code:


Category title




   
 Test Name
   









-

final HashMap> achievementsMap = 
projectLogic.getAchievements();

PageableListView categoriesListView = new 
PageableListView("categories", projectLogic.getCategories(), 5) {

@Override
protected void populateItem(ListItem item) {
final Category category = (Category) item.getModelObject();

//title
item.add(new Label("cat_title", category.getDescription()));

WebMarkupContainer wmc = new WebMarkupContainer("container");
item.add(wmc);

//achievements list
PageableListView achievementsListView = new 
PageableListView("achievements", 
achievementsMap.get(category.getId()), 5) {

@Override
protected void populateItem(ListItem item) {
final Achievement achievement = (Achievement) 
item.getModelObject();

Label l = new Label("name", achievement.getDescription());
item.add(l);

}
};
wmc.add(achievementsListView);

//navigator
PagingNavigator pn = new AjaxPagingNavigator("navigator", 
achievementsListView);
wmc.add(pn);
}
};
add(categoriesListView);

add(new PagingNavigator("navigator0", categoriesListView));

-

Any idea of what is happening?? 

Thanks in advance and regards.
   
  

Re: CryptoMapper and mounted pages.

2013-10-04 Thread Martin Grigorov
On Fri, Oct 4, 2013 at 10:17 AM, Roman Grigoriadi <
roman.grigori...@gmail.com> wrote:

> Hi Martin,
>
> thanks for suggestion, but it appears to me, that the problem actually is
> that the CryptoMapper is not set as root if you call any of
> "mountPage(..)",
> after setting CryptoMapper as root mapper. I suppose your suggestion would
> work if MountedMappers will be added in a SystemMapper collection (which is
> decorated by CryptoMapper)  instead of a CompoundMapper, which is not.
>

Yes. This is by design.
If the current root mapper is not ICompoundRequestMapper then Wicket
creates one automatically.
This is a feature some applications use.


>
> I'll comment further on linked ticket, you provided.
>
> Cheers, Roman.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-and-mounted-pages-tp4661676p4661696.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: CryptoMapper and mounted pages.

2013-10-04 Thread Roman Grigoriadi
Hi Martin,

thanks for suggestion, but it appears to me, that the problem actually is
that the CryptoMapper is not set as root if you call any of "mountPage(..)",
after setting CryptoMapper as root mapper. I suppose your suggestion would
work if MountedMappers will be added in a SystemMapper collection (which is
decorated by CryptoMapper)  instead of a CompoundMapper, which is not.

I'll comment further on linked ticket, you provided.

Cheers, Roman.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-and-mounted-pages-tp4661676p4661696.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: Session expired controll - timeout redirect

2013-10-04 Thread Martin Grigorov
Hi,


On Thu, Oct 3, 2013 at 10:09 AM, sidorczukp wrote:

> Hi,
> I set up session expiration in web.xml:
> 
> 1
> COOKIE
> 
>
> and set up:
> getApplicationSettings().setPageExpiredErrorPage( SignInPage.class );
>
> but it doesn't work:
> When tomcat session expired user is not redirecting to another site, but it
> throws error with null session variable.
>

What is the stacktrace ?


>
> How can i handle it? I use: tomcat, spring, wicket.
>
> I found solution here:
> http://my3java.blogspot.com/2013/04/handling-session-timeout-in-wicket.html


This solution is not correct.
It pings the application every minute so the session will never timeout.
In case the page is actually used there is no code to tell the ajax
behavior to reset itself.


>
> but I'm not sure if it is necessary and if it fix my issue.
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Session-expired-controll-timeout-redirect-tp4661674.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: CryptoMapper and mounted pages.

2013-10-04 Thread Martin Grigorov
Hi,

There is a ticket with similar symptoms:
https://issues.apache.org/jira/browse/WICKET-5326
I think the most easier way is to extend CryptoMapper and call
super#mapHandler() only for IPageClassRequestHandlers for pages in a
whitelist. E.g. you can annotate them.


On Thu, Oct 3, 2013 at 3:09 PM, Roman Grigoriadi  wrote:

> Hello Wicket users!
>
> I am trying to make a CryptoMapper working for a mounted page, in a way,
> that the URL in browser would be unencrypted, but all the other stuff like
> ListenerInterface links urls will be encrypted.
>
> I am using a wicket 1.5.10, but I tried to reproduce it on a quickstart
> project with 6.10.0 and it behaves the same, which is - "MountedMapper
> generates urls for all components and CryptoMapper is skipped"
>
> /The question is: is it an intended behavior in case of MountedMapper?/
>
> Here is a bit of code:
>
> //Applications init:
>
> setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
> mountPage("/nice/nicer", BookedPage.class);
>
> First line sets CryptoMapper as root with wrapped SystemMapper.
> Second internally sets *CompoundRequestMapper as root* with first in
> collection CryptoMapper and second MountedMapper.
>
> Now when i enter "localhost/nice/nicer" in browser url, a BookedPage is
> being rendered, and when it renders its only component - AjaxLink, it asks
> for an URL for its ListenerInterfaceRequestsHandler. As a root mapper,
> CompoundRequestMapper asks first a MountedMapper and as it gets an URL from
> it, CryptoMapper is never asked to encrypt it after.
>
> I figured out to use a CustomMountedMapper and return null in
> mapHandler(..)
> for all handlers, but the RenderPageRequestHandler, but it doesn't feel
> being correct to me.
>
> Greetings, Roman.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-and-mounted-pages-tp4661676.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
>
>