javadoc suggestion: @Since Wicket 1.4

2010-08-26 Thread Ayodeji Aladejebi
javadoc suggestion: @since Wicket 1.5
Just to help identify which components are not available in a version


-- 
Aladejebi Ayodeji A.,


How to identify last Repeater/DataView item

2010-08-26 Thread Benedikt Schlegel
Hy folks,

is there a way to determine if the current Item in onPopulate() is the 
last one processed? I need to add an additional attribute to the last 
DataView row.

Thanks for your help,
Benedikt

Save Paper: Think Before You Print Beta Systems Email Disclaimer and Email 
Impressum 
Beta Systems email messages are confidential. They may also be privileged 
or otherwise protected by work product immunity orother legal rules. If 
you have received an email by mistake please let us know by reply and then 
delete it from your system; you should not copy it or disclose its 
contents to anyone. All messages sent to and from Beta Systems may be 
monitored to ensure compliance with internal policies and to protect our 
business. Emails are not secure and cannot be guaranteed to be error free 
as they can be intercepted, amended, lost or destroyed, or contain 
viruses. Anyone who communicates with us by email is taken to accept these 
risks.Beta Systems Email-Sicherheitsinformation 
Die Inhalte der Emails von Beta Systems sind vertraulich. Sie unterliegen 
darüber hinaus ggf. dem Schutz von Arbeitsergebnissen oder sind 
anderweitig rechtlich geschützt. Falls Sie diese Email irrtümlich erhalten 
haben, benachrichtigen Sie uns bitte unverzüglich und löschen Sie 
anschließend die Email. Es ist untersagt, diese Email oder deren Inhalt zu 
kopieren oder Dritten zugänglich zu machen. Wir behalten uns das Recht 
vor, jegliche an bzw. von Beta Systems gesendeten Nachrichten zu 
überprüfen, um die Einhaltung unserer internen Richtlinien sowie die 
Wahrung unserer Geschäftsinteressen zu gewährleisten. Da Emails nicht 
sicher sind, kann eine fehlerfreie Übermittlung nicht gewährleistet 
werden. Emails können abgefangen und modifiziert oder zerstört werden, 
verloren gehen oder Viren enthalten. Die Kommunikation mit Beta Systems 
per Email geschieht auf eigene Gefahr. 
Mandatory Information for business email according to German trade laws / 
Pflichtangaben für geschäftliche Emails gemäß Handelsgesetzbuch und 
Aktiengesetz: 
Beta Systems Software AG
Alt-Moabit 90d
10559 Berlin
Germany
Phone: +49-(0)30-726 118-0
Fax: +49-(0)30-726 118-800
i...@betasystems.com

Chairman of the supervisory board / Vorsitzender des Aufsichtsrats: Dr. 
Günter Lewald
Management board / Vorstand: Jürgen Herbott (CEO/Vorstandsvorsitzender), 
Gernot Sagl (CFO)
Legal form / Rechtsform: Aktiengesellschaft
Registered office / Sitz: Berlin
Commercial register / Handelsregister: Berlin Charlottenburg, HRB 38 874
Ust-ID-Nr.: DE 136572034, St.-Nr.: DE 29/1/3927
Bank / Bankverbindung: Deutsche Bank Berlin, BLZ 1007
Account No / Konto-Nr.: 0680488
BIC DEUTDEBB, IBAN: DE94 1007  0068 0488 00


Re: How to identify last Repeater/DataView item

2010-08-26 Thread Igor Vaynberg
item has an index property, so you can check if that is -1 of getitemsperpage()

-igor

2010/8/26 Benedikt Schlegel benedikt.schle...@betasystems.com:
 Hy folks,

 is there a way to determine if the current Item in onPopulate() is the
 last one processed? I need to add an additional attribute to the last
 DataView row.

 Thanks for your help,
 Benedikt

 Save Paper: Think Before You Print Beta Systems Email Disclaimer and Email
 Impressum
 Beta Systems email messages are confidential. They may also be privileged
 or otherwise protected by work product immunity orother legal rules. If
 you have received an email by mistake please let us know by reply and then
 delete it from your system; you should not copy it or disclose its
 contents to anyone. All messages sent to and from Beta Systems may be
 monitored to ensure compliance with internal policies and to protect our
 business. Emails are not secure and cannot be guaranteed to be error free
 as they can be intercepted, amended, lost or destroyed, or contain
 viruses. Anyone who communicates with us by email is taken to accept these
 risks.Beta Systems Email-Sicherheitsinformation
 Die Inhalte der Emails von Beta Systems sind vertraulich. Sie unterliegen
 darüber hinaus ggf. dem Schutz von Arbeitsergebnissen oder sind
 anderweitig rechtlich geschützt. Falls Sie diese Email irrtümlich erhalten
 haben, benachrichtigen Sie uns bitte unverzüglich und löschen Sie
 anschließend die Email. Es ist untersagt, diese Email oder deren Inhalt zu
 kopieren oder Dritten zugänglich zu machen. Wir behalten uns das Recht
 vor, jegliche an bzw. von Beta Systems gesendeten Nachrichten zu
 überprüfen, um die Einhaltung unserer internen Richtlinien sowie die
 Wahrung unserer Geschäftsinteressen zu gewährleisten. Da Emails nicht
 sicher sind, kann eine fehlerfreie Übermittlung nicht gewährleistet
 werden. Emails können abgefangen und modifiziert oder zerstört werden,
 verloren gehen oder Viren enthalten. Die Kommunikation mit Beta Systems
 per Email geschieht auf eigene Gefahr.
 Mandatory Information for business email according to German trade laws /
 Pflichtangaben für geschäftliche Emails gemäß Handelsgesetzbuch und
 Aktiengesetz:
 Beta Systems Software AG
 Alt-Moabit 90d
 10559 Berlin
 Germany
 Phone: +49-(0)30-726 118-0
 Fax: +49-(0)30-726 118-800
 i...@betasystems.com

 Chairman of the supervisory board / Vorsitzender des Aufsichtsrats: Dr.
 Günter Lewald
 Management board / Vorstand: Jürgen Herbott (CEO/Vorstandsvorsitzender),
 Gernot Sagl (CFO)
 Legal form / Rechtsform: Aktiengesellschaft
 Registered office / Sitz: Berlin
 Commercial register / Handelsregister: Berlin Charlottenburg, HRB 38 874
 Ust-ID-Nr.: DE 136572034, St.-Nr.: DE 29/1/3927
 Bank / Bankverbindung: Deutsche Bank Berlin, BLZ 1007
 Account No / Konto-Nr.: 0680488
 BIC DEUTDEBB, IBAN: DE94 1007  0068 0488 00


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



exception when last tab of AjaxTabbedPanel is removed

2010-08-26 Thread Clément Tamisier
Hi,

I am using wicket 1.4.6 and AjaxTabbedPanel class.
I add and remove tabs dynamically.
I have an exception when i remove the last tab (no problem when tabs1).
When I debug i see that getSelectedTab() return 0 and tabs in TabbedPanel is
empty.
Do you have any ideas.
Thank you

Clément

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
 at java.util.ArrayList.RangeCheck(ArrayList.java:547)
 at java.util.ArrayList.get(ArrayList.java:322)
 at
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.isTabVisible(TabbedPanel.java:399)
 at
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:212)
 at
org.apache.wicket.Component.internalBeforeRender(Component.java:1061)
 at org.apache.wicket.Component.beforeRender(Component.java:1095)
 at org.apache.wicket.Component.prepareForRender(Component.java:2225)
 at org.apache.wicket.Component.prepareForRender(Component.java:2262)
 at
org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:804)
 at
org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:680)
 at
org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:590)
 at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
 at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
 at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
 at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
 at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
 at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
 at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
 at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 at org.mortbay.jetty.Server.handle(Server.java:324)
 at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
 at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
 at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
 at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)


Re: Problem to replace panel

2010-08-26 Thread zoran

I've solved this. The problem was in that I made a call to update panel
methods for both panels from instance of the first panel that was updated.
The second call on update method was on the wrong target, so it couldn't
found a component (panel) to update.

Zoran
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-to-replace-panel-tp2333462p2340433.html
Sent from the Wicket - User 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



EXception handling in Wicket

2010-08-26 Thread arunarapole

Hi

How to display exception message in hidden field or  on pop up window or
feedback panel or in any wicket component  in the same page where i am
entering data.

If any one does this please send me sample code or idea 
please do this i am very new to the wicket frame work.
please help out me any one


Thank you
Aruna

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/EXception-handling-in-Wicket-tp2340439p2340439.html
Sent from the Wicket - User 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 determine previous value in select after user change

2010-08-26 Thread Steve Mactaggart
Hi All,

I'm not sure if there is a wicket way to do this, or if I have to mange the
data myself, but we have a screen that has a select on it and need to detect
the user changing the value.
This is simply achieved with a AjaxFormComponentUpdatingBehavior, and works
well.

My problem is that by the time MY code gets executed, the component has
updated the model with the newly selected option, thus losing the existing
value.

I'm guessing AjaxFormComponentUpdatingBehavior won't have any way to track
this change, but is there any other behaviour I can use that allows me to
see the change in value?

I hope that makes sense, if not let me know and I'll post a simple example.

Cheers,
Steve


Re: EXception handling in Wicket

2010-08-26 Thread Nitnatsnok

Hi, I don't know if it is a proper way but this is how I did it.

1. Extended WebRequestCycle

@Override
public Page onRuntimeException(Page page, RuntimeException e) {
// if error was during application running e.g. when Home page was
loaded and if it was an ajax request that caused problem
if (page instanceof Home  RequestCycle.get().getRequestTarget()
instanceof AjaxRequestTarget) {
// On my Home page there is a js ModalWindow into which I place
the error text
ModalWindow errorPage = (ModalWindow)page.get(modalErrorPage);
final ResourceModel message = new
ResourceModel(gorillaUrlError);
errorPage.setContent( ... );
   
errorPage.show((AjaxRequestTarget)RequestCycle.get().getRequestTarget());
}
return null;

2. Extended WebRequestCycleProcessor to comment out placing 500 error code
into Ajax response.

@Override
public void respond(RuntimeException e, RequestCycle requestCycle)
{
// If application doesn't want debug info showing up for users
final Application application = Application.get();
final IExceptionSettings settings =
application.getExceptionSettings();
final Page responsePage = requestCycle.getResponsePage();

Page override = onRuntimeException(responsePage, e);
if (override != null)
{
throw new RestartResponseException(override);
}
else if (e instanceof AuthorizationException)
{
// are authorization exceptions always thrown before the real
// render?
// else we need to make a page (see below) or set it hard to a
// redirect.
Class? extends Page accessDeniedPageClass =
application.getApplicationSettings()
.getAccessDeniedPage();

throw new
RestartResponseAtInterceptPageException(accessDeniedPageClass);
}
else if (e instanceof PageExpiredException)
{
Class? extends Page pageExpiredErrorPageClass =
application.getApplicationSettings()
.getPageExpiredErrorPage();
boolean mounted = isPageMounted(pageExpiredErrorPageClass);
RequestCycle.get().setRedirect(mounted);
throw new RestartResponseException(pageExpiredErrorPageClass);
}
else if (settings.getUnexpectedExceptionDisplay() !=
IExceptionSettings.SHOW_NO_EXCEPTION_PAGE)
{
// we do not want to redirect - we want to inline the error
output
// and preserve the url so when the refresh button is pressed we
// rerun the code that caused the error
// However we don't what to do this in a situation where we are
in portlet mode
if (!RequestContext.get().isPortletRequest())
{
requestCycle.setRedirect(false);
}

// figure out which error page to show
Class? extends Page internalErrorPageClass =
application.getApplicationSettings()
.getInternalErrorPage();
Class? extends Page responseClass = responsePage != null ?
responsePage.getClass()
: null;

if (responseClass != internalErrorPageClass 
settings.getUnexpectedExceptionDisplay() ==
IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE)
{
throw new RestartResponseException(internalErrorPageClass);
}
else if (responseClass != ExceptionErrorPage.class)
{
// Show full details
throw new RestartResponseException(new ExceptionErrorPage(e,
responsePage));
}
else
{
// give up while we're ahead!
throw new WicketRuntimeException(Internal Error: Could not
render error page  +
internalErrorPageClass, e);
}
}
else if (requestCycle.getResponse() instanceof WebResponse)
{
// commented out so that error code is not set to header
// it was set in case of runtime Java exception and
SHOW_NO_EXCEPTION_PAGE option of application
//   
((WebResponse)requestCycle.getResponse()).getHttpServletResponse().setStatus(
//HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
}

3. Overridden 2 methods in WebApplication
public RequestCycle newRequestCycle(Request request, Response response) {
protected IRequestCycleProcessor newRequestCycleProcessor() {


That's it.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/EXception-handling-in-Wicket-tp2340439p2340560.html
Sent from the Wicket - User 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: EXception handling in Wicket

2010-08-26 Thread Nitnatsnok

Oh, also I set not to show Error Page on exception in WebApplication:

getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_NO_EXCEPTION_PAGE);
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/EXception-handling-in-Wicket-tp2340439p2340562.html
Sent from the Wicket - User 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