Portlet RequestCycle logRuntimeException

2009-11-27 Thread Goran Novak
I'm using wicket 1.4.1 for developing portlets on liferay 5.2.5  jboss
4.2.3.

In my portlet on a page I have three DataView-es each with its own page
navigation.
I overrided PagingNavigation, PagingNavigator, PagingNavigationLink and
PagingNavigationIncrementLink to be able to give paging navigator custom
looks and some extra functionalities.

I never had any exceptions or errors happening during testing. But when big
number of requests is sent to portlet by automatic load tester, sometimes in
jboss server.log apears strange exception.

Does anybody have any idea what could cause this?

I see that org.apache.wicket.protocol.http.request.InvalidUrlException is
thrown, but I can not reproduce the error no matter what I changed in URL by
hand in browser.

Whole stack trace is in the attachment. If some parts of source code is
neede I can send it.



2009-11-27 04:08:21,485 ERROR [STDERR] Nov 27, 2009 4:08:21 AM
org.apache.wicket.RequestCycle logRuntimeException
SEVERE: org.apache.wicket.WicketRuntimeException: component
spotNavigator:navigation:2:pageLink not found on page
hr.vipnet.ss.SpotSearchPage2[id = 1], listener interface =
[RequestListenerInterface name=ILinkListener, method=public abst
ract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
org.apache.wicket.protocol.http.request.InvalidUrlException:
org.apache.wicket.WicketRuntimeException: component
spotNavigator:navigation:2:pageLink not found on page
hr.vipnet.ss.SpotSearchPage2[id = 1], listener interface = [RequestLis
tenerInterface name=ILinkListener, method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
2009-11-27 04:08:21,485 ERROR [STDERR] Nov 27, 2009 4:08:21 AM 
org.apache.wicket.RequestCycle logRuntimeException
SEVERE: org.apache.wicket.WicketRuntimeException: component 
spotNavigator:navigation:2:pageLink not found on page 
hr.vipnet.ss.SpotSearchPage2[id = 1], listener interface = 
[RequestListenerInterface name=ILinkListener, method=public abst
ract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
org.apache.wicket.protocol.http.request.InvalidUrlException: 
org.apache.wicket.WicketRuntimeException: component 
spotNavigator:navigation:2:pageLink not found on page 
hr.vipnet.ss.SpotSearchPage2[id = 1], listener interface = [RequestLis
tenerInterface name=ILinkListener, method=public abstract void 
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
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:456)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at 
com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:329)
at 
com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:115)
at 
org.apache.wicket.protocol.http.portlet.WicketPortlet.processRequest(WicketPortlet.java:591)
at 
org.apache.wicket.protocol.http.portlet.WicketPortlet.processAction(WicketPortlet.java:521)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:81)
at 
com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:57)
at 
com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:100)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at 

Portlet, liferay, strange error messages

2009-11-03 Thread Goran Novak
Hi

I'm using wicket 1.4.1 to develop portlets for liferay 5.2.3.

In jboss server.log I see errors coming from wicket. Does's somebody know
if these are real errors or just info messages that wicket sends to console
like error messages as it seems.

Porlets works fine.

Versions JBOSS-Tomcat-4.2.3
JDK 1.5.0_09
Liferay 5.2.3

This [1] is what I get when portlet is deployed, and bellow that [2] when I
click on
DropDownChoice and onSelectionChanged method is activated.

Thanks,
Goran

1.
09:50:33,088 INFO  [STDOUT] 09:50:33,088 INFO  [PortletHotDeployListener] 1
portlet for HelloWorldPortlet is available for use
09:50:33,604 INFO  [STDOUT] [03 stu 2009 09:50:33,588] [DEBUG] []
[HwApplication] [ HwApplication.init()]
09:50:33,619 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.Application callInitializers
INFO: [HwApplication] init: Wicket core library initializer
09:50:33,635 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
09:50:33,635 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
09:50:33,651 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IFormSubmitListener, method=public abstract void
org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
09:50:33,666 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IFormSubmitListener, method=public abstract void
org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
09:50:33,682 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=ILinkListener, method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
09:50:33,697 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=ILinkListener, method=public abstract void
org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]
09:50:33,713 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IOnChangeListener, method=public abstract void
org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()]
09:50:33,729 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IOnChangeListener, method=public abstract void
org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()]
09:50:33,744 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IRedirectListener, method=public abstract void
org.apache.wicket.IRedirectListener.onRedirect()]
09:50:33,760 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IRedirectListener, method=public abstract void
org.apache.wicket.IRedirectListener.onRedirect()]
09:50:33,776 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IResourceListener, method=public abstract void
org.apache.wicket.IResourceListener.onResourceRequested()]
09:50:33,791 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IResourceListener, method=public abstract void
org.apache.wicket.IResourceListener.onResourceRequested()]
09:50:33,822 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface
name=IActivePageBehaviorListener, method=public abstract void
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
09:50:33,838 ERROR [STDERR] 2009.11.03 09:50:33
org.apache.wicket.RequestListenerInterface registerRequestListenerInterface
INFO: registered listener interface [RequestListenerInterface

Re: URL mounting on Websphere causes Error 404

2009-03-12 Thread Goran Novak



you are using wicket filter or servlet?

-igor




I'm using filter.

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class

-- 
View this message in context: 
http://www.nabble.com/URL-mounting-on-Websphere-causes-Error-404-tp22455795p22471450.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: URL mounting on Websphere causes Error 404

2009-03-12 Thread Goran Novak



Philippe Marzouk-2 wrote:
 
 
 If you are using WicketFilter you need to apply this:
 
 http://www-01.ibm.com/support/docview.wss?uid=swg24014758
 
 Philippe
 
 


I tryed to add the custom property and restarted the server but the problem
still occures.

com.ibm.ws.webcontainer.invokefilterscompatibility = true   
-- 
View this message in context: 
http://www.nabble.com/URL-mounting-on-Websphere-causes-Error-404-tp22455795p22471451.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



URL mounting on Websphere causes Error 404

2009-03-11 Thread Goran Novak

Hi,

I developed my application using Jetty server and URL mounting worked fine.

When I deploy it on Websphere it still works but on the end of HTML response
to browser, string Error 404: SRVE0190E: File not found: /home is
appended.

I'm using:
- wicket 1.3.4
- IBM WebSphere Application Server - ND, 6.0.2.17 Build Number: cf170648.10
Build Date: 11/29/06
- java version 1.5.0_12 (build 1.5.0_12-b04)

Example of URL mount:
mount(new QueryStringUrlCodingStrategy(/home, HomePage.class));

End of source of return HTML:
html
?xml version='1.0' encoding='UTF-8'?
html
head
...
!-- some HTML cut --
...
/table
/body
/html
Error 404: SRVE0190E: File not found: /home
html

Does somebody have an idea what could be the problem?
Without URL mounting string does not apear on Websphere.

-- 
View this message in context: 
http://www.nabble.com/URL-mounting-on-Websphere-causes-Error-404-tp22455795p22455795.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: DateTextField, format not valid, message key

2008-10-21 Thread Goran Novak

It works, thanks :)

dateTextField.IConverter.Date = The date is not valid custom message




Serkan Camurcuoglu wrote:
 
 Wicket in Action book says that IConverter.Date should work..
 
 ***
 
 

-- 
View this message in context: 
http://www.nabble.com/DateTextField%2C-format-not-valid%2C-message-key-tp20069519p20085182.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DateTextField, format not valid, message key

2008-10-20 Thread Goran Novak

Hi,

I'm using the org.apache.wicket.datetime.markup.html.form.DateTextField
component for my date fields.

When I enter some random string in the text field in the feedback panel,
'asdfasdf' is not a valid Date. message appears.

I would like to customize that message, but I can't find which key I need to
insert in the properties file.

SomePage.properties --
...
dateTextField.NameOfValidator = The date is not valid custom message.
...
--

Does somebody know what do I need to insert instead of the NameOfValidator
string.

I searched the javadoc for the component and the web but didn't find the
validator name.

The component is defined as follows in the java file:

SomePage.java --
...
DateTextField dateTextField= new DateTextField(dateTextField, new
PropertyModel(model,propertyName), new
PatternDateConverter(dd.MM.,true));

dateTextField.add(new DatePicker());
add(dateTextField);
...
--

Thanks,
Goran

-- 
View this message in context: 
http://www.nabble.com/DateTextField%2C-format-not-valid%2C-message-key-tp20069519p20069519.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Static text and condition

2008-06-19 Thread Goran Novak

Hi,

What is the best (wicket) way to do the next:

I have one page which has to show few sentences (static text), but the
sentences are different according to the input data.

For example if input to the page constructor is:
Page(input1 = 0, input2 = 0, inpu3 = 0)
Page has to show these three sentences:
  This first 'sentence 1' variation
  This first 'sentence 2' variation
  This first 'sentence 3' variation

Second time different input parameters come:
Page(input1 = 1, input2 = 0, inpu3 = 0)
Page has to show these three sentences:
  This second 'sentence 1' variation and some other text
  This first 'sentence 2' variation
  This first 'sentence 3' variation

And so on...

Is it better to put every possiable sentence to resource file and than to
show the right one according to the input parameter.
If(input1 = 0) {
  add(new Label(getLocalizer().getString(firstVariationKey, this)));
} else if (input1 = 1){
  add(new Label(getLocalizer().getString(secondVariationKey, this)));
}


Or to put all sentences staticaly to html file and than use in code
setVisible(true/false) method on that span/'webmarkup container' in which
sentence is.

Or is there a smarter way.

Thanks :)

-- 
View this message in context: 
http://www.nabble.com/Static-text-and-condition-tp18008831p18008831.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Radio group, model

2008-04-15 Thread Goran Novak

Thanks,

I got it to work but I dont't understand why does RadioGroup has to have its
own model. RadioGroup has a constructor RadioGroup(java.lang.String id),
why does it exist if you can't create RadioGroup without its own model. It
seems somewhat misleading.

Here is the solution if someone else encounters this problem:

WebPage and Form:

public class TestRadio extends WebPage {
public TestRadio() {
add(new SomeForm(form));
}

class SomeForm extends Form {
public SomeForm(String id) {
super(id, new CompoundPropertyModel(new 
TestFormModel()));

TestRadioModel testRadioModel = new TestRadioModel();
RadioGroup radioGroup = new RadioGroup(radioGroup, 
new PropertyModel(
testRadioModel, radioGroup));
add(radioGroup);

radioGroup.add(new Radio(radio1, new Model(some)));
radioGroup.add(new Radio(radio2, new Model(none)));
}

protected void onSubmit() {
super.onSubmit();

RadioGroup radioGroup = (RadioGroup)get(radioGroup);

String model = (String) radioGroup.getModelObject();
System.out.println(model);//prints out some or none
}
}
}

Html:
form wicket:id=form
  
input type=radio wicket:id=radio1 / 
input type=radio wicket:id=radio2 / 
  
  input type=submit/
/form

RadioGroup Model:

public class TestRadioModel {
private String radioGroup;  
private String radio1;  
private String radio2;

// plus getters and setters
}



Michael O'Cleirigh wrote:
 
 Hi Goran,

 I have a form with a radio group. Everithing works (page renders without
 errors) but I can't get selected radio in forms onSubmit method.
 model.getSomeRadioGroup() returns null.

 It probably some logical error using the models. Does radioGroup have to
 have its own model or something like that.

   
 RadioGroup does need to have its own model and it also needs to be 
 included in the markup and it needs to wrap (be the parent) of the 
 specific radio's.
 
 If your radio's are directly adjacent in the markup you might find the 
 RadioChoice class easier since you can just set 1 model and pass in a 
 list of the options.
 
 
 
 Here is simplified example:

 FORM:
 public SomeForm(String id) {
   super(id, new CompoundPropertyModel(new SomeModel()));
   RadioGroup radioGroup = new RadioGroup(someRadioGroup);
   add(radioGroup);
  
   radioGroup.add(new Radio(radio1));
   radioGroup.add(new Radio(radio2));
   radioGroup.add(new Radio(radio3));
  
 }
   
 You need to set a model value for each radio since wicket will do a 
 radioGroup.modelObject = selectedRadio.modelObject when the form is 
 submitted.
 
 
 
  
 protected void onSubmit() {
   super.onSubmit();
   SomeModel model = (SomeModel) getModelObject();
   System.out.println(model.getSomeRadioGroup()); // This returns null
   System.out.println(model.getRadio1());// This returns null
   System.out.println(model.getRadio2());// This returns null
   System.out.println(model.getRadio3());// This returns null 
 }

 FORMS MODEL:
 public class EmailSettingsModel {

  private String radio1;

  private String radio2;

  private String radio3;

  private String someRadioGroup;

 //... plus getters and setters
 }

   
 I would change this so that the options for the radio were and
 enumeration:
 
 public enum EmailOptions { OPTION_1, OPTION_2, OPTION_3; }
 
 then just use a regular Model to hold the values:
 
 FORM:
 public SomeForm(String id) {
   super(id, new CompoundPropertyModel(new Model()));
   RadioGroup radioGroup = new RadioGroup(someRadioGroup, new Model
 (EmailOptions.OPTION_1);
   add(radioGroup);
   
   radioGroup.add(new EmailOptionRadio(radio1, new Model
 (EmailOptions.OPTION_1)));
   radioGroup.add(new EmailOptionRadio(radio2, new Model
 (EmailOptions.OPTION_2)));
   radioGroup.add(new EmailOptionRadio(radio3,  new Model
 (EmailOptions.OPTION_3)));
   
 }
 
 Where emailOptionRadio overrides the Component.getConverter(Class c)
 method to return an IConverter for the EmailOptions enumeration like:
 
 /* (non-Javadoc)
* @see org.apache.wicket.Component#getConverter(java.lang.Class)
*/
   @Override
   public IConverter getConverter(Class type) {
 
   return new IConverter () {
 
   /* (non-Javadoc)
* @see
 org.apache.wicket.util.convert.IConverter#convertToObject(java.lang.String,
 java.util.Locale)
*/
   @Override
   

Radio group, model

2008-04-14 Thread Goran Novak

Hi,

I have a form with a radio group. Everithing works (page renders without
errors) but I can't get selected radio in forms onSubmit method.
model.getSomeRadioGroup() returns null.

It probably some logical error using the models. Does radioGroup have to
have its own model or something like that.


Here is simplified example:

FORM:
public SomeForm(String id) {
  super(id, new CompoundPropertyModel(new SomeModel()));
  RadioGroup radioGroup = new RadioGroup(someRadioGroup);
  add(radioGroup);

  radioGroup.add(new Radio(radio1));
  radioGroup.add(new Radio(radio2));
  radioGroup.add(new Radio(radio3));

}

protected void onSubmit() {
  super.onSubmit();
  SomeModel model = (SomeModel) getModelObject();
  System.out.println(model.getSomeRadioGroup()); // This returns null
  System.out.println(model.getRadio1());// This returns null
  System.out.println(model.getRadio2());// This returns null
  System.out.println(model.getRadio3());// This returns null
}

FORMS MODEL:
public class EmailSettingsModel {

private String radio1;

private String radio2;

private String radio3;

private String someRadioGroup;

//... plus getters and setters
}

HTML:

form wicket:id=form

  input wicket:id=radio1 type=radio/
  input wicket:id=radio2 type=radio/
  input wicket:id=radio3 type=radio/

/form

-- 
View this message in context: 
http://www.nabble.com/Radio-group%2C-model-tp16678100p16678100.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]