Re: Override BrowserInfoPage

2012-09-01 Thread sudeivas
Create CustomBrowserInfoPage.java

public class CustomBrowserInfoPage extends BrowserInfoPage {
.
.
.
}

Create CustomBrowserInfoPage.html with your html tags.

Then create a custom websession and override newBrowserInfoPage()

public class CustomWebSession extends WebSession{

@Override
protected WebPage newBrowserInfoPage() {
return new CustomBrowserInfoPage();
}

}

The override newSession() in your application,

@Override
public final Session newSession(final Request request, final Response
response) {
return new CustomWebSession(request);
}


Hope this helps



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Override-BrowserInfoPage-tp4499400p4651689.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: [WARN]Falling back to Redirect_To_Buffer render

2012-08-29 Thread sudeivas
is it possible to find why its not using 'ONE_PASS_RENDER' ? I just want to
make sure that I am not missing any configuration.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WARN-Falling-back-to-Redirect-To-Buffer-render-tp4651567p4651622.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



[WARN]Falling back to Redirect_To_Buffer render

2012-08-28 Thread sudeivas
Hello,
   Though I am using 'ONE_PASS_RENDER' strategy, I am still getting the
below warning, 

WARN http-8000-2 [org.apache.wicket.request.handler.render.WebPageRenderer]
- Falling back to Redirect_To_Buffer render strategy because none of the
conditions matched. 

I am using wicket 1.5.6 in a clustered setup.

Am I missing something?

-Suresh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WARN-Falling-back-to-Redirect-To-Buffer-render-tp4651567.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: Which RENDER_STRATEGY is best for clustered setup?

2012-08-27 Thread sudeivas
Though I am using 'ONE_PASS_RENDER' strategy, I am still getting the below
warning,

WARN http-8000-2 [org.apache.wicket.request.handler.render.WebPageRenderer]
- Falling back to Redirect_To_Buffer render strategy because none of the
conditions matched.

Am I missing something? I am worried that this may cause some page
expiration issue.

-Suresh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Which-RENDER-STRATEGY-is-best-for-clustered-setup-tp4651420p4651536.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: Which RENDER_STRATEGY is best for clustered setup?

2012-08-22 Thread sudeivas
Thanks Martin for the response. Could you please answer the below question as
well?

What is the use of the below API? 
getRequestCycleSettings().setBufferResponse(false); 

Does it make any difference to the render strategy? I guess it makes some
difference to 'REDIRECT_TO_BUFFER'. 

Thanks,
Suresh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Which-RENDER-STRATEGY-is-best-for-clustered-setup-tp4651420p4651429.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: Which RENDER_STRATEGY is best for clustered setup?

2012-08-22 Thread sudeivas
Yes it is. Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Which-RENDER-STRATEGY-is-best-for-clustered-setup-tp4651420p4651433.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



Which RENDER_STRATEGY is best for clustered setup?

2012-08-21 Thread sudeivas
Hello,
   We are currently using Apache Wicket 1.5.6 in a clustered setup. We
have a custom built distributed session management based on memcached. Due
to infrastructure limitations, we cannot use sticky sessions. So I am
wondering whether 'ONE_PASS_RENDER' render strategy is the best solution for
my use case. 

Its mentioned below that this still has double submit problem,
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/settings/IRequestCycleSettings.html

Are there any other knows issues with 'ONE_PASS_RENDER' render strategy?

Also what is the use of the below API?
getRequestCycleSettings().setBufferResponse(false);

Does it make any difference to the render strategy? I guess it makes some
difference to 'REDIRECT_TO_BUFFER'. 

Thanks,
Suresh





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Which-RENDER-STRATEGY-is-best-for-clustered-setup-tp4651420.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: Getting more stale page exception in wicket 1.5.6

2012-05-31 Thread sudeivas
Hello Martin

I think I found why I see the warning

WARN: org.apache.wicket.request.handler.request.WebPageRenderer - The 
Buffered response should be handled by BufferedResponseRequestHandler. 

I am having a code like,

setResponsePage(ProblemIndexPage.class);

inside an Panel (last line). This is a hidden widget. Whenever I call this
widget, it will perform some task and redirect to the home page. 

When I call this panel first time, it shows the warning. Then if I try to
call it once again, then it says ComponentNotFoundException. 

Is there a better way to redirect rather than setResponsePage ?

In my application I have already mounted the home page,
mountPage(/main, ProblemIndexPage.class);

Thanks,
Suresh


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649629.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: Getting more stale page exception in wicket 1.5.6

2012-05-29 Thread sudeivas
With the above code changes, I made a simple test case,

1. Ajax Button which will throw StalePageException.
Result: The page reloaded itself without going to the error page.

2. Ajax Button which will throw PageExpiredException.
Result: Error page

3. Ajax Button which will throw ComponentNotFoundException.
Result: Error page

I believe for all the above use cases, the page should reload instead of
going to the error page. 

Please let me know if I missing something.

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649550.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: Getting more stale page exception in wicket 1.5.6

2012-05-29 Thread sudeivas
I believe
org.apache.wicket.settings.IPageSettings#setRecreateMountedPagesAfterExpiry()
is default to true. So I didn't set anything in my application. I mounted
all the pages. I am handling only couple of exceptions on my application and
for others I just return 'null' in onException() method. Hope I am not doing
anything wrong here. 

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649567.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: Getting more stale page exception in wicket 1.5.6

2012-05-29 Thread sudeivas
But according the below link,
https://issues.apache.org/jira/browse/WICKET-4454

The page should be repainted instead of showing ComponentNotFoundException.
I am using wicket 1.5.6. Why am I seeing ComponentNotFoundException? Anyway
to fix this?

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649568.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: Getting more stale page exception in wicket 1.5.6

2012-05-28 Thread sudeivas
Thanks for the information. But is there any way to prevent this exception or
is there any way to recreate the page if this exception occurs?

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649513.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: Getting more stale page exception in wicket 1.5.6

2012-05-28 Thread sudeivas
Hello Martin,
 I am handling couple of other exceptions in my application. Below
is my code,

getRequestCycleListeners().add(new AbstractRequestCycleListener() {
@Override
public IRequestHandler onException(final RequestCycle
requestCycle, final Exception e) {
LOGGER.error(e.getMessage(), e);
Throwable cause = e;
if (cause instanceof RedirectToUrlException) {
return new RedirectRequestHandler(Constants.MENU_URL);
} else if (cause instanceof
ListenerInvocationNotAllowedException) {
//catching this because auto-refresh is having some
issue when the timer is stopped
//need to find some way to remove this
return new RenderPageRequestHandler(new
PageProvider(ProblemIndexPage.class));
}
String uniqId = UUID.randomUUID().toString();
LOGGER.error(ERROR UUID :  + uniqId);

//redirect to the default error page
return new RenderPageRequestHandler(new
PageProvider(DefaultErrorPage.class));
}

Will the above code block wicket to recreate the page when
StalePageException occurs? If yes, how can I handle specific runtime
exceptions.

Thanks,
Suresh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649524.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: Getting more stale page exception in wicket 1.5.6

2012-05-28 Thread sudeivas
I will change to the below code,
getRequestCycleListeners().add(new AbstractRequestCycleListener() { 
@Override 
public IRequestHandler onException(final RequestCycle
requestCycle, final Exception e) { 
LOGGER.error(e.getMessage(), e); 
Throwable cause = e; 
if (cause instanceof RedirectToUrlException) { 
return new RedirectRequestHandler(Constants.MENU_URL); 
} else if (cause instanceof
ListenerInvocationNotAllowedException) { 
//catching this because auto-refresh is having some
issue when the timer is stopped 
//need to find some way to remove this 
return new RenderPageRequestHandler(new
PageProvider(ProblemIndexPage.class)); 
} 
String uniqId = UUID.randomUUID().toString(); 
LOGGER.error(ERROR UUID :  + uniqId); 
   
return null;
} 

and then 
getApplicationSettings().setInternalErrorPage(DefaultErrorPage.class);
getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);

By this way, I believe I redirect only if exception is
RedirectToUrlException  ListenerInvocationNotAllowedException. For other
runtime exceptions like StalePageException, PageExpiredException,
ComponentNotFoundException I believe wicket will try to re-create the page.
For any other runtime exception (eg. null pointer exception), wicket will
show internal error page. Please correct me if I am missing something. 

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649527.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: Loadable-detachable model for ListView

2012-05-10 Thread sudeivas
Hello Igor  Dan,
  Can you please answer the question regarding storing objects in
Session for DataView? 
Why does it store objects in Session since we are using LDM?

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4624239.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: Loadable-detachable model for ListView

2012-05-10 Thread sudeivas
Dan has mentioned I think 
ListView is better than DataView because it naturally discards its contents 
after the request where data view saves models, keeping your session size 
the same.

So if my list has 1000 entries, will the session store all these values if I
use DataView/IDataProvider and LoadableDetachableModel?

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4624338.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: Loadable-detachable model for ListView

2012-05-10 Thread sudeivas
Thanks Dan. Final question to you guys,

Option 1:
   DataViewSerializableWorkflowInstancePartial dataview =
new DataViewSerializableWorkflowInstancePartial(problems,
new UsersProvider()) {
private static final long serialVersionUID = 1L;

@Override
protected void populateItem(final Item item) {
item.add(new
Label(title,*((SerializableWorkflowInstancePartial)
item.getModelObject()).*getFriendlyName(getLocale())).setRenderBodyOnly(true));
item.add(new
Label(location,(*(SerializableWorkflowInstancePartial)
item.getModelObject())*.getCreatedLocation()).setRenderBodyOnly(true));
item.add(new
Label(age,*((SerializableWorkflowInstancePartial)
item.getModelObject())*.getAgeString()).setRenderBodyOnly(true));
}
}
};

Option 2:
   DataViewSerializableWorkflowInstancePartial dataview =
new DataViewSerializableWorkflowInstancePartial(problems,
new UsersProvider()) {
private static final long serialVersionUID = 1L;

@Override
protected void populateItem(final Item item) {
*SerializableWorkflowInstancePartial workflow =
(SerializableWorkflowInstancePartial) item.getModelObject();*
item.add(new
Label(title,workflow.getFriendlyName(getLocale())).setRenderBodyOnly(true));
item.add(new
Label(location,workflow.getCreatedLocation()).setRenderBodyOnly(true));
item.add(new
Label(age,workflow.getAgeString()).setRenderBodyOnly(true));
}
}
};

Is there any difference between option 1 and 2. Or do I always have to use
item.getModelObject() for all my components to avoid session storage. 

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4624389.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



Customize PagingNavigator

2012-05-10 Thread sudeivas
Hello,
  Currently I am using PaginNavigator along with DataView. 

dataview.setItemsPerPage(10);
container.add(dataview); //webmarkup container
container.add(new PagingNavigator(navigator, dataview));

For now, there are around 1000 entries in the list. So PagingNavigator
displays something like this,

  1 2 3 4 5 6 7 8 9 10  

But we are having some alignment issues. So we need something like this,

  1 2 3 4 5   

Is this possible?

-Suresh

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

2012-05-10 Thread sudeivas
navigator.getPagingNavigation() returns null. 

Am I missing something?

-Suresh

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

2012-05-10 Thread sudeivas
Works now. Thanks

-Suresh

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



Loadable-detachable model for ListView

2012-05-09 Thread sudeivas
Hello,
 Can any one please provide an example for implementing a list view with
loadable-detachable model? I am trying to minimize the size of the session.
Because sometimes, the size of the list view can be more than 2000, and this
occupies lot of space in session. 

Also is there a better way to handle this list view to populate only 100 at
a time and when the user scrolls down the list, we will populate more
entries. We have a backend service which support pagination. 

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232.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: Loadable-detachable model for ListView

2012-05-09 Thread sudeivas
I am using the below code in my application. But the data provider makes a
call to my service wrapper asking for all the entries. For example: if total
size of the list of 750, the first - 0 and count - 750. This is not
different from using list view. How can I make sure that this data view
loads (for example 100 entries) at a time. And when user scroll down the
list, we load more entries. Is it possible?

class UsersProvider implements IDataProvider
{
private static final long serialVersionUID = 1L;
public Iterator iterator(int first, int count)
{
IteratorSerializableWorkflowInstancePartial iterator =
null;
try {
iterator =
WorkflowServiceWrapper.listOpenActiveWorkflowInstances(
category, first, count);
} catch (DependencyFailureException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return iterator;
}

public int size()
{
return getProblemsCount();
}

public IModel model(final Object object)
{
return new LoadableDetachableModel() {
private static final long serialVersionUID = 1L;
protected Object load() {
return object;
}
};
}

@Override
public void detach() {
LOGGER.info(coming to detach);
// TODO Auto-generated method stub
}
}

DataViewSerializableWorkflowInstancePartial dataview =
new DataViewSerializableWorkflowInstancePartial(problems,
new UsersProvider()) {
private static final long serialVersionUID = 1L;

@Override
protected void populateItem(final Item item) {
Label blockedImage = new Label(blockedImage,);
if(((SerializableWorkflowInstancePartial)
item.getModelObject()).isBlocking()) {

//do something and add all ui compoenents
}
};
add(container);
container.add(dataview);





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622002.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: Loadable-detachable model for ListView

2012-05-09 Thread sudeivas
Thanks Igor for the response. 

If I use dataview.setItemsPerPage(50), then my Data View loads only the
first 50 entries. But how can I trigger or ask the data view to load the
next 50 entries when we scroll down the list or when we reach the end of the
list?

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622091.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: Loadable-detachable model for ListView

2012-05-09 Thread sudeivas
thanks for the info Dan.

I haven't worked with Jquery before. I will explore more on that. But I am
curious to know why DataView stores information in the session. Because I
use LoadableDetachableModel in my above example. The main objective for me
is minimize the information stored in session. Our backend service is very
quick in sending all the entries we need for the list. 

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622292.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



Wicket 1.5.6 release data please

2012-04-23 Thread sudeivas
Hello,
  Please let me know the approximate date for Wicket 1.5.6 release.

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-release-data-please-tp4581936p4581936.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: Version Pages by default

2012-04-02 Thread sudeivas
Now I am using 

IRequestMapper cryptoMapper = new CryptoMapper(getRootRequestMapper(),
this);
setRootRequestMapper(cryptoMapper);

By this way the page parameters are encrypted. I hope it will not affect
recreating the page from page mount when the page expiration happens. 

Also can you please answer my above question regarding StalePageException or
any links to regarding this will also help.

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4526510.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: Version Pages by default

2012-04-01 Thread sudeivas
I have made changes in the code to set all the parameters in the Session. Now
the URL looks clean.

http:///pageB?5

But in pageB's constructor after reading values from session I am not
clearing it as we need those values in the session. When the page expiration
happens, when wicket tries to reload the page from mounted pages, then the
values stored in the session will be helpful. Please correct me if I am
wrong.

Another question related to these page expirations. I am also seeing lot of
org.apache.wicket.request.mapper.StalePageException in
production(distributed environment). What is the real cause of this? I am
not seeing much of information from stack trace. Is this happening because
we use lot of stateless pages? or Is this happening because we didn't
version pages (prior to the start of this thread)? Please note I haven't
moved the changes in this thread to production.


Exception Stack Trace : org.apache.wicket.request.mapper.StalePageException
at
org.apache.wicket.request.handler.PageProvider.getStoredPage(PageProvider.java:302)
at
org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:257)
at
org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:100)
at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:147)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)


Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4525167.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: Version Pages by default

2012-03-31 Thread sudeivas
I believe the best solution for me is to update my project to the latest
version of wicket, but still I am worried about the following issue,

https://issues.apache.org/jira/browse/WICKET-4454

since lot of our code have nested components. Any idea when 1.5.6 will be
released? (so that I can wait for sometime and update to 1.5.6)

Below is my understanding, please let me know if I misunderstood something
here.
After 1.5.6, I need to version my pages (which is true by default) and also
setRecreateMountedPagesAfterExpiry(which is true by default). What wicket
does in the background is when session management fails or session expires,
instead of just throwing run time exception (like PageExpiredException)
wicket tries to reload the page (I am not sure how many times it retries
??). By this way we may not or may get only small number of run time
exceptions. Am I right?

Sorry for too many questions because I didn't find any thread regarding page
version in latest releases. 

Thanks,
Suresh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4521893.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: Version Pages by default

2012-03-31 Thread sudeivas
The problem in our application is there is no fixed path except for the home
page. From the home page the user will navigate to a different page after
clicking on a ajax link (we use setResponsePage(new PageB(Object x)).

In Page B we have lot of widgets getting populated dynamically based on
values in Object x. In most of our cases session expires when the user is in
Page B. Currently when we are in Page B, wicket shows something like this in
the url,

http://x/xxx/wicket/page?7

How can I mount these kinds of pages where there is no fixed path to mount. 

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4522016.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: Version Pages by default

2012-03-31 Thread sudeivas
This idea sounds good to me rather than just passing the whole JAVA object.
But this raises an another question. Since I am just passing PageParameters
to the page, in the beginning it will be a stateless page. But when I start
using Ajax components inside the page, then it becomes a stateful page and
it gets stored in the session. Please let me know if I misunderstood
something. 

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4522200.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



Version Pages by default

2012-03-30 Thread sudeivas
Hello, 
  I am just trying to make sense when to version pages and when not
to. 

I found in my application I can do something like,
getPageSettings().setVersionPagesByDefault(false);
as the default value is true. But I am not sure why we need to turn off page
version. I didn't find enough information online for page version in apache
wicket 1.5.3. 

It would be helpful if someone can share information about this. 

I believe I turned off page version some time back because I was getting too
many page expiration issue as you use a distributed session management. But
even though I use setVersionPagesByDefault(false) I still see page
expiration happening in our application. 

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4520432.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: Version Pages by default

2012-03-30 Thread sudeivas
Thanks for the information. I am currently using wicket 1.5.3.

I hope this applies to wicket-1.5.3 as well. 

But in my case, everything works fine. But when our session management
fails, then we run into the following exceptions:

PageExpiredException
ComponentNotFoundException
StalePageException

Please let me know if enabling page version will fix any of these issues.
Also in 6.x I see an API called 
setRecreateMountedPagesAfterExpiry()

Is this option available already in wicket-1.5.3 (by default true) ? If not,
what happens when a page expires? 

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Version-Pages-by-default-tp4520432p4520613.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: Override BrowserInfoPage

2012-03-28 Thread sudeivas
It worked. I did override BrowserInfoPage.java and BrowserInfoPage.html.

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Override-BrowserInfoPage-tp4499400p4513516.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: InvalidBehaviorIdException and ComponentNotFoundException for modal windows

2012-03-28 Thread sudeivas
I am not sure what is 'behavior with id: 0' ... I am just trying to use a
simple modal window.. But when I try to close the modal window I am getting
this error. 

org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior
with id: 0 on component: [ModalWindow [Component id = contextKeys]]. Perhaps
the behavior did not properly implement getStatelessHint() and returned
'true' to indicate that it is stateless instead of returning 'false' to
indicate that it is stateful.

Anyone having the similar issue with modal windows?

I am using wicket-1.5.3

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/InvalidBehaviorIdException-and-ComponentNotFoundException-for-modal-windows-tp4513744p4514244.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



Multiple Feedback panels in a page

2012-02-10 Thread sudeivas
Hello,
I do have a page which contains several widgets and each widget is a
panel. I need to add different feedback panel for each of these widgets. I
tried using something like below,

final FormString form = new FormString(form); 

ComponentFeedbackMessageFilter filter = new
ComponentFeedbackMessageFilter(form); 

FeedbackPanel feedback = new FeedbackPanel(feedback, filter); 
feedback.setEscapeModelStrings(false); 
add(feedback); 

Then use form.error(message) . Also added markup for feedback in .html file. 

Even I tried with ContainerFeedbackMessageFilter but nothing is working. I
am currently using wicket - 1.5.3. I am getting the message in all the
feedback panels in the page. Am I doing something wrong? 

Any information on this will be helpful.

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Multiple-Feedback-panels-in-a-page-tp4377392p4377392.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



Is multi-window support on by default in 1.5.3?

2012-01-31 Thread sudeivas
Hello,
  I am having some issues when I use modal windows in Wicket 1.5.3. I am
using clustering (having multiple hosts running the same application). So I
am wondering whether I have to turn on multi-window support somewhere or is
is turned on by default?

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Is-multi-window-support-on-by-default-in-1-5-3-tp4345435p4345435.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: Is multi-window support on by default in 1.5.3?

2012-01-31 Thread sudeivas
Thanks for the information. I am trying to resolve the issue by adding panels
to the modal window. It creates some problem when we add pages to it. 

Also as we are using clustering,

I did try to set,

getRequestCycleSettings().setRenderStrategy(RenderStrategy.ONE_PASS_RENDER);

But I am seeing a warning,
 [org.apache.wicket.request.handler.render.WebPageRenderer] - Falling back
to Redirect_To_Buffer render strategy because none of the conditions
matched.

Am I missing something or using it wrongly?

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Is-multi-window-support-on-by-default-in-1-5-3-tp4345435p4345683.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: Error while closing the modal window

2012-01-25 Thread sudeivas
I just added the below code,

modalWindow.setOutputMarkupId(true);

But now I am seeing a different error,

Page with id '6' has expired.
org.apache.wicket.protocol.http.PageExpiredException: Page with id '6' has
expired.
at
org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:169)
at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getPage(ListenerInterfaceRequestHandler.java:100)
at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:147)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at com.xxx.tomcat.valves.QueryLogValve.invoke(QueryLogValve.java:78)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)

So my question is whether opening a modal window release the source page
from session. Because when we close the modal window, we get page expiration
issue. So I think the source page is not there in the session.

Is this an issue or am I missing something?

-Suresh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-while-closing-the-modal-window-tp4325332p4327732.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: Error while closing the modal window

2012-01-25 Thread sudeivas
After researching, I found setting a different page map name for modal window
will fix the issue. But setPageMapName API is removed in wicket-1.5.3.

Any another solution for this?

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-while-closing-the-modal-window-tp4325332p4329137.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



Error while closing the modal window

2012-01-24 Thread sudeivas
I am getting the below exception when I try to close a modal window. Also I
am not seeing this error in development but I am seeing this in production
as we have some session management installed. 

Cannot find behavior with id: 0 on component: [SherlockModalWindow
[Component id = binListWindow]]. Perhaps the behavior did not properly
implement getStatelessHint() and returned 'true' to indicate that it is
stateless instead of returning 'false' to indicate that it is stateful.
org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior
with id: 0 on component: [SherlockModalWindow [Component id =
binListWindow]]. Perhaps the behavior did not properly implement
getStatelessHint() and returned 'true' to indicate that it is stateless
instead of returning 'false' to indicate that it is stateful.
at org.apache.wicket.Behaviors.getBehaviorById(Behaviors.java:303)
at org.apache.wicket.Component.getBehaviorById(Component.java:4430)
at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:254)
at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:147)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at com.xxx.tomcat.valves.QueryLogValve.invoke(QueryLogValve.java:78)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)


I also saw a related item,

https://issues.apache.org/jira/browse/WICKET-4116

We are already in 1.5.3 and our session management is working fine. The same
session is being used from source page to the modal window. But when I try
to close the modal window, it goes to the error page. 

Please let me know if I am missing something. 

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-while-closing-the-modal-window-tp4325332p4325332.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



Unit Testing AjaxTabbedPanel

2011-12-20 Thread sudeivas
Hello All,
  I am using AjaxTabbedPanel in my application and I want to write
unit tests for that. But I couldn't find any example tests in Apache Wicket
- 1.5.3 code. 

Please share any sample code to write unit tests for AjaxTabbedPanel. 


Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Unit-Testing-AjaxTabbedPanel-tp4219476p4219476.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: Restartable Self Updating Timer Behavior

2011-12-13 Thread sudeivas
I think the issue is because even after the timer is stopped, in the next
cycle a call is going to 

AbstractDefaultAjaxBehavior -  onRequest()

and because of that its throwing ListenerInvocationNotAllowedException. 

In AbstractAjaxRestartableTimerBehavior.java given in JIRA, the stop()
method just sets the stopped flag to true. 

Also I am not able to override onRequest() in
AbstractDefaultAjaxBehavior.java as it is a final method. Do I need to do
anything else in stop() method?

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Restartable-Self-Updating-Timer-Behavior-tp4188179p4191100.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: Restartable Self Updating Timer Behavior

2011-12-13 Thread sudeivas
I tried to call the stop() in AjaxRestartableSelfUpdatingTimerBehavior.java
when the page starts. But after 30 secs( timer interval), the stopped
flagged reverts back to the default value i.e false. So isEnabled() always
returns true. I am not sure whether this a bug. 

As a temporary fix, I have set the initial value of stopped flag in
AjaxRestartableSelfUpdatingTimerBehavior.java to true. And everytime I get
the org.apache.wicket.request.handler.ListenerInvocationNotAllowedException,
I just catch the exception and refresh the page. I am getting this exception
when I try to stop the timer.


Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Restartable-Self-Updating-Timer-Behavior-tp4188179p4191274.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



Tabbed Panel title not getting updated

2011-12-12 Thread sudeivas
Hello,
I am using Tabbed Panel to display the list. Below is my code,

 for(final Category category : Category.values()) { 
   .
   .
   .
tabs.add(new AbstractTab(new ModelString(){
private static final long serialVersionUID = 1L;
@Override
public String getObject() {
LOGGER.info(category.getValue());
return category.getValue() +  -
(+rightPLW.getProblemsCount()+);
}}) {
private static final long serialVersionUID = 1L;

@Override
public WebMarkupContainer getPanel(String panelId) {
return new DoublePanel(panelId, leftPanel, rightPanel);
}
}); 
}
add(new AjaxTabbedPanel(problem-panels,
tabs).setOutputMarkupId(true));

For now there are 4 categories and so tabs are displayed. But when there is
some changes in any of these tabs, I need to update all title of each of
these tabs. But for some reason only the title of the current tab is getting
updated. My requirement is to update all the tabs when some thing happens in
the page or in any of these lists. 

Please help.

Thanks,
Suresh


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Tabbed-Panel-title-not-getting-updated-tp4186714p4186714.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



When to use setRenderBodyOnly(true) ?

2011-12-12 Thread sudeivas
Hello,
  I am using deployment configuration in my web.xml. But if I remove
setRenderBodyOnly(true) for some of the containers and components, then I am
getting some issues with CSS styles. 

Does it really make sense to use setRenderBodyOnly(true) when I am in
deployment mode already?

I am not sure when to use setRenderBodyOnly(true) and when not to? 

Thanks,
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4187518.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: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread sudeivas
Thanks..

But do I need to specify setRenderBodyOnly(true) for each component even in
the 'deployment' mode? Is there a better way to strip these markups for all
the components of a page? As we have lot of nested components for a page. 


-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4187651.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: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread sudeivas
I did include the code 

getMarkupSettings().setStripWicketTags(true);

in my Application's init() method.

But after removing .setRenderBodyOnly(true) in couple of panels, I am
getting CSS issues. But it works fine if I include .setRenderBodyOnly(true)
to the components. 

Am I missing something?

Currently using Apache Wicket - 1.5.3
-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4188072.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: When to use setRenderBodyOnly(true) ?

2011-12-12 Thread sudeivas
Ya, I just noticed some issues if I setRenderBodyOnly(true) to all the
components. It seems some components need the wicket markups to be displayed
properly. For now I think I will go through each component and then decide
whether they need markups or not. 

Thanks All

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/When-to-use-setRenderBodyOnly-true-tp4187518p4188122.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: How to test just a panel using apache wicket?

2011-11-26 Thread sudeivas
I just used tester.startPanel(new xxpanel(x,y));

It worked for me. Make sure that this panel has a .html file associated with
it. Also make sure that you don't have any mock objects for the parent page
or for this panel. Just keep the test case as simple as possible. Let me
know if you still have this issue. Also post your code. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4111869.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



How to test just a panel using apache wicket?

2011-11-22 Thread sudeivas
Hello,
In our project, we have some panels and we embed those panels
dynamically to pages. 

public class DoublePanel extends Panel {
public DoublePanel(String id, Panel leftPanel, Panel rightPanel) {
 .
 }
}

I am not sure how to write unit test just for this class without a webpage.

public class DoublePanelTest {

private WicketTester tester;

@Before
public void init() {
tester = new WicketTester();
}

@Test
public void testDoublePanel() {
tester.startComponentInPage(new DoublePanel(double, leftPanel,
rightPanel));
}
}

I tried to run something like above. But got the below exception. I checked
some sample test case but in all, they have used tester.startPage(xxx.class)
and then used tester.startPanel(). Is it possible to test just the panel
without a webpage?

java.lang.NullPointerException
at org.apache.wicket.Page.isBookmarkable(Page.java:435)
at org.apache.wicket.Page.init(Page.java:734)
at org.apache.wicket.Page.init(Page.java:216)
at org.apache.wicket.Page.init(Page.java:170)
at org.apache.wicket.markup.html.WebPage.init(WebPage.java:74)
at
org.apache.wicket.util.tester.BaseWicketTester$StartComponentInPage.init(BaseWicketTester.java:1430)
at
org.apache.wicket.util.tester.BaseWicketTester.createPage(BaseWicketTester.java:1411)
at
org.apache.wicket.util.tester.BaseWicketTester.startComponentInPage(BaseWicketTester.java:1332)
at xxx.DoublePanelTest.testDoublePanel(DoublePanelTest.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Thanks,
Suresh


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4097990.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: How to test just a panel using apache wicket?

2011-11-22 Thread sudeivas
Additional Information:

Using Apache-Wicket - 1.5.3

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4097993.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: How to test just a panel using apache wicket?

2011-11-22 Thread sudeivas
I did try something like this,

public class DoublePanelTest {
private WicketTester tester;

private class TestPage extends WebPage {
private static final long serialVersionUID = 1L;
public TestPage() {
super();
add(new DoublePanel(double, leftPanel, rightPanel));
}
}

@Before
public void init() {
tester = new WicketTester();
}

@Test
public void testDoublePanel() {
tester.startPage(new TestPage());
}
}

But still I am getting the same exception,

java.lang.NullPointerException
at org.apache.wicket.Page.isBookmarkable(Page.java:435)
at org.apache.wicket.Page.init(Page.java:734)
at org.apache.wicket.Page.init(Page.java:216)
at org.apache.wicket.Page.init(Page.java:170)
at org.apache.wicket.markup.html.WebPage.init(WebPage.java:74)
at xxx.DoublePanelTest$TestPage.init(DoublePanelTest.java:23)
at xxxDoublePanelTest.testDoublePanel(DoublePanelTest.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-test-just-a-panel-using-apache-wicket-tp4097990p4098066.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: NullPointerException in WicketTester

2011-11-16 Thread sudeivas
Thanks for the update. I add velocity.jar to my classpath. Now I am getting
PageExpiredException. 

org.apache.wicket.protocol.http.PageExpiredException: Page with id '0' has
expired.
at
org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:169)
at
org.apache.wicket.util.tester.BaseWicketTester$LastPageRecordingPageRendererProvider.get(BaseWicketTester.java:2578)
at
org.apache.wicket.util.tester.BaseWicketTester$LastPageRecordingPageRendererProvider.get(BaseWicketTester.java:2565)
at
org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:166)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
at
org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:626)
at
org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:676)
at
org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:546)
at
org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:757)
at
org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:773)
at xxxTest.Test(xxxTest.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Has anyone successfully written unit tests under 1.5.3? If yes, I could use
some documentation. 

I saw this jira - https://issues.apache.org/jira/browse/WICKET-4045 when I
did some research on this issue. 

Pls help to fix this. 

-Suresh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/NullPointerException-in-WicketTester-tp4073967p4076980.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: NullPointerException in WicketTester

2011-11-16 Thread sudeivas
Finally got the issue resolved. I removed the dependency on wicket-velocity
and also I was using some mock libraries. Removed everything and tried a
simple test case and it worked. 

Thanks
Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/NullPointerException-in-WicketTester-tp4073967p4078074.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



NullPointerException in WicketTester

2011-11-15 Thread sudeivas
Hello,
   I am trying to write some unit tests for my wicket application. My
webpage has a custom constructor. 

public DefaultErrorPage(String message) {
 add(new Label(message, message);
}


For this, I followed the steps mentioned in
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/util/tester/WicketTester.html

I used ITestPageSource() to call the webpage. But my unit test is throwing a
null pointer exception at 

MockHttpServletRequest.setRequestToComponent();

below is my code:

@Before
public void init() {
  tester = new WicketTester();
}

@Test
public void testErrorPage() {
  tester.startPage(new ITestPageSource() {
 @Override
  public Page getTestPage() {
  return new DefaultErrorPage(Hello);
 }
   });
  tester.assertRenderPage(DefaultErroPage.class);
}

Apache Wicket - 1.4.5

Please help me with some information. 

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/NullPointerException-in-WicketTester-tp4073967p4073967.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: NullPointerException in WicketTester

2011-11-15 Thread sudeivas
Stack Trace:

java.lang.NullPointerException
at
org.apache.wicket.protocol.http.MockHttpServletRequest.setRequestToComponent(MockHttpServletRequest.java:1222)
at
org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:260)
at
org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:246)
at xxx.widgets..Test(xxxTest.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

I even tried tester.startPaget(new DefaultErrorPage(hello));

But still I am getting the same error. 

Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/NullPointerException-in-WicketTester-tp4073967p4074172.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