Re: Wicket in portalt environment

2009-08-12 Thread Serkan Camurcuoglu

You should add

Context crossContext=true/

in the META-INF/context.xml file in your war file if it doesn't exist. 
Because AFAIK pluto/jetspeed tries to perform a cross-context dispatch 
(i.e. a request that's received by the /pluto context includes a url in 
your /application context). Also do not forget to add these lines below 
into the filter-mapping element of your wicket filter, because your 
application will not receive a direct GET request but it will receive an 
include request from the pluto context.


dispatcherREQUEST/dispatcher
dispatcherINCLUDE/dispatcher

hth,

SerkanC




pie...@nabble wrote:

Vikek,

I'm trying to get it all running on pluto 2.2.0. but to no avail. Get the
error message: 
The requested resource (/wicket-examples/examples/menu) is not available


Seems that as soon as the filters start it breaks.

While i'm at it, what method should i override from the WicketPortlet class.

Pieter


Vivek Kumar wrote:
  

Hi

In which portal server you are testing your wicket portlet ?
Try to test on jetspeed 2.2.0. Jetspeed 2.2.0 has lot of wicket portlet in
it.

On Tue, Aug 11, 2009 at 9:13 PM, Pieter van der Meer
pie...@pieni.nlwrote:





  



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



Re: PropertyModel doesnt update bean

2009-07-17 Thread Serkan Camurcuoglu

you should use a form and an ajaxsubmitlink instead of a normal ajaxlink..



Wadi Jalil Maluf wrote:

Hi all,

I have a UserBean and I created a propertyModel for that
bean so when a TextField text is modified the property name of the UserBean
updates. I use this in a model windows, added a link so when it clicks I use
the value from the textfield but the value is always null. Should I use a
form?How can I solve or read about this? Cause everywhere I see
documentation seems that should work the way I did it.




userBean=new UserBean();

final PropertyModel messageModel = new
PropertyModel(userBean,name);

 


textField=new TextField(msg,messageModel);




add(new AjaxLink(Save)

{

public void onClick(AjaxRequestTarget target)

{

modal.close(target);

java.lang.String user = userBean.getName();//this is null

 


}

}

 


Any help would be appreciated , thanks,

Wadi


  



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



Re: How to throw new PageExpiredException?

2009-07-16 Thread Serkan Camurcuoglu

If all you want is to display a page expired page, maybe you could just use

throw new RestartResponseException(PageExpiredErrorPage.class);

in your page constructor.



Ann Baert wrote:

Can anyone help me with this problem please?
Thanks in advance, Ann.



Ann Baert wrote:
  

I have overridden the RequestCycle.onRuntimeException method:

@Override
public RequestCycle newRequestCycle(final Request request, final Response
response) {
return new WebRequestCycle(this, (WebRequest) request, (WebResponse)
response) {

@Override
public Page onRuntimeException(Page page, RuntimeException e) {
Throwable t = e.getCause();
while(t != null) {
if(t instanceof PageExpiredException) {
return super.onRuntimeException(page, new
PageExpiredException(test));
}

t = t.getCause();
}
return super.onRuntimeException(page, e);
}
};
}

He comes in the if(t instanceof PageExpiredException)..., but in the
AbstractRequestCycleProcessor.respond(RuntimeException e, RequestCycle
requestCycle) method he doesn't do anything with the RuntimeException. So
he has still a WicketRuntimeException instead of the PageExpiredException.

Ann




igor.vaynberg wrote:


you can try unwrapping the exceptions in
requestcycle.onruntimeexception and call super with the page exipred
exception.

-igor

On Fri, Jul 10, 2009 at 3:00 AM, Ann Baertann.ba...@tvh.be wrote:
  

Hello,

How can I throw a PageExpiredException in the constructor of my WebPage?
Because the exception is wrapped by Wicket with WicketRuntimeException
it
goes to the InternalErrorPage.

Thanks,
Ann
 DISCLAIMER 
 http://www.tvh.be/newen/pages/emaildisclaimer.html 
http://www.tvh.be/newen/pages/emaildisclaimer.html  


This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message.



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



  



  



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



Re: returning resource on ajax request

2009-06-22 Thread Serkan Camurcuoglu

I would try to do something crazy like

RequestCycle.get().setRequestTarget(new ResourceStreamRequestTarget(...));

during the onclick method of the ajaxlink, but I don't know if it would 
work. Anyway on the client side wicket ajax library may try to interpret 
the response as a regular ajax response.





Wojciech Żaboklicki wrote:

Hi,
I want to do something like ResourceLink returning DynamicWebResource 
to the client, but I can  use only AjaxLink.

Any idea how to do it?

Regards,
Wojtek

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





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



Re: Login page crashes if old bookmark

2009-06-16 Thread Serkan Camurcuoglu
IIRC, for this purpose I had written a separate expired page but I had 
thrown a new restartresponseexception(LoginPage.class) which was working 
fine with wicket 1.3.4.



Martin Makundi wrote:

the users should get a page expired error if they come in from a
stateful bookmark and the session is expired.



Well..  in order to avoid that I have attempted to redirect them onto
the login page by setting the LoginPage to be the expired page ;)

getApplicationSettings().setPageExpiredErrorPage(LoginPage.class);

I do not want a separate pageExpiredErrorPage to be displayed to the
user, just go back to login with no error messages. Now I get the
component loginForm not found on page... I would assume that
LoginPage.class is a clean initiation with no pageParameters.

**
Martin

  

On Tue, Jun 16, 2009 at 12:58 AM, Martin
Makundimartin.maku...@koodaripalvelut.com wrote:


Hi!

I get the following error when users come to the login page using a
stateful bookmark:
2009-06-16 10:11:52,861 43237745 [btpool0-115] ERROR RequestCycle  -
component loginForm not found on page

Any tricks how this can be avoided?

**
Martin

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


  

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





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


  



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



Re: Anybody know what is this situation?

2009-05-18 Thread Serkan Camurcuoglu
In my experience such unexpected classcastexceptions may occur if the 
same class is loaded twice by different classloaders.. Check whether the 
LoginPage class exists in both WEB-INF/classes and some other jar in 
your classpath..



Martin Makundi wrote:

Anybody know what is this situation? Wicket 1.4-rc4

From production:

2009-05-18 16:32:44,316 19598423 [btpool0-112] ERROR RequestCycle  -
cannot assign instance of com.application.MainPage to field
wicket.quickstart.LoginPage$1.this$0 of type
wicket.quickstart.LoginPage in instance of
wicket.quickstart.LoginPage$1
java.lang.ClassCastException: cannot assign instance of
com.application.MainPage to field wicket.quickstart.LoginPage$1.this$0
of type wicket.quickstart.LoginPage in instance of
wicket.quickstart.LoginPage$1
   at 
java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2032)
   at 
java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1212)
   at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1953)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
   at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
   at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
   at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
   at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
   at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
   at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
   at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
   at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
   at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
   at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
   at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
   at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
   at 
java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
   at org.apache.wicket.Component.readObject(Component.java:4470)
   at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
   at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
   at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
   at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
   at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
   at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
   at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
   at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
   at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
   at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
   at 

possible bug

2009-05-12 Thread Serkan Camurcuoglu

Hi all,
We need to have the oracle xml parser in our tomcat /lib/ directory since we 
have to use the client api of Oracle BPEL in our application.
But when using xml property files, I get the following exception if I use a 
comment inside the property file:

java.lang.ClassCastException: oracle.xml.parser.v2.XMLComment
at org.apache.wicket.util.io.Streams.loadFromXml(Streams.java:158)
at 
org.apache.wicket.resource.PropertiesFactory.loadPropertiesFile(PropertiesFactory.java:199)
at 
org.apache.wicket.resource.PropertiesFactory.loadPropertiesFileAndWatchForChanges(PropertiesFactory.java:289)
at 
org.apache.wicket.resource.PropertiesFactory.load(PropertiesFactory.java:118)
at 
org.apache.wicket.resource.loader.ComponentStringResourceLoader.loadStringResource(ComponentStringResourceLoader.java:148)
at 
org.apache.wicket.resource.loader.ComponentStringResourceLoader.loadStringResource(ComponentStringResourceLoader.java:225)
at org.apache.wicket.Localizer.getString(Localizer.java:225)
at org.apache.wicket.Localizer.getString(Localizer.java:116)
at org.apache.wicket.Component.getString(Component.java:1807)
at org.apache.wicket.Component.getString(Component.java:1794)

I'm using wicket 1.3.4. Do you think I should open a jira issue for this?

Regards,

SerkanC



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



Re: Add a ui lock page over the page while waiting for response

2009-05-06 Thread Serkan Camurcuoglu

you could use the jquery blockui plugin..

http://malsup.com/jquery/block/#demos



James Carman wrote:

There is a veil component in wicketstuff-minis, I believe.  That might help.

On Wed, May 6, 2009 at 10:30 AM, Linda van der Pal
lvd...@heritageagenturen.nl wrote:
  

Back when I was programming in jsp I solved this by disabling the button
after clicking it (because it would redirect after processing the data). Not
sure how I'd do such a thing with Wicket.

Linda.


Matthias Keller wrote:


Hi

We have a web form which does some very extensive backend communication
requiring a lot of time. So usually after pressing 'submit', the UI is
locked for 10-30 seconds. To avoid re-submission, we'd like to put some kind
of ui-lock-page over the current page, stating 'Please wait' or something.
So I'd need something to add to the onclick of the submit button (which is
NOT an ajax button but a normal input type=submit button) which blocks the
UI until the response is ready.
I've tried the wicket-stuff veil thingy, but it doesn't work. Here's what
I tried:
WebMarkupContainer submit = new WebMarkupContainer(submit);
submit.add(new Veil());
add(submit);

But even though I see some JS files added to the page, nothing happens
when I click my button?

Is there something else that I can just add to a button?
Thanks a lot

Matt

  

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





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


  



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



Re: CheckBoxMultipleChoice in two columns

2009-05-05 Thread Serkan Camurcuoglu

but I think checkgroup is for single selection only, am I wrong?



Igor Vaynberg wrote:

use checkgroup and check components.

-igor

On Tue, May 5, 2009 at 3:00 AM, Serkan Camurcuoglu
serkan.camurcuo...@telenity.com wrote:
  

Hi all,
I want to display the choices in a CheckBoxMultipleChoice component in two
columns, like in a GridView. Currently the CheckBoxMultipleChoice generates
an input element (checkbox), a label element for the checkbox and a
br/ element (I'm using wicket 1.3.4). I want it to generate the choices in
a table with two columns. If there are an odd number of choices, I want the
last cell to be empty. Is there an easy way how I can achieve this?

Best regards,

SerkanC


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





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


  



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



Re: CheckBoxMultipleChoice in two columns

2009-05-05 Thread Serkan Camurcuoglu

sorry, I should have tried it before asking.. thanks a lot..



Igor Vaynberg wrote:

you are wrong.

-igor

On Tue, May 5, 2009 at 9:52 AM, Serkan Camurcuoglu
serkan.camurcuo...@telenity.com wrote:
  

but I think checkgroup is for single selection only, am I wrong?



Igor Vaynberg wrote:


use checkgroup and check components.

-igor

On Tue, May 5, 2009 at 3:00 AM, Serkan Camurcuoglu
serkan.camurcuo...@telenity.com wrote:

  

Hi all,
I want to display the choices in a CheckBoxMultipleChoice component in
two
columns, like in a GridView. Currently the CheckBoxMultipleChoice
generates
an input element (checkbox), a label element for the checkbox and a
br/ element (I'm using wicket 1.3.4). I want it to generate the choices
in
a table with two columns. If there are an odd number of choices, I want
the
last cell to be empty. Is there an easy way how I can achieve this?

Best regards,

SerkanC


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





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



  

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





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


  



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



Re: Ajax + DropDownChoice + ModalWindow

2009-04-29 Thread Serkan Camurcuoglu
|maybe using new AjaxFormComponentUpdatingBehavior(onchange) instead 
of onSelectionChanged would make a difference.. like the example  at 
http://www.wicket-library.com/wicket-examples/ajax/choice.0|




nino martinez wael wrote:

You need to tell the modal not to care about changes and make the ddc
submit via ajax.. Cant remember the exact setting...

might be one of below.. But there are some settup you can do something with..


http://www.nabble.com/forum/Search.jtp?query=modal+ninolocal=yforum=25133daterange=0startdate=enddate=

2009/4/29 Steve Flasby st...@flasby.org:
  

Chaps, struggling a bit with this one.

I want a ModalWindow containing a search form plus a table of results.
I would like the results to be updated using Ajax as I change the search
criteria. One of the search criteria is a DropDownChoice.
So, to handle a selection change I would normally use:

DropDownChoice::onSelectionChanged(){ return true; }

However, this causes a submit which closes the ModalWindow. I cant see
how to get the new value back from the DDC without a submit.

Clearly I am being a bit thick here as I cant possibly be the first
person trying to do this.
Can someone give me a hint please.


Many Thanks - Steve

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





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


  



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



Re: Page content setting on a panel.

2009-04-16 Thread Serkan Camurcuoglu
I would use an iframe instead of doing this, or I would use panels 
instead of pages. But you may want to look at the code of ModalWindow in 
wicket extensions since it is capable of doing what you want, i.e. 
displaying the content of a page within a div.





Zenberg Ding wrote:
Hi, How can let a page render to a panel component, then I can avoid 
page inherited and whole page refresh to build my pages layout.


Think about this :

html
body
span wicket:id=navigator/
span wicket:id=content/
/body
/html

onNavNodeClicked(AjaxRequestTarget target) {
MyPage page = new MyPage(...);
Component component = getPage().get(content);
((Panel)component).setRenderPage(page); // this method is what i wanted.
target.add(component); //my page's cotent rendered
}


so, is there any way to reach this?

Thanks.

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





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



Re: WebApp Freezes

2009-04-15 Thread Serkan Camurcuoglu
if all your threads are waiting for connections with no thread using a 
db connection, I suspect that you either leak connections (i.e. forget 
to free some connections) or each thread uses (requires) multiple 
connections during a transaction and at some point all threads need at 
least one more db connection to continue..




J wrote:

Not just one thread, but that thread dump part (from my first post) is
repeated for 149 other threads have the same situation. ( because of tomcats
150 maxthreads).

But when looking at the db during a freeze, there is no lock on any table at
db level. MySQL Administrator shows that there are 15 threads during the
freeze (equal to c3p0's maxPoolSize), all sleeping.

I have now added some C3P0 debug and workaround options to see if I can get
some extra info out of it.
http://www.mchange.com/projects/c3p0/index.html#configuring_to_debug_and_wor
karound_broken_clients
(debugUnreturnedConnectionStackTraces true and unreturnedConnectionTimeout
180)


-Oorspronkelijk bericht-
Van: John Krasnay [mailto:j...@krasnay.ca] 
Verzonden: woensdag 15 april 2009 15:57

Aan: users@wicket.apache.org
Onderwerp: Re: WebApp Freezes

Sounds like you have a thread holding a lock on a critical table and
subsequent threads are lining up behind it waiting for it to finish. You
should check your MySQL to try and figure out who's holding the lock and
why.

Note that the culprit thread need not be hung up in the database. Locks
are held until the transaction commits, so your thread could be hung up
in app code after making a database update but before the transaction is
committed.

jk

On Wed, Apr 15, 2009 at 03:41:07PM +0200, J wrote:
  

(Sorry for the empty message. First I tried Gmail, but that doesn't work
with this mailing list. Then I tried GMX webclient, but that client always
sends as HTML, which probably caused the message to be stripped to empty.)


I'm experiencing freezes on a production website.

Server specs:
-OS: Linux CentOS
-Webserver: Tomcat 6
-MySQL 5 with default settings
-Frameworks: Wicket 1.4-rc2 (webframework), Spring 2.5.6, Hibernate
3.3.1.GA, C3P0 db pooling 0.9.1.2, URLRewriteFilter 3.1.0, Spring
OpenSessionInViewFilter 


Problem:
At some point (about 5 to 24 hours) after a boot, Tomcat seems to stop
serving requests, although it does create new threads for new incoming
connections. But since it does not serve those connections, the new
connections will show and keep showing 0kb transfer. Shortly after that,
max-thread is reached, so then I'm unable to access any webapp (the main
website + tomcat manager) running on that Tomcat server. I'm not sure if


it
  

is able to serve static resources in the short time window where it still
has some threads free, because the time window is too short to notice when
it happens.

Observations:
-No exceptions or errors in the catalina logs. So no memory problems,


since
  

no error occurs in the logs
-Java Thread dump using command: kill -QUIT (see output below), shows the
text locked and WAITING.
-Adding c3p0 db pooling idle checks, tests and timeout settings (see


below)
  

did not help.
-Using Mysql Administrator GUI shows that after a freeze, there will be 15
threads, all sleeping. Normally this would return to a minPoolSize of 5,


if
  

I'm correct, but thats not the case.
-The freeze continues for hours, and does not recover. I have to restart
Tomcat.


I'm suspecting that it has something to do with DB pooling. I'm not sure


if
  

locked and WAITING are normal behaviour. But if there is something
wrong, why doesn't c3p0 recover from it?

Can somebody shed some light on this? :)





Configuration:

=== DB pooling in Spring applicationContext.xml 
bean id=dataSource class=com.mchange.v2.c3p0.ComboPooledDataSource
property
name=driverClassvaluecom.mysql.jdbc.Driver/value/property
property name=jdbcUrl value=jdbc:mysql://localhost/xx /
property name=uservalue/value/property
property name=passwordvaluex/value/property

property name=maxConnectionAgevalue600/value/property
property
name=idleConnectionTestPeriodvalue180/value/property
property
name=testConnectionOnCheckinvaluetrue/value/property

property name=acquireIncrementvalue5/value/property
property name=maxIdleTimevalue180/value/property
property name=maxPoolSizevalue15/value/property
property name=maxStatementsvalue100/value/property
property name=minPoolSizevalue5/value/property
/bean
===


= Thread dump part ===
http-8080-28 daemon prio=10 tid=0xb4fbb400 nid=0x4ae2 in Object.wait()
[0xb4316000..0xb4318130]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at



com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePo
  

ol.java:1315)
at




Re: filtering a datatable

2009-04-15 Thread Serkan Camurcuoglu

you can try FilterToolbar


Julien Graglia wrote:

Hi,

I try to filter rows of a datatable : I already have sort the rows very
easily (using a SortableDataProvider) but now I need to filter some
columns.. which seems to me a rather classic task.

 I have found classes in
org.apache.wicket.extensions.markup.html.repeater.data.table.filter like
ChoiceFilter and IFilterStateLocator but I did not find any examples. It
seems to me that is what I need but I dont figure out how to use it

I only found a post with a very short code like : 
final DefaultDataTable table = new DefaultDataTable(datatable,

columns, provider, 30);
final FilterForm form = new FilterForm(filter-form, provider);
table.addTopToolbar(new FilterToolbar(table, form, provider));
form.add(table);
form.add(new GoAndClearFilter(filter-buttons, form));
add(form);

but I dont know what html comes with that and how to implements the
filter.

I have google that the phonebook application is using filter but I
can't get it. 


I have to say that I dont know how to start with only the javadoc (how
to write html? simple example?)

I you have a piece of code of how to use filter and
IFilterStateLocator...

thx,

  



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



Re: filtering a datatable

2009-04-15 Thread Serkan Camurcuoglu

sorry for my previous post.. what i've previously done is:

- add a filtertoolbar to your datatable
- make some of your columns IFilteredColumn, for example I've used 
TextFilteredPropertyColumn but there are also others

- make your dataprovider implement IFilterStateLocator
- implement the filtering logic by checking the current state of the 
filter in your iterator method

- no need to change html

I'm not sure if that's the best way to do it, but it may help you get 
started..




Serkan Camurcuoglu wrote:

you can try FilterToolbar


Julien Graglia wrote:

Hi,

I try to filter rows of a datatable : I already have sort the rows very
easily (using a SortableDataProvider) but now I need to filter some
columns.. which seems to me a rather classic task.

 I have found classes in
org.apache.wicket.extensions.markup.html.repeater.data.table.filter like
ChoiceFilter and IFilterStateLocator but I did not find any examples. It
seems to me that is what I need but I dont figure out how to use it

I only found a post with a very short code like : final 
DefaultDataTable table = new DefaultDataTable(datatable,

columns, provider, 30);
final FilterForm form = new FilterForm(filter-form, provider);
table.addTopToolbar(new FilterToolbar(table, form, provider));
form.add(table);
form.add(new GoAndClearFilter(filter-buttons, form));
add(form);

but I dont know what html comes with that and how to implements the
filter.

I have google that the phonebook application is using filter but I
can't get it.
I have to say that I dont know how to start with only the javadoc (how
to write html? simple example?)

I you have a piece of code of how to use filter and
IFilterStateLocator...

thx,

  



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





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



Re: Adding a confirmation popup

2009-04-10 Thread Serkan Camurcuoglu
I think it should be input type=submit instead of button, or you 
should add form submit javascript code into the onclick handler..



Linda van der Pal wrote:

I've put it on a button, might that be why it doesn't work?

Generated line of source code:

button type=submit wicket:id=delete class=greenButton 
onclick=return confirm('Are you sure?');img wicket:id=deleteIcon 
src=resources/nl.lunaris.bookdb.webui.pages.BookListPanel/null/icons/list-remove.png//button 




Jeremy Thomerson wrote:
What's the generated JS?  Have you debugged with Firebug, etc, to see 
what's
happening in the JS?  Are you attaching that link to a regular anchor 
tag in
the HTML?  If you're putting it on a span, Wicket will generate an 
onclick

to make it a link - which may iinterfere with your onclick JS.

--
Jeremy Thomerson
http://www.wickettraining.com



On Fri, Apr 10, 2009 at 3:38 AM, Linda van der Pal 
lvd...@heritageagenturen.nl wrote:

 

In the book Wicket in Action I found this example:

public class MyPage extends WebPage {
  public MyPage() {
  Link link = new Link(link) {
  @Override
  protected void onClick() {
  System.out.println(Link clicked);
  }
  };
  add(link);
  link.add(new SimpleAttributeModifier(onclick,
  return confirm('Are you sure?'););
  }
}

I tried to copy this behavior in my own code, but for some reason, 
it does
show the popup, but then doesn't go on to actually going through 
with the

action (deleting an item) after confirmation.


So here's my code:
private Link? createDeleteButton(final ListItemBookListData item) {
  Link? deleteButton = new DeleteLink(delete, item.getModel());
  deleteButton.add(new Image(deleteIcon, new
ResourceReference(BookListPanel.class, ../icons/list-remove.png)));
  deleteButton.add(new SimpleAttributeModifier(onclick, return
confirm('Are you sure?');));
  return deleteButton;
}

// This is an inner class in the same class as the method above
@AuthorizeAction(action = Action.ENABLE, roles = { OWNER })
private class DeleteLink extends LinkBookListData {
  private static final long serialVersionUID = 1L;
public DeleteLink(final String id, final 
IModelBookListData

model) {
  super(id, model);
  }
@Override
  public void onClick() {
  // delete the book
  try {
  BookSaver bs = new BookSaver();
  BookListData deletedbook = (BookListData) 
getModelObject();

  bs.deleteBook(deletedbook.getIsbn());
  booklistmodel.getObject().remove(deletedbook);
  } catch (SQLException se) {
  error(SQLERROR_GET+ '\n' + se.getMessage());
  } catch (IOException ie) {
  error(IOERROR+ '\n' + ie.getMessage());
  }
  }
}

Any clue what I might be doing wrong?

Regards,
Linda

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





  




No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 
270.11.51/2052 - Release Date: 04/10/09 06:39:00


  



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





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



Re: DropDownChoice custom key problem

2009-04-08 Thread Serkan Camurcuoglu
why does it say java.lang.String instead of DaysSelectOption? On 
http://cwiki.apache.org/WICKET/dropdownchoice-examples.html it says:


You give a DDC a model and a list of possible values. The type of 
object returned by the model and the type of objects in the list *must* 
be the same. If your model returns an Integer, so you *must* pass a list 
of Integers, not IntegerSelectChoice or anything else.


If you want to display something different than the integer, you have to 
implement some custom code in ChoiceRenderer.getDisplayValue(). Don't 
get hung up on the idea that the value returned has to be a property of
the objects in your list. It can be anything, such as the 
getString(period_ + object.toString()), for example.




Vladimir Zavada wrote:

I have changed it to public and still the same error.

James Carman  wrote / napísal(a):

The class is private.

2009/4/8 Vladimir Zavada zava...@gmail.com:
 

Hi,
I have a problem with DropDownChoice. I am using DropDownChoice with
ChoiceRenderer and I am getting this error:

No get method defined for class: class java.lang.String expression: key


Here is a code:

  DaysSelectOption[] options = new DaysSelectOption[] {new
DaysSelectOption(, AND), new DaysSelectOption(|, OR)};
  ChoiceRenderer choiceRenderer = new ChoiceRenderer(value, 
key);

  showVal.add(new DropDownChoice(day_val, new PropertyModel(this,
items), Arrays.asList(options), choiceRenderer));

where class DaysSelectOption is:
private class DaysSelectOption
  {
  private String key;

  public String getKey()
  {
  return key;
  }

  public void setKey(String key)
  {
  this.key = key;
  }

  public String getValue()
  {
  return value;
  }

  public void setValue(String value)
  {
  this.value = value;
  }
  private String value;
  public DaysSelectOption(String key, String value)
  {
  this.key = key;
  this.value = value;
  }

thx for asnwers



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





he class is private.

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


  







Re: panel wicket:extend confusion

2009-04-03 Thread Serkan Camurcuoglu

AFAIK you should override isTransparentResolver and return true..



Ryan McKinley wrote:

aaah.

I take it a Page is automatically marked as a transparent resolver -- 
how do I mark a Panel as a transparent resolver?


I'll add the solution to:
http://cwiki.apache.org/WICKET/markup-inheritance.html

for the next guy!


On Apr 3, 2009, at 3:42 AM, Martijn Dashorst wrote:


You don't add the child to the right component: you have wrapped the
child/ tag inside a markup container. You have to make the markup
container a transparent resolver, *or* add the child components to the
markup container.

Martijn

On Fri, Apr 3, 2009 at 7:47 AM, Ryan McKinley ryan...@gmail.com wrote:
I have been using markup inheritance for page layout for a while 
without any

issue.

I just tried to use it for a Panel and am running into some issues -- I
imagine it is user error, so i figured I would ask here before 
banging my

head much longer.

I have two classes:


SimpleRow.java
public class SimpleRow extends Panel
{
 public SimpleRow(String id )
 {
   ...
  }
}

SimpleRow.html
table
wicket:panel

tr valign=top
 td width=60
  img wicket:id=img src=img/explore.gif /
 /td
 td wicket:id=td valign=top
  h2 wicket:id=titleTitle/h2
  wicket:child/
 /td
/tr

/wicket:panel
/table

- - - - - - - - - -

Then I want a subclass to fill in content for wicket:child/

ExportRow.java
public class ExportRow extends SimpleRow
{
 public ExportRow(String id)
 {
   super( id );

   add( new Label( test, hello ) );
 }
}

ExportRow.html
wicket:extend
Here is some text span wicket:id=testxxx/span
/wicket:extend

- - - - - -  -

With this, I get an errror:
Unable to find component with id 'test' in [MarkupContainer 
[Component id =

_extend8]] ...

If I do not try to add any components in the subclass, things behave 
as I

would expect.

Am I missing something?

Thanks
ryan







--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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




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





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



Re: Extend layout of a page

2009-03-30 Thread Serkan Camurcuoglu

search for the words wicket markup inheritance on google..



Pi Trash wrote:

Hi,

I am searching for a way to extend the design of a page without changing the 
page itself. That means, something like the Decorator Pattern. I have a page 
with for example just a table in it. In another project (or the same project) 
this page should have a navigation on the top.

My current solution is the following:
I have a base page which is segmented into five panels: header, left, main, 
right and footer. Now if a navigation is needed, a menu panel will be added to 
the header panel.

Is there a better way?

tia

Pt! Schon vom neuen WEB.DE MultiMessenger gehört? 
Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123



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


  



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



Re: Class org/apache/wicket/Component violates loader constraints

2009-03-27 Thread Serkan Camurcuoglu
it also probably indicates that wicket-xxx.jar exists in multiple 
locations within the application server..



Martijn Dashorst wrote:

wicket version, OS version, Java version would be nice to have in such
a scenario. Did you try to generate a new quickstart and see if that
works?

Martijn

On Fri, Mar 27, 2009 at 7:43 PM, Fernando Wermus
fernando.wer...@gmail.com wrote:
  

People,I was working with WTP to debug my wicket app. But I decided to move
to jetty because there is no need to deploy de app, as I imagine that WTP
does. I changed from Eclipse-Project-Java-build-path the directory where
my class are compiled: src/main/webapp/WEB-INF/classes. I debug Start.java
where it says:
...
   WebAppContext bb = new WebAppContext();
   bb.setServer(server);
   bb.setContextPath(/misDeportes);
   bb.setWar(src/main/webapp);
...

But when I tried to login I got this expcetion. I really know what to do: I
mean I dont know anything about class loaders and how I reached this
situation.

Thanks in advance!

HTTP ERROR: 500

Class org/apache/wicket/Component violates loader constraints


Caused by:

java.lang.LinkageError: Class org/apache/wicket/Component violates
loader constraints
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   at 
org.apache.wicket.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy.authorize(MetaDataRoleAuthorizationStrategy.java:114)


   public static final void authorize(final Component component, final
Action action,
   final String roles)
   {
   ActionPermissions permissions = (ActionPermissions)component

--
Fernando Wermus.

www.linkedin.com/in/fernandowermus
http://mientretiempo.blogspot.com/






  



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



Re: anyone see error Internal error parsing wicket:interface = iepngfix.htc?

2009-03-26 Thread Serkan Camurcuoglu
we had used iepngfix.htc method, but our css file was relative to our 
web application, so iepngfix.htc file was not served through wicket.. 
but I believe it should not be problematic.. does it cause any obvious 
error in the application other than the error log?




novotny wrote:

Hi,

In order to support .png files on IE we added a fix/hack as documented
here 
http://www.twinhelix.com/css/iepngfix/


However in the logs we're seeing this wicket error:

org.apache.wicket.WicketRuntimeException: Internal error parsing
wicket:interface = iepngfix.htc
   at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:596)
   at
org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:104)
   at
com.homeaccount.web.wicket.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:498)
   at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:184)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)

Has anyone else had this problem and is there a way to deal with it?

Thanks, Jason

  



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



Re: Creating a brandable or white label type of application

2009-03-09 Thread Serkan Camurcuoglu

Hi Igor,
Is there another CMS (other than brix) that works well with wicket?



Igor Vaynberg wrote:

if you are just starting to think about building this you might want
to consider using brix, or another cms that works well with wicket.

in case of brix:
each client would get their own jcr workspaces that you can fill in
with a template. they are then free to edit their own workspace
creating pages, uploading images, etc.
it is trivial in brix to map domains to workspaces
functionality for your application is then provided using brix tiles
which users are free to move around their html, a tile is basically
just a [brix:tile tile:id=foo][/brix:tile] anywhere inside the
markup.

if this sounds too out there you can still use normal wicket code and
allow your customers to edit the markup. you can store the markup
itself in the database, so all things like styles and variations still
work even though markup is not in the war. see IMarkupStreamProvider
and IMarkupCacheKeyProvider - these allow you to override where markup
comes from per page or per hierarchy of pages. there are more general
things like IResourceStreamProvider that will allow you to override
where resources are loaded from on a global scale.

-igor

On Fri, Mar 6, 2009 at 7:30 PM, Tauren Mills tau...@groovee.com wrote:
  

I'm looking for thoughts on ways to create a site that can be branded
by a customer.  It should do the following:

* run in a single webapp deployed in a WAR file
* multiple host names resolve to this same web app
  domain1.com - myapp.com
  domain2.com -- myapp.com
* based on the host name, the app selects a skin (color scheme,
images, maybe even layout changes)
* users need to be able to alter colors, images, and layout in real
time, so updating the WAR with new skins isn't possible
* need to pull alternate CSS content and perhaps HTML markup from a
database and images from a location outside of the WAR.

This needs to be kind of like blogger.com, where a user can change
images and colors, and the application displays their blog that way.
But in my case, the content on the page primarily remains the same,
just the way it is presented changes.

So I'm looking at the localization and style features thinking they
might help.  But they rely on alternate versions of files to be in the
WAR.
http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html

What methods would you recommend to get the current hostname from the request?
Whould this be best done in the RequestCycle, the Session, or?
What techniques would be useful for using external CSS, images, and HTML?
Will getStyle/setStyle even help since the content is external of the WAR?

I realize that I shouldn't allow users to modify HTML markup that
contains wicket tags.  That could break things very quickly.

I'm just starting to think about how to do this, so I'm looking for
any suggestions to direct me to the right tools for the job.

Thanks,
Tauren

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





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


  



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



Re: Feedback Next To Component

2009-02-12 Thread Serkan Camurcuoglu
there is something called 
org.apache.wicket.markup.html.form.validation.FormComponentFeedbackBorder, 
are you trying to build something like it?



walnutmon wrote:

That makes sense, I did pull out the surrounding markup so that it could be
edited by calls to the behavior, but that's not really much better.  Are
there any approaches that you can think of that may be more extensible?  I'd
prefer to not write directly to the page at all, since I'm not particularly
familiar with how that works, and I'm nervous about introducing hard to find
bugs down the road for other developers not as familiar with the framework.


Jonathan Locke wrote:
  

behaviors aren't really designed to work like components and render markup
like that, so it's a bit weird... what if you want to go extend or change
the markup for the feedback error? it's now embedded in a bunch of code.


walnutmon wrote:


In order to add feedback next to the component I used a behavior.  I had
some code from Igor which got me on the right track, although I was
unable to actually get it to work the same way, I simplified it down to
the following code:

AbstractBehavior printMessagesNextToComponent = new AbstractBehavior()
{

@Override
public void onRendered(Component component)
{
super.onRendered(component);
FeedbackMessage message = 
component.getFeedbackMessage();
if (message != null)
{
final Response out = component.getResponse();
out.write();
out.write(message.getMessage().toString());
out.write();
}
}
};

It almost seems too simple, I've tried it and with limited testing it
seems to work just fine, although there are some odd behaviors with
Ajax... does anyone have any comments, better solutions, or possible
breaking conditions that I should check out?

  



  



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



[OT] Sitepoint 5-for-1 Book Offer

2009-02-10 Thread Serkan Camurcuoglu
I learnt that Sitepoint is giving away five web design/development 
related pdf books for the price of one book ($29.95) to support the 
people affected by the bushfires in Australia. I thought the people on 
this list may be interested. You can access the offer at 
http://5for1.aws.sitepoint.com/ . Sorry for the disturbance.


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



Re: [OT] Wicket Like framework for desktop applications?

2009-01-28 Thread Serkan Camurcuoglu
Though I've never used it, I think Netbeans platform is worth giving a 
try if you are willing to use the Netbeans IDE.. you can check out 
http://platform.netbeans.org/





Nino Martinez wrote:
hmm I see that one of the guys behind are Josh Marinacci, which now 
are on the javaFX team..


Maarten Bosteels wrote:

Hi Nino,

I don't have much Swing experience, but I think this can be handy for
lifecycle stuff etc:
https://appframework.dev.java.net/intro/index.html

regards,
Maarten

On Wed, Jan 28, 2009 at 3:27 PM, nino martinez wael 
nino.martinez.w...@gmail.com wrote:

 

2009/1/28 jWeekend jweekend_for...@cabouge.com

   

Nino,

Swing has a familiar programming model, is very flexible, extensible,
powerful and robust. You can also make use of all the core and
  

open-source
   
Java libraries you already know. If the target client machines have 
a JRE

why use anything else.
  

Yeah true, my thoughts exactly. Seems Swing is the choice to make.

   
Using Swing would also open up various deployment options like Web 
Start.


I've used AWT's Robot (although I think it may have been in the last
century!) as well with good success for an RMI based shared 
whiteboard.
  

hehe :) I've used it previously with somewhat good effects on World of
warcraft, and similar but thats another tale..:)

   

Regards - Cemal
http://www.jWeekend.co.uk jWeekend




Nino Martinez-2 wrote:
 

True, I thought that too.. I guess it could be that simple...

2009/1/28 Antoine Roux antoine.r...@net-vitesse.com

   
Swing may be what you are looking for. I never used it, but 
Wicket is

often
compared to Swing. Swing is included in JSE.


Antoine



nino martinez wael a écrit :

 Hi Guys
 

I've havent done much desktop development but I wondered if there


were
   

something like wicket for desktop applications? I need it to be a
desktop
application because I need to manipulate the keyboard etc, via 
robot.


(I
 

have been thinking of embedding winstone in a jar with a wicket
application
and just run it locally on each desktop, but that seems really


overkill
   

and
will not let me manipulate the desktop).

So I've looked at Eclipse RCP, but it does quite not feel like a


light
   
weight way, it might just be me.. What else would you guys 
suggest, I

could
look into?

regards Nino




- 


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


  


--
View this message in context:

  
http://www.nabble.com/-OT--Wicket-Like-framework-for-desktop-applications--tp21705472p21706360.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


  


  



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





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



Re: Retrieve RemoteUser from HttpServletRequest

2009-01-23 Thread Serkan Camurcuoglu
is your wicket url also protected by security and login constraints in 
your web.xml?



Luca Provenzani wrote:

nothing to do! i read again only two null strings...
it's really strange!
in the jsp is simple: i need only this:
*request.getRemoteUser(),request.getRemoteAddr()
*
and seem to be simple even in wicket... only one right of code... but...
why doesn't httpservletrequest give me the right values?


Luca

2009/1/22 James Carman jcar...@carmanconsulting.com

  

Right, just use the servlet API for this one (and Igor's pointing out
how to get to the API below)

On Thu, Jan 22, 2009 at 11:42 AM, Igor Vaynberg igor.vaynb...@gmail.com
wrote:


servlethttprequest
r=((webrequest)getrequestcycle().getrequest()).gethttpservletrequest();

-igor

On Thu, Jan 22, 2009 at 8:40 AM, Luca Provenzani eufor...@gmail.com
  

wrote:


my application works on an apache-tomcat server. And on this server my
client has his authentication system that is similar to the Apache Basic
Authentication. Than, i need to read remoteUser that contains the id of


the


user.

thank you for your attention

Luca

2009/1/22 Bert taser...@gmail.com



On Wed, Jan 21, 2009 at 14:37, Luca Provenzani eufor...@gmail.com
  

wrote:


Thank You for answer Bert

I'll try to retrieve remoteAddress in this way(tomorrow morning, ehm


for


Italy ;-), because now i'm working for an other project).


that would be the same timezone as me (germany)

  

but...
 i need to retrieve the authenticated remoteUser, not the UserAgent,


how


can
  

i do this?


what do you mean with remoteUser? the Authentification the user has on
  

his


PC?

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


  

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


  

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





  



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



Re: Portlet related issues

2009-01-22 Thread Serkan Camurcuoglu
1. To overcome this problem in my application I put my css and image 
files into the jetspeed layout template directory, for example 
/jetspeed/decorations/layout/tigris/css/styles.css and modified the 
template velocity file to include my css file.


2. I think that's normal, and I think it would be impossible to confine 
the modal window within your portlet div since it's on a different 
z-index. If you want it to look better, you can try to style the modal 
window to better suit your portal page.


hope this helps..

SerkanC




German Morales wrote:

Hi all,

I'm trying to run an existing wicket application as a Portlet.
I've chosen Jetspeed-2, because it's Apache too, and i've also read in the
list that people working in the Portlet support also work in Jetspeed
development.

I've got some success, specially following this HowTo:
http://cwiki.apache.org/WICKET/portal-howto.html

After some effort, my application is basically running.
However, i'm having trouble with some issues:

1. CSS references to images (as div backgrounds).
   I've read in some forums and it seems to be generic problem in portals.
   CSS have URLs to images, which the portal does not transform to provide a
redirection.
   The browser, then asks for the images to the portal server directly, no
redirection is done to the portlet application.
   Any tips on how to solve this?
   (there seems to be a workaround for WebLogic portal:
http://www.gexperts.com/blog/archives/2007/12/entry_20.html)

2. ModalWindow
   ModalWindow works by hanging (with javascript) a new div from the body of
the current document.
   This works wonderful when Wicket is the owner of the page.
   However, the application is now inside a portlet window, not in the
whole page.
   When ModalWindow hangs from the page as usual, it looks odd... it's
outside the portlet window.
   Any ideas?

Thanks in advance,

German

  



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



Re: best way to obtain component reference?

2009-01-22 Thread Serkan Camurcuoglu

using

AdminPage.this.get(message).replaceWith(lbl);

instead of just

this.get(message).replaceWith(lbl);

might work, since message is added to the page, not to the delete button..





Phillip Rhodes wrote:

I am trying to update the label text on a page from a inner class (onSubmit) of 
my page.

I used the page.get(componentid) method, but it returns null.  While I could 
just store the reference to the label as a variable in my page class, I would like to 
understand how to obtain a reference to it using the wicket API.

When I use the following snippet, my get method always return null.

Thanks, appreciate the help.

public class AdminPage extends WebPage {
public AdminPage() {
add(new Label(message, If you see this message wicket is properly 
configured and running));
DMIRequest dmiRequest = new DMIRequest();
Form myform = new Form(myform, new CompoundPropertyModel(dmiRequest));
add(myform);

myform.add(new DeleteButton());
}
}

private  class DeleteButton extends Button
{
private static final long serialVersionUID = 1L;

private DeleteButton()
{
super(delete, new ResourceModel(delete));
setDefaultFormProcessing(true);
}

@Override
public void onSubmit()
{   
  Label lbl = new Label(message, Deleted);
  this.get(message).replaceWith(lbl);
			   
			




}
}



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


  



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



Re: WicketNotSerializableException

2009-01-19 Thread Serkan Camurcuoglu

you can also miss logs if your logging setup is incorrect.. it may happen
because of conflicting commons-logging or log4j jars, or if you have
multiple log4j.properties files in your classloader hierarchy.. I don't know
how these logging frameworks work exactly, but I had a similar problem and
it was corrected (I started seeing more wicket logs) when I deployed my
application into a clean tomcat with only the necessary jars..




Thomas Singer-4 wrote:
 
 On our webserver I'm getting WicketNotSerializableException in the log,
 but
 I never got them locally. What should I do to trigger them in my local
 test
 server?
 
 Thanks in advance,
 Tom
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/WicketNotSerializableException-tp21543331p21550303.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: POST too large

2009-01-14 Thread Serkan Camurcuoglu
So what exactly happens in this case, your code is not called at all and 
the current page is redisplayed as is? Anyway if this exception is 
caught and ignored within wicket code it should be a jira issue, but it 
may be tomcat who is ignoring the exception as well.. the stack trace 
gives you enough information to debug wicket  tomcat code if you want to..




Piller Sébastien wrote:

Hi,

thank you for your response. I'm well aware that increasing the post 
limit size may do the trick, but this looks like a hack. What to do 
when something else occurs, ie whatever IllegalStateException may be 
thrown at this part of code?


I guess the best solution will be to change the response code when 
such a problem occurs.


For the moment, I will increase the post limit to ~ 25MB, but I guess 
this issue should be solved in another way.


Does anybody may indicate me who is the offender?

Dipu a écrit :

will this be of any help

http://stackoverflow.com/questions/123335/what-causes-java-lang-illegalstateexception-post-too-large-in-tomcat-modjk 



regards
dipu

On Wed, Jan 14, 2009 at 10:04 AM, Piller Sébastien 
pi...@hmcrecord.ch wrote:
 

Hi everybody,

I'm not sure if wicket has anything to do to the following issue, 
but I'll

try anyway.

I'm POSTing some large data to a wicket page (yes, there is several 
MB of
data in the post). When it is too big, I can see the following 
stacktrace in

my logs:

java.lang.IllegalStateException: Post too large
  at
org.apache.catalina.connector.Request.parseParameters(Request.java:2388) 

  at 
org.apache.catalina.connector.Request.getParameter(Request.java:1005)

  at
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353) 


  at
org.apache.wicket.protocol.http.servlet.ServletWebRequest.getParameter(ServletWebRequest.java:105) 


  at
org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:198) 


  at org.apache.wicket.Request.getRequestParameters(Request.java:171)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1233)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
  at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355) 


  at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200) 


  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 


  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 


  at
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) 


  at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) 


  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) 


  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 


  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 


  at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 


  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 


  at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 


  at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 


  at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) 


  at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 


  at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 


  at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 


  at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 


  at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 


  at java.lang.Thread.run(Thread.java:619)


I don't know exactly who catches this exception without forwarding, 
but my
issue is that the page constructor doesn't get called at all (so I 
can't add
some code to controll integrity) and the resonse code sent to the 
client is
200. I'm expecting that wicket or tomcat will send a response code 
like 500:

Internal error or something else (anything but 200)

Any hint?



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





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


  



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

Re: Multiple Copies of One Wicket App

2009-01-09 Thread Serkan Camurcuoglu
I know this would be very difficult to create by hand, but if you 
automatically create a web.xml which includes 200 such filter 
definitions (replacing Application1 and dbfile1 with other values) I 
think that would do what you want. Note that here you obtain the db 
configuration file name as a filter init parameter, you should modify 
your application's init method accordingly..


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

   init-param
   param-nameapplicationClassName/param-name
   param-valuecom.mycompany.MyApplication/param-value
   /init-param
   init-param
   param-namedbFileName/param-name
   param-valuedbfile1.properties/param-value
   /init-param
   /filter

   filter-mapping
   filter-nameApplication1/filter-name
   url-pattern/dbfile1/*/url-pattern
   dispatcherREQUEST/dispatcher
   dispatcherINCLUDE/dispatcher
   /filter-mapping



Sean W wrote:

path:
/ContextPath/wicket/BookmarkablePage

It appears to me that using Wicket you cannot place anything in the path
between the context path and the mounted name except for wicket, which is
defined as your url-pattern. In other words, a mounted page cannot be
referenced from more than one path. This also means Wicket can't support
sub contexts.

Perhaps I'll have to try and deploy a single app 200 times in tomcat with
the same WAR. :-S
  



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



Re: FormComponent cookie persistent issue

2009-01-08 Thread Serkan Camurcuoglu

Murat have you tried it with tomcat, maybe it's jetty's bug?



Murat Yücel wrote:

Well i have create a jira issue on this problem. Hopefully someone  from the
wicket team will
have the time to fix this in a near future.
https://issues.apache.org/jira/browse/WICKET-2011

/Murat

2009/1/7 jWeekend jweekend_for...@cabouge.com

  

Murat,

I tried (using the Start class) as soon as you sent your quickstart and
witnessed the same result you did.
I have not looked into the reason it behaves as it does or differently with
a non-root context.

Regards - Cemal
http://www.jWeekend.com jWeekend



Murat Yücel-2 wrote:


Hi Serkan

I am using the Start.java located in the test folder to startup the
project.
The context path is removed there.
When I add a context path, then it is working fine. Both cookies is
created
with path /myproject.

But the problem exist if you remove the context path. This is the way i
run
it on my server and i guess that
this should also work for wicket. Can you confirm that you have the same
problem when removing the context
path.

/Murat

2009/1/7 Serkan Camurcuoglu serkan.camurcuo...@telenity.com

  

is your application deployed to the root context (e.g. / ) ? Because


your


working cookie path is / while the cookie path that is not working is
something like /homepage/wicket:interface/:0: . In my setup (I'm
using
the quickstart project that you sent) the path of my cookie is always
/myproject which is the context path of the application. Can you repeat
the
same behavior using your own quickstart project? I suggest you to use
wireshark or live http headers firefox plugin to check the http headers
to
see what's going on..




Murat Yücel wrote:



Hi Serkan

I must have seen wrong before. I am getting the same thing as you have
described. The expire date is one month in the future.
The only difference is in the path variable. If you clear your cookies
and
type something in the input fields when mount is enabled.
Are you then able to see them again when you press the login button?

I have attached some screenshots of the cookie and the webpage I see
with
and without mount.

/Murat

2009/1/7 Serkan Camurcuoglu serkan.camurcuo...@telenity.com mailto:
serkan.camurcuo...@telenity.com


   In my case (when using mounted home page), when setting cookies,
   the expire time is automatically set as one month from current
   date, and when clearing cookies the expire time is it is set as
   01.01.1970.. It's really strange that the expire time is current
   time on your system..




   Murat Yücel wrote:

   Hi Serkan

   I am using firefox 3.1 beta2, but i dont think that this is a
   browser
   related issue, because i am seeing the same behavior in IE7.
   The cookies are created for both FF and IE. The problem is
   that they get a
   expire date set to current time, which means that they
   are not available anymore. If i remove the mount they will get
   a expire date
   in the future and the typed value will stay in the input
   field.

   For example with mount i type admin in the first input field
   and password in
   the second. Press the login link and i see that the
   input fields are reset. If i remove the mount and do the same,
   admin and
   password will stay in the input fields.

   /Murat

   2009/1/6 Serkan Camurcuoglu serkan.camurcuo...@telenity.com
   mailto:serkan.camurcuo...@telenity.com


   Hi Murat,
   It seems to work both ways in my setup. I'm using Firefox
   3.0. It
   successfully saves the username and password when I check
   the remember me
   checkbox, and clears them when I uncheck it. Did you check
   the host, path
   and the values of the cookies in your browser?




   Murat Yücel wrote:


   Hi again

   Did anyone had the time to look at the attached project?
   Are you guys seeing the same behaviour?

   /Murat

   2008/12/31 Murat Yücel kodeperke...@gmail.com
   mailto:kodeperke...@gmail.com




   Hi Cemal

   Thanks for the response. I have attached the
  

project.


   If you uncomment this line:
   mountBookmarkablePage(homepage, HomePage.class);

   in WicketApplication.java, then you can see the
   difference in the
   behaviour.

   /Murat

   2008/12/31 jWeekend jweekend_for...@cabouge.com
   mailto:jweekend_for...@cabouge.com





   Murat,

   It is OK, just delete the target folder and
   zip it up before sending
   your
   quickstart project to this list.

   Regards - Cemal

Re: Back button + dataview problem

2009-01-08 Thread Serkan Camurcuoglu

so categoryDao implements java.io.Serializable but it cannot be serialized?


quizzical wrote:

Thanks, that seems to be the problem, I'm getting NotSerializableException,
the offending objects are injected using @SpringBean, which I thought
injected a proxy. I've read the docs online for spring-annot and I can't see
why this should be happening.

I'm running glassfish and the log has this to say about the error: 


'Cannot serialize session attribute categoryDao for session'

Where categoryDao is the injected variable.

Any idea what I'm doing wrong? 
Cheers




Serkan Camurcuoglu-3 wrote:
  
did you check your logs, if you are getting NotSerializableExceptions in 
the background you may get page expired errors with back button..



quizzical wrote:


Hi everyone,

I'm in the process of writing an example ecommerce app to get to know
wicket
and am really enjoying the experience.. At the moment I'm working on a
page
which allows you to browse through a list of items in a database.

For the list of items I created a panel which uses a DataView with a
SortableDataProvider and some orderByLinks, I also created a panel for
viewing the available categories which controls the data the DataView is
working on.

Everything works fine going forwards, I'm running into problems with the
back button. If I click on any of the links in these panels, then click
the
back button, then try and click another link I get a 'page expired' error
page.

Do I need to addStateChange on one of my components? If so which one, I
can't find much info about Change and how it is meant to be used.

If this is a simple problem and someone can answer my question easily
then I
will be very happy :) I have had a look through the forums but I couldn't
find anything that helped me, it is possible of course that I was using
the
wrong terms. If there is not enough information here then let me know and
I
will write a test case and post that.

Cheers very much
Alex
  
  

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






  



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



RE: AjaxCheckBox not working

2009-01-08 Thread Serkan Camurcuoglu
did you call setOutputMarkupId(true) and setOutputMarkupPlaceHolderTag(true) on 
your panel? setOutputMarkupId(true) is required for the panel to have an id, 
and setOutputMarkupPlaceHolderTag(true) is required if it will be initially 
invisible..


-Original Message-
From: wicketworker [mailto:siva.mad...@gmail.com]
Sent: Thu 1/8/2009 10:22 PM
To: users@wicket.apache.org
Subject: AjaxCheckBox not working
 

I am trying to display a panel when the user clicks on the check box. Ajax
request is getting fired and response is not getting processed by the
browsder with an error.


INFO: Received ajax response (2681 characters)
INFO: 
?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
id=preReleasePanel2b ![CDATA[ 
div id=preReleaseGroupBox2c class=ricGroupbox
ric:collapsible=collapsed ric:title=Pre-Release 
table align=center 
 tr id=comments_id 
tdlabel id=commentsLabelComments
:/label/td 
td align=lefttextarea cols=50
name=preReleasePanel:preReleaseGroupBox:comments ric:maxchars=250
rows=3Adding Comments/textarea/td 
/tr 
 /table 
/div 
]]/componentevaluate![CDATA[Ricola.init( $('#preReleasePanel2b')
);]]/evaluateevaluate![CDATA[Ricola.page.hidePleaseWait();]]/evaluate/ajax-response

INFO: Response parsed. Now invoking steps...
ERROR: Component with id [[preReleasePanel2b]] a was not found while trying
to perform markup update. Make sure you called
component.setOutputMarkupId(true) on the component whose markup you are
trying to update.
INFO: Response processed successfully.

I can clearly see that preReleasePanel2b is there in the response, can
anyone please tell me why i am getting this error.



-- 
View this message in context: 
http://www.nabble.com/AjaxCheckBox-not-working-tp21360165p21360165.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



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

Re: FormComponent cookie persistent issue

2009-01-07 Thread Serkan Camurcuoglu
In my case (when using mounted home page), when setting cookies, the 
expire time is automatically set as one month from current date, and 
when clearing cookies the expire time is it is set as 01.01.1970.. It's 
really strange that the expire time is current time on your system..




Murat Yücel wrote:

Hi Serkan

I am using firefox 3.1 beta2, but i dont think that this is a browser
related issue, because i am seeing the same behavior in IE7.
The cookies are created for both FF and IE. The problem is that they get a
expire date set to current time, which means that they
are not available anymore. If i remove the mount they will get a expire date
in the future and the typed value will stay in the input
field.

For example with mount i type admin in the first input field and password in
the second. Press the login link and i see that the
input fields are reset. If i remove the mount and do the same, admin and
password will stay in the input fields.

/Murat

2009/1/6 Serkan Camurcuoglu serkan.camurcuo...@telenity.com

  

Hi Murat,
It seems to work both ways in my setup. I'm using Firefox 3.0. It
successfully saves the username and password when I check the remember me
checkbox, and clears them when I uncheck it. Did you check the host, path
and the values of the cookies in your browser?




Murat Yücel wrote:



Hi again

Did anyone had the time to look at the attached project?
Are you guys seeing the same behaviour?

/Murat

2008/12/31 Murat Yücel kodeperke...@gmail.com



  

Hi Cemal

Thanks for the response. I have attached the project.

If you uncomment this line:
mountBookmarkablePage(homepage, HomePage.class);

in WicketApplication.java, then you can see the difference in the
behaviour.

/Murat

2008/12/31 jWeekend jweekend_for...@cabouge.com






Murat,

It is OK, just delete the target folder and zip it up before sending
your
quickstart project to this list.

Regards - Cemal
http://www.jWeekend.co.uk jWeekend



Murat Yücel-2 wrote:


  

By the way i am using wicket 1.3.5. I dont know if you need other
information?
I can send the quickstart project if anyone is interested. I dont know




if


  

it
is okey
to attach it to the mailing list.

/Murat

2008/12/29 Murat Yücel kodeperke...@gmail.com





Hi All

I have a strange problem with persisting form component values.

In my project i have a SignInPanel. The SignInPanel has a rememberMe
checkbox. If the checkbox is
checked then the values will get persisted in a cookie. This part is
working very well if the user doesnt
login from a mounted bookmarkable page.
If the user login from a mounted bookmarkable page, then i can see
that
the
value is saved by calling
the CookieValuePersister, but on load the values are gone again.

I have made a simple quickstart project and i am seing the same


  

behaviour

  

here. Am I missing something?


Why doesnt cookie persist work for a mounted bookmarkable page?

Hope that you can help.

Kind regards

/Murat



  


--
View this message in context:

http://www.nabble.com/FormComponent-cookie-persistent-issue-tp21197389p21230575.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




  
  

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





  



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



Re: FormComponent cookie persistent issue

2009-01-07 Thread Serkan Camurcuoglu
is your application deployed to the root context (e.g. / ) ? Because 
your working cookie path is / while the cookie path that is not working 
is something like /homepage/wicket:interface/:0: . In my setup (I'm 
using the quickstart project that you sent) the path of my cookie is 
always /myproject which is the context path of the application. Can you 
repeat the same behavior using your own quickstart project? I suggest 
you to use wireshark or live http headers firefox plugin to check the 
http headers to see what's going on..





Murat Yücel wrote:

Hi Serkan

I must have seen wrong before. I am getting the same thing as you have 
described. The expire date is one month in the future.
The only difference is in the path variable. If you clear your cookies 
and type something in the input fields when mount is enabled.

Are you then able to see them again when you press the login button?

I have attached some screenshots of the cookie and the webpage I see 
with and without mount.


/Murat

2009/1/7 Serkan Camurcuoglu serkan.camurcuo...@telenity.com 
mailto:serkan.camurcuo...@telenity.com


In my case (when using mounted home page), when setting cookies,
the expire time is automatically set as one month from current
date, and when clearing cookies the expire time is it is set as
01.01.1970.. It's really strange that the expire time is current
time on your system..




Murat Yücel wrote:

Hi Serkan

I am using firefox 3.1 beta2, but i dont think that this is a
browser
related issue, because i am seeing the same behavior in IE7.
The cookies are created for both FF and IE. The problem is
that they get a
expire date set to current time, which means that they
are not available anymore. If i remove the mount they will get
a expire date
in the future and the typed value will stay in the input
field.

For example with mount i type admin in the first input field
and password in
the second. Press the login link and i see that the
input fields are reset. If i remove the mount and do the same,
admin and
password will stay in the input fields.

/Murat

2009/1/6 Serkan Camurcuoglu serkan.camurcuo...@telenity.com
mailto:serkan.camurcuo...@telenity.com

 


Hi Murat,
It seems to work both ways in my setup. I'm using Firefox
3.0. It
successfully saves the username and password when I check
the remember me
checkbox, and clears them when I uncheck it. Did you check
the host, path
and the values of the cookies in your browser?




Murat Yücel wrote:

   


Hi again

Did anyone had the time to look at the attached project?
Are you guys seeing the same behaviour?

/Murat

2008/12/31 Murat Yücel kodeperke...@gmail.com
mailto:kodeperke...@gmail.com



 


Hi Cemal

Thanks for the response. I have attached the project.

If you uncomment this line:
mountBookmarkablePage(homepage, HomePage.class);

in WicketApplication.java, then you can see the
difference in the
behaviour.

/Murat

2008/12/31 jWeekend jweekend_for...@cabouge.com
mailto:jweekend_for...@cabouge.com




   


Murat,

It is OK, just delete the target folder and
zip it up before sending
your
quickstart project to this list.

Regards - Cemal
http://www.jWeekend.co.uk jWeekend



Murat Yücel-2 wrote:


 


By the way i am using wicket 1.3.5. I dont
know if you need other
information?
I can send the quickstart project if
anyone is interested. I dont know


   


if


 


it
is okey
to attach it to the mailing list.

/Murat

2008/12/29 Murat Yücel
kodeperke...@gmail.com
mailto:kodeperke...@gmail.com



   


Hi All

I have a strange problem with
persisting

Re: [OT] PHP based Open Source Content Management Systems

2009-01-07 Thread Serkan Camurcuoglu

I stumbled upon this page yesterday:

http://www.packtpub.com/article/2008-open-source-cms-award-winner-announced



James Perry wrote:

Does anyone have a recommendation for a PHP Open Source Content Management
System? I ask as I volunteered to setup my local running club's web site and
I'm constrained to PHP due to their hosting plan. I would be grateful for a
recommendation if you have experience with them.

Best,
JP.

  



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



Re: FormComponent cookie persistent issue

2009-01-06 Thread Serkan Camurcuoglu

Hi Murat,
It seems to work both ways in my setup. I'm using Firefox 3.0. It 
successfully saves the username and password when I check the remember 
me checkbox, and clears them when I uncheck it. Did you check the host, 
path and the values of the cookies in your browser?




Murat Yücel wrote:

Hi again

Did anyone had the time to look at the attached project?
Are you guys seeing the same behaviour?

/Murat

2008/12/31 Murat Yücel kodeperke...@gmail.com

  

Hi Cemal

Thanks for the response. I have attached the project.

If you uncomment this line:
mountBookmarkablePage(homepage, HomePage.class);

in WicketApplication.java, then you can see the difference in the
behaviour.

/Murat

2008/12/31 jWeekend jweekend_for...@cabouge.com




Murat,

It is OK, just delete the target folder and zip it up before sending your
quickstart project to this list.

Regards - Cemal
http://www.jWeekend.co.uk jWeekend



Murat Yücel-2 wrote:
  

By the way i am using wicket 1.3.5. I dont know if you need other
information?
I can send the quickstart project if anyone is interested. I dont know


if
  

it
is okey
to attach it to the mailing list.

/Murat

2008/12/29 Murat Yücel kodeperke...@gmail.com



Hi All

I have a strange problem with persisting form component values.

In my project i have a SignInPanel. The SignInPanel has a rememberMe
checkbox. If the checkbox is
checked then the values will get persisted in a cookie. This part is
working very well if the user doesnt
login from a mounted bookmarkable page.
If the user login from a mounted bookmarkable page, then i can see that
the
value is saved by calling
the CookieValuePersister, but on load the values are gone again.

I have made a simple quickstart project and i am seing the same
  

behaviour
  

here. Am I missing something?
Why doesnt cookie persist work for a mounted bookmarkable page?

Hope that you can help.

Kind regards

/Murat

  


--
View this message in context:
http://www.nabble.com/FormComponent-cookie-persistent-issue-tp21197389p21230575.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


  


  



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



[OT] Merb-Rails Merge

2008-12-23 Thread Serkan Camurcuoglu

This page 
http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3
http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3  made
me dream about a world where all Java web frameworks merge into Wicket :)
-- 
View this message in context: 
http://www.nabble.com/-OT--Merb-Rails-Merge-tp21151511p21151511.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: Container managed authentication

2008-12-19 Thread Serkan Camurcuoglu
First, one recommendation is, adding the following lines to your 
filter-mapping element may cause wicket filter to be used when the 
container automatically forwards to your login page.


dispatcherREQUEST/dispatcher
dispatcherINCLUDE/dispatcher
dispatcherFORWARD/dispatcher

Containers usually keep the original request address and then they 
automatically redirect to the original address after successful login, 
so you may not have to keep the original intercepted request. Actually, 
the normal way of doing container managed authentication is to declare 
all your wicket urls as protected resources, and using a non-protected 
login page. Anyway, I have done container managed authentication by 
using a simple jsp instead of a wicket page, and I've only used tomcat, 
so I can't help you directly. I think you should keep on experimenting 
using this information, and you will definitely be able to find a 
solution. Good luck..




INCLUDE
J.AL wrote:
Have tried this, and I was probably a bit diffuse in my problem description. 


If we try to redirect to j_security_check from our login page mounted at
/slogin we get the typical HTTP Status 400 - Invalid direct reference to
form login page. Using a dummy page as the sign in page mounted at /login,
and protecting this by the security constraint that uses the real login
page mounted at /slogin as its form-login-page works, but then we need a way
to access the servletresponse in WebApplications's
newWebRequest(HttpServletRequest requesst) method so we can redirect to the
initially requested page.

Using this approch a new problem occured: accessing /login should force the
container to redirect to /slogin, but then JBoss just gives us a HTTP Status
404 - /app/slogin. Accessing it directly works fine, so now it seems like
the wicket filter isn't used when the container redirects to the
form-login-page.

Since a request might include something like /application/page?hostname=mmi3
we need to
redirect to the intercepted page after login, and this could be solved if
there is a way to access the
HttpServletResponse associated with the HttpServletRequest supplied to the
Application's newWebRequest(HttpServletRequest request).

We use this method as a hook to check for a existing principal(eg. logged in
by another application) and then store it in session for wicket-auth to take
over. What we need is to redirect the user to the the initially requested
page if the servlet request have a principal and our session don't. The
initial requested page and its params are stored in the session when a
onUnauthorizedComponentInstantiation() method call is triggered. 





Serkan Camurcuoglu-3 wrote:
  
If the problem is caused by the fact that your protected resource and 
login page are the same, why not mount your login page at another url in 
addition to /login, for example /slogin or something..




J.AL wrote:


Hi, we have standardized our web applications on the wicket framework
(from a
myriad of different frameworks), and are now looking to integrate
authentication/authorization with conainter based Single Sign On using a
valve in jboss/tomcats pipeline. 


We use wicket-auth-roles for authorization in wicket, and everything is
configured so that the authorization requests end up in servlet requests
isUserInRole() method. Everything regarding the SSO and authorization
works
fine, but we're having trouble to actually authenticate using a wicket
based
login page. 



Following the strategy from
http://cwiki.apache.org/WICKET/servlet-container-authentication.html our
web.xml setup is like this:

web.xml setup

filter-mapping
filter-namewicket/filter-name
url-pattern/*/url-pattern
/filter-mapping

security-constraint
display-nameLogin page/display-name
web-resource-collection
web-resource-nameLogin page/web-resource-name
url-pattern/login/url-pattern
http-methodGET/http-method
http-methodPOST/http-method
/web-resource-collection
auth-constraint
role-name*/role-name
/auth-constraint
/security-constraint

login-config
auth-methodFORM/auth-method
realm-namesso/realm-name
form-login-config
form-login-page/login/form-login-page
form-error-page/login/form-error-page
/form-login-config
/login-config


/login is our wicket login page that dispatches(using
requestdispatcher.include()) the input to the
j_security_check?j_usernamej_passwordj_profile check, and then checks
the
request for a principal and redirect to the originally intercepted page
(ignoring response from the dispatched request). 


The problem is that this setup works as a dream in Jetty, but in JBoss
the
current web.xml setup do not work, since the protected login page and the
form-login-page is the same. In other words, the solution on wickets
wiki
do not seem to work well on JBoss containers.

A option is to make the form

Re: Looking for the previous thread about pagingnavigator with infinite pages

2008-12-04 Thread Serkan Camurcuoglu

yes that was it, thanks very much..


Wayne Pope wrote:

not sure if this is the one you mean - it was titled :

Is there any other way? DataProviders must hit the Db twice

On Wed, Dec 3, 2008 at 3:41 PM, Serkan Camurcuoglu
[EMAIL PROTECTED] wrote:
  

Hi all,
Sorry for disturbing but I remember I've read a discussion about implementing a 
paging navigator for an unknown (possibly infinite) number of pages in the list 
recently, but I haven't been able to find it on Nabble. Can somebody send me 
the link of this thread if you can find or remember the original discussion?

Best regards,

SerkanC


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




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


  



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



Re: Clearing Cache after Logout

2008-12-04 Thread Serkan Camurcuoglu
you can set your application's home page as your expired page or throw a 
restartresponseexception (to home page) from the constructor of your 
page expired page.. at least I do it that way..



vishy_sb wrote:

Thanks for the reply there Nino. I have set up a custom expired page and have
set the following in Application class 
getApplicationSettings().setPageExpiredErrorPage(PageExpired.class);


Now the page expired is set to this page. But still on hitting the back
button I get back to the page. I tried  using the
SimplePageAuthorizationStrategy in my Application.init() method. The code
that put in there looks something like this

SimplePageAuthorizationStrategy authorizationStrategy = new
SimplePageAuthorizationStrategy(
LimitManagerPage.class, PageExpired.class)
{
protected boolean isAuthorized() {
// Authorize access based on user 
authentication in the session
if(((WebSession) 
Session.get()).isSessionInvalidated()){
return false;
} else {
return true;
}
}
};
 
 	getSecuritySettings().setAuthorizationStrategy(authorizationStrategy);


But this doesn't provide the desired result as well. This doesn't even show
my custom PageExpired web page. Any ideas about why this is not working or
something else that I can do to get this to work.

Thanks in advance,
vishy


  



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



Looking for the previous thread about pagingnavigator with infinite pages

2008-12-03 Thread Serkan Camurcuoglu

Hi all,
Sorry for disturbing but I remember I've read a discussion about 
implementing a paging navigator for an unknown (possibly infinite) 
number of pages in the list recently, but I haven't been able to find it 
on Nabble. Can somebody send me the link of this thread if you can find 
or remember the original discussion?


Best regards,

SerkanC


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



Re: onLoad javascript event with Markup inheritance

2008-11-25 Thread Serkan Camurcuoglu
you should implement the IHeaderContributor interface in your page and 
use IHeaderResponse.renderOnLoadJavascript() method in the 
implementation of the renderHead method..




Ernesto Reinaldo Barreiro wrote:

Something like:

HTML

wicket:extend   script wicket:id=script
type=text/javascriptalert('Hi');/script
  .
/wicket:extend

Java code:

Label script = new Label(script, new ModelString()) {
private static final long serialVersionUID = 1L;

@Override
protected void onComponentTagBody(MarkupStream markupStream, ComponentTag
openTag) {
StringBuffer sb = new StringBuffer();
sb.append(var );
// some more Javascript code...
replaceComponentTagBody(markupStream, openTag, sb.toString());
}
};
addOrReplace(script);

does not work? I use that kind of things for panel and works just fine...
That should also work for extend...

Best,

Ernesto

On Tue, Nov 25, 2008 at 3:08 PM, itayh [EMAIL PROTECTED] wrote:

  

Hi,

I use Markup inheritance in my site in order to keep common logic in the
base page.
I would like my child pages to do certain javascript actions when they are
loaded. I try to define the the javascript on the childs body (between the
wicket:extend and /wicket:extend) but I don't see them in the generated
page (the base + child page). Any Idea how to generate onLoad javascript
action for child page?
--
View this message in context:
http://www.nabble.com/onLoad-javascript-event-with-Markup-inheritance-tp20681885p20681885.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]





  



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



Re: Wicket portlet

2008-11-10 Thread Serkan Camurcuoglu
though I've only used it in Jetspeed portal, I strongly recommend Wicket 
instead of Struts2 for portlet development..




Danny van Bruggen wrote:

Hi Pierre,

As far as I know (and I'm not an authority,) the status is as follows:

- portlet 1.0 support is OK
- portlet 2.0 support should be implemented soon (maybe it has
already been done?)
- Websphere is broken and does not accept Wicket portlets. Neither WS
or Wicket want to fix it.

Hopefully someone can give you more inside information ;)

Danny

On Thu, Nov 6, 2008 at 8:25 PM, Pierre Goupil [EMAIL PROTECTED] wrote:
  

Hello all,

I'm currently evaluating Struts2 Vs. Wicket 1.3.5 as a Web framework in a
portlet environment. I'm using eXo WebOS as a portal.

My question is : what's the status of portlet support in Wicket ? I don't
really care about portlet 1.0 or 2.0 but I'm looking for a fairly robust and
easy-to-go integration of my Web framework and my portal.

Hope to be clear !

Cheers,

Pierre



--
Parce que c'est la nuit qu'il est beau de croire en la lumière.




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


  



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



Re: Wicket portlet

2008-11-10 Thread Serkan Camurcuoglu
I think you can write an implementation of this interface for eXo portal 
if you know a bit about its internals.. If eXo portal supports the 
portlet 2.0 spec, then it should be really simple since the portal will 
already have some way of generating resource urls, and you will delegate 
the call to this mechanism.. AFAIK, resource URLs are important for 
resource serving and wicket Ajax functionality..



Pierre Goupil wrote:

Hello again,

I did find this wiki page. Quoting it :

---
First of all, you need to make sure the portal (e.g. Liferay ) provides an
implementation of the Apache Portals Bridges
PortletResourceURLFactoryinterface, see:
PortletResourceURLFactoryhttp://portals.apache.org/bridges/multiproject/portals-bridges-common/xref/org/apache/portals/bridges/common/PortletResourceURLFactory.html
---

I don't know whether this interface is fully portlet spec compliant or not,
but anyways, my portal of choice is eXo platform (in WebOS mode) and it
doesn't provide it.

I am stuck or... ?

Regards,

Pierre



On Mon, Nov 10, 2008 at 1:48 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Could people who use wicket in some portal container create a wiki page and
report if it's working, working with problems or just not working?

maybe a sub page to this: http://cwiki.apache.org/WICKET/portal-howto.html







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



Re: Help with simple CheckBox example

2008-10-31 Thread Serkan Camurcuoglu

yes, the code works except some serialization errors..



Alan Romaniusc wrote:

I can see no problem in your code. Maybe something else?

On Fri, Oct 31, 2008 at 12:29 PM, ds26680 [EMAIL PROTECTED] wrote:
  

I am new to creating web applications with Wicket and I am struggling with
getting a CheckBox to set a boolean variable in my domain object using a
PropertyModel.

I have had a good search around on the web for examples and I think the code
bellow should work just fine. However when I click the submit button on my
form (after checking the checkbox), the domain model is not updated and the
print line in the onSubmit method always returns false.

I have watched this code in the debugger and the setSelected method (in
domain class) never gets called.  Does anyone have an idea why the code
bellow should not work?

I have created the following Java code for the view:-

   public HomePage() {

   MyForm form = new MyForm(form);
   add(form);
   }

   private class MyForm extends Form {

   private CheckBoxModel checkBoxModel = new CheckBoxModel();

   public MyForm(String s) {
   super(s);

   CheckBox myCheckBox = new CheckBox(selected,
   new PropertyModel(checkBoxModel, selected));
   add(myCheckBox);
   }

   protected void onSubmit() {
   boolean bool = checkBoxModel.getSelected();

   // I expect this to print true when check box has been clicked
   System.out.println(bool);
   }
   }

My domain class is as follows:-

  public class CheckBoxModel {

   private boolean selected;

   public boolean getSelected() {
return selected;
   }

   public void setSelected(boolean selected) {
this.selected = selected;
   }

   public String toString() {
return String.valueOf(selected);
   }
  }

Thanks in advance for your help.
--
View this message in context: 
http://www.nabble.com/Help-with-simple-CheckBox-example-tp20267081p20267081.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]







  



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



Re: Problem with using wicket as a filter

2008-10-27 Thread Serkan Camurcuoglu

can you put a breakpoint in ProxyDirContext and check what name is being
looked up?




Roberto Fasciolo wrote:
 
 Hi again,
 
 in addition to what I've already said I want to point out what I've found
 out by profiling two really simply applications serving just a page
 without any dynamic content, one using a wicket page and one using a JSP.
 
 The test was about having a small http client invoking that page with 10
 concurrent threads for 1 minute.
 
 When using the jsp version the server uses about 1 second of CPU time, all
 about serving the content, while with wicket the CPU time is about 90
 seconds (more than 1 minute because it's multithreaded). 1% of those 90
 seconds is spent in actually serving the content, the other 99% it's used
 in figuring out the mapping (as described in the previous post).
 
 -Roberto
 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-using-wicket-as-a-filter-tp20171597p20183446.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: Problem with using wicket as a filter

2008-10-27 Thread Serkan Camurcuoglu

you don't need to recompile tomcat, it's enough to mount tomcat's sources to
your ide, or you can use the command line jdb debugger..




Roberto Fasciolo wrote:
 
 Well, I think I could but that's a tomcat internal class, so I should
 recompile the entire tomcat source tree and then run those tests against
 that.
 
 I'd rather try configuring wicket as a servlet and see if the problem is
 still there, but I'd like to know that are the drawbacks of doing it in
 that way. Of course I can also try the terrible kludge of just mapping an
 empty servlet to the address of the wicket page and see if the situation
 would improve, but I wouldn't really like to bring that horrible kludge to
 any production system.
 
 If you think it would help I can provide you both the test wars I've used.
 
 Thanks,
 -Roberto
 
 
 Serkan Camurcuoglu wrote:
 
 can you put a breakpoint in ProxyDirContext and check what name is being
 looked up?
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-using-wicket-as-a-filter-tp20171597p20184165.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: Associating a request to a Session

2008-10-23 Thread Serkan Camurcuoglu

I think your session id changes because you access the server as
localhost:8080 for the first time, but yahoo forwards you back to
www.bioscene.co.jp (which I think is the same host), so you access the same
server with a different host name, and your browser does not send the same
cookie..

I hope I did not get it all wrong..




David Leangen-8 wrote:
 
 Yeah... didn't explain this well.
 
 Here's the thread in context:
 
 http://www.nabble.com/Associating-a-request-to-a-Session-td19641227.html
 
 And here's headers of the handshake(with some editing for privacy and
 brevity)...
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Associating-a-request-to-a-Session-tp19641227p20124897.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: Associating a request to a Session

2008-10-23 Thread Serkan Camurcuoglu

I'm glad it worked :)




David Leangen-8 wrote:
 
 
 Thanks for taking the time to look at this. I got so used to debugging
 this way that I didn't even think about that.
 
 

-- 
View this message in context: 
http://www.nabble.com/Associating-a-request-to-a-Session-tp19641227p20125368.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: ListView broken?

2008-10-23 Thread Serkan Camurcuoglu

it seems like template.getQuestions() returns a model which has a
QuestionAndAnswer instance instead of a list as its model object.. The code
on the line where the exception is thrown is:

return ((List)listView.getModelObject()).get(index);

which indicates that your problem is trying to cast a QuestionAndAnswer
instance to a List. Everyone is using ListView and it cannot be broken this
way :)




Pieter Claassen wrote:
 
 I am getting a classcast exception in ListView that is stumping me.
 
 This is the error message (top few lines)
 
 WicketMessage: Error attaching this container for rendering:  
 [MarkupContainer [Component id = questioneditform]]
 
 Root cause:
 
 java.lang.ClassCastException: com.musmato.model.QuestionAndAnswer
 at  
 org 
 .apache 
 .wicket.markup.html.list.ListItemModel.getObject(ListItemModel.java:55)
 at org.apache.wicket.Component.getModelObject(Component.java:1558)
 at com.musmato.wicket.pages.templates.TemplateEditPage$QuestionEditForm 
 $1.populateItem(TemplateEditPage.java:93)
 
 
 This is the code that generates my ListItems:
 
   ListView questions = new ListView(questions, template
   .getQuestions()) {
 
 
   @Override
   protected void populateItem(ListItem item) {
   final QuestionAndAnswer qanda = 
 (QuestionAndAnswer) item
   .getModelObject();
   setModel(new 
 CompoundPropertyModel(qanda));
 
 
 
 I know for a fact that template.getQuestions() produces an ArrayList.
 
 The arraylist works when there is only 1 item in it but when I have  
 more than 1 item, it fails with the ClassCastException. Is this a  
 wicket problem or am I doing something wrong?
 
 Regards,
 Pieter
 pieter claassen
 [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/ListView-broken--tp20126952p20127126.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: ListView broken?

2008-10-23 Thread Serkan Camurcuoglu

I suspect there may be a strange interaction with compound property models,
since the name of your listview is questions and you also have a
getQuestions() method in your upper level model object.. I'm just guessing
but can you try to change the name of your listview to questionList
instead of questions and try again..

by the way are you sure that you've rebuilt and redeployed your
application..
-- 
View this message in context: 
http://www.nabble.com/ListView-broken--tp20126952p20128604.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: DateTextField, format not valid, message key

2008-10-20 Thread Serkan Camurcuoglu

grepping the wicket source I found in file
src/jdk-1.4/wicket/src/main/java/org/apache/wicket/Application.properties:

IConverter='${input}' is not a valid ${type}.

but I don't know if you can specify a separate message for type Date..





Goran Novak wrote:
 
 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-tp20069519p20071815.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: DateTextField, format not valid, message key

2008-10-20 Thread Serkan Camurcuoglu

Wicket in Action book says that IConverter.Date should work..




Serkan Camurcuoglu wrote:
 
 grepping the wicket source I found in file
 src/jdk-1.4/wicket/src/main/java/org/apache/wicket/Application.properties:
 
 IConverter='${input}' is not a valid ${type}.
 
 but I don't know if you can specify a separate message for type Date..
 
 
 
 
 
 Goran Novak wrote:
 
 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-tp20069519p20071867.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: Permgen OOM - *not* reloading context

2008-10-19 Thread Serkan Camurcuoglu

AFAIK permanent generation keeps class reflection data..

one option is it may simply be that you have too many classes and the
permanent generation space is not enough, after a few hours of running all
parts of your application are touched by your users, all classes are loaded
and your permanent generation is full.. in this case increasing the
permanent generation size using -XX:MaxPermSize would solve your problem..

another option I can think of is, maybe Spring or Hibernate is generating
too many dynamic proxy classes..

anyway I would recommend using a profiler to debug this case if you have the
chance to do so..




dukehoops wrote:
 
 Our production servers running tomcat6, JVM 1.6 and Wicket 1.3.4 are
 running out of PermGen space after a couple of hours an a few thousands
 requests, eventually resulting in cannot detach Request from Session
 exceptions followed by PermGen OOM. We are NOT reloading app contexts -
 appservers are fully restarted when needed. 
 
 We are running spring 2 and Hibernate 3.3. We recently started using
 Compound Property Models extensively. Model objects are DTOs that are NOT
 Hibernate entities. 
 
 Any advice on how to go about debugging this? If i undetstand basics of
 permgen correctly, oom means something keeps loading new classes (not
 simply class instances) Should we be looking at wicket's persistent store 
 

-- 
View this message in context: 
http://www.nabble.com/Permgen-OOM---*not*-reloading-context-tp20060589p20060759.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: DHTML DnD best practice?

2008-10-16 Thread Serkan Camurcuoglu

it seems like you're talking about the DnD version of the Palette component
in wicket extensions.. See its source code, maybe it will give you some
idea.. 




Neil McT wrote:
 
 Hi,
 
 I'm wondering what would be the best way to enable dhtml drag n drop in
 Wicket.
 
 Its a fairly typical use-case I have 2 divs, one is a container of
 draggables, the other is a container of droppables - i.e. where the
 draggables will be dragged to. This is not an ajax question as there is no
 need for any server side round-trip on each drop - only some kind of
 submit button once the user is happy with what they have dragged on.
 
 I have the front-end component working (using jquery ui drag n drop) but
 my question is... what would be the recommended way to communicate the
 dropped objects to the server side using wicket? I.e. what would be the
 recommended component to bind the 'droppable' container (or individual
 droppable objects) to and how would you guys recommend that I reconstruct
 the dropped objects on the server side?
 
 I have thought of various ways I can enable this, but none of these seem
 particularly like the 'right' Wicket way - and kind of smack of the way I
 would have done things in, say, struts.
 
 Thanks in advance.
 

-- 
View this message in context: 
http://www.nabble.com/DHTML-DnD-best-practice--tp20010633p20012188.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: DHTML DnD best practice?

2008-10-16 Thread Serkan Camurcuoglu

sorry for the misunderstanding, I meant to say you're trying to build a DnD
version of the palette (which doesn't exist yet :)..



Neil McT wrote:
 
 Hmm... I can only find the non-DnD version of the palette. Any idea where
 the DnD version lives?
 
 
 
 Serkan Camurcuoglu wrote:
 
 it seems like you're talking about the DnD version of the Palette
 component in wicket extensions.. See its source code, maybe it will give
 you some idea.. 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/DHTML-DnD-best-practice--tp20010633p20016823.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: Trouble printing image

2008-10-14 Thread Serkan Camurcuoglu

while serving the image resource, setting the Content-Disposition http header
to

inline; filename=x.png

might help, but this is just a guess..





Dane Laverty wrote:
 
 I'm adding an image to my page with the following code. It works
 correctly, and the image displays fine. However, we are getting reports
 from some IE users that the image will not print. It prints fine for
 most IE users, but there are a handful who can't get it to print. 
 
  
 
 While I don't know the reason, I did notice that when you right-click
 the image and Save As..., it doesn't have a name. In IE, the Save As
 dialog calls it untitled.bmp (in spite of it being a png) and in
 Firefox it's print.png. Perhaps this is the source of the issue? If
 so, how do you give an image a name when you're adding it as a Resource?
 
  
 
 (For anyone who's interested in looking, you can find the offending
 image at http://foodhandler.org. Log in with username/password
 guest/guest. Then click the Print Your Card button on the navigation
 bar. When you print the page, the only two images that should print are
 the Thawte 100% Secure image at the top of the page and the card image
 in the center of the page - the rest are turned off in a print
 stylesheet.)
 
  
 
 PrintPage.java:
 
  
 
 public class PrintPage extends NavigationTemplate
 
 {
 
   public PrintPage()
 
   {
 
 Resource cardImage = getBothCardImageResource();
 
 add(new NonCachingImage(bothCardImage, cardImage));   
 
 
 
   }
 
  
 
   public Resource getBothCardImageResource()
 
 {
 
 final BufferedDynamicImageResource resource = new
 BufferedDynamicImageResource();
 
 BufferedImage image;
 
 
 
 try {
 
 image = ImageIO.read(((WebApplication)
 Application.get()).getServletContext().getResourceAsStream(/path/to/MyI
 mage.png));
 
   
 
 Graphics graphics = image.getGraphics();
 
 ... Do some stuff with the graphics ...
 
 }
 
 
 
 resource.setImage(image);
 
 return resource;  
 
 }
 
 }
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Trouble-printing-image-tp19980180p19980423.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: Stream/download files through portlet

2008-10-14 Thread Serkan Camurcuoglu

For the DynamicWebResource case, doesn't overriding setHeaders() in
DynamicWebResource and adding your http header in this method work?

By the way, which portlet container are you working with?




Rob Sonke wrote:
 
 Hi,
 
 We're using wicket for our portlets now for almost 3/4 year and it's 
 great. We're following/try to help with the full implementation of jsr 
 286 in wicket too (Thijs and me, see other threads). But I'm having a 
 problem now with offering files through a portlet. There are actually 
 two options, use the resource phase of jsr286 or use a separate download 
 servlet. First option rocks, second option not (if option 1 won't work, 
 I'll have to deal with it but I prefer not).
 
 So I'm trying to serve a file through the portlet based on a wicket 
 link. A normal link would end up in a actionResponse which will not 
 allow you to touch the resourcestream (returning null as the portlet 
 specs describe). An ajax link (which uses the resource phase) will end 
 up with a lot of binary code in the ajax xml output which will, of 
 course, not work.
 
 I tried also adding a DynamicWebResource to a wicket ResourceLink, which 
 works actually pretty good except that he's not communicating the 
 filename to the brower by setting a header. I tried adding a header to 
 the ResourceResponse but that one was not passed to the client too 
 (maybe I did that wrong).
 
 Could anyone point me in the right direction or could tell me what I'm 
 doing wrong over here?
 
 Regards,
 Rob
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Stream-download-files-through-portlet-tp19980617p19981070.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: Stream/download files through portlet

2008-10-14 Thread Serkan Camurcuoglu

In the PLT.12.1.1 section of jsr 286 it says:

Response properties can be viewed as header values set for the portal
application. If these header values are intended to be transmitted to the
client they should be set before the response is committed. When setting
headers in the render lifecycle phase portlets should set the header in the
render headers part or simply override the GenericPortlet.doHeaders method
(see PLT.11.1.1.4.3).

I think you may try:

PortletRequestContext ctx = (PortletRequestContext) RequestContext.get();
PortletResponse presp = ctx.getPortletResponse();
presp.addProperty(header, value);

this is kind of a hack but it might work..




Rob Sonke wrote:
 
 No, too bad. The headers aren't picked up.
 
 
 Serkan Camurcuoglu wrote:
 For the DynamicWebResource case, doesn't overriding setHeaders() in
 DynamicWebResource and adding your http header in this method work?

 By the way, which portlet container are you working with?




 Rob Sonke wrote:
   
 Hi,

 We're using wicket for our portlets now for almost 3/4 year and it's 
 great. We're following/try to help with the full implementation of jsr 
 286 in wicket too (Thijs and me, see other threads). But I'm having a 
 problem now with offering files through a portlet. There are actually 
 two options, use the resource phase of jsr286 or use a separate download 
 servlet. First option rocks, second option not (if option 1 won't work, 
 I'll have to deal with it but I prefer not).

 So I'm trying to serve a file through the portlet based on a wicket 
 link. A normal link would end up in a actionResponse which will not 
 allow you to touch the resourcestream (returning null as the portlet 
 specs describe). An ajax link (which uses the resource phase) will end 
 up with a lot of binary code in the ajax xml output which will, of 
 course, not work.

 I tried also adding a DynamicWebResource to a wicket ResourceLink, which 
 works actually pretty good except that he's not communicating the 
 filename to the brower by setting a header. I tried adding a header to 
 the ResourceResponse but that one was not passed to the client too 
 (maybe I did that wrong).

 Could anyone point me in the right direction or could tell me what I'm 
 doing wrong over here?

 Regards,
 Rob

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



 

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

-- 
View this message in context: 
http://www.nabble.com/Stream-download-files-through-portlet-tp19980617p19981860.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]



Developer.com product of the year nominations

2008-10-12 Thread Serkan Camurcuoglu
I don't know if it's too late but I've seen it today that developer.com is 
accepting nominations for its product of the year competition. Today is the 
last day of nomination. I've nominated Wicket for framework of the year. Maybe 
people would like to do so at 
http://solutions.internet.com/index.php/5176_default/01bdfa206250f2dab9169eb522bf46cf
 . Note that this is just the nomination phase, actual voting shall begin on 
November 3rd..


Re: Fw: DownloadLink, can anyone help me?

2008-10-10 Thread Serkan Camurcuoglu
actually I have no experience with this but just trying to help.. what 
happens when you copy the download link url and paste it into a new 
browser tab, do you get a 404 error? which path does the error specify? 
is it different from the download link url? do you see any exception in 
the logs?




Pablo Scagno wrote:

First of all thanks for you help,
Regarding my problem, yes, I debug It and the code executed without 
any problem, it calls the super method.






--
From: Serkan Camurcuoglu [EMAIL PROTECTED]
Sent: Friday, October 10, 2008 9:34 AM
To: users@wicket.apache.org
Subject: Re: Fw: DownloadLink, can anyone help me?

do you know whether the request reaches your downloadlink? for 
example, you could check it by using:


add(new DownloadLink(download, fileModel) {
 @Override
 public void onClick() {
 System.out.println(onClick of download link called!);
 try {
  super.onClick();
  System.out.println(super onClick was successful);
 } catch (Throwable t) {
  t.printStackTrace();
 }
 }
});

or you could debug it of course..



Pablo Scagno wrote:

FYI
--
From: Pablo Scagno [EMAIL PROTECTED]
Sent: Thursday, October 09, 2008 5:54 PM
To: users@wicket.apache.org
Subject: DownloadLink


Hi,
I was trying to use DownloadLink but for some reason  I couldn't 
make it work.
I'm trying to insert the link in a grid, but when I test the 
application and I click the link, an error page appears The 
webPage cannot be found


this url appears in the page
http:///?wicket:interface=:7:table:rows:1:cells:2:cell:download::ILinkListener:: 



here Is the code where I create the link

public class ActionPanel extends Panel{
   public ActionPanel(String id, IModelDocument model){
   super(id, model);
   try {
   File file = 
((Document)model.getObject()).getOriginalFile();

   IModelFile fileModel = new ModelFile();
   fileModel.setObject(file);
   add(new DownloadLink(download,fileModel));
   } catch (FileNotFoundException e) {
   e.printStackTrace();
   }
   }
}

I've debug the app and I saw that the file was loaded, and the link 
was created without any problem. Can anyone tell me if need 
anything else to make it works?


Thanks in advance

Pablo



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





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




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





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



Re: Fw: DownloadLink, can anyone help me?

2008-10-10 Thread Serkan Camurcuoglu
do you know whether the request reaches your downloadlink? for example, 
you could check it by using:


add(new DownloadLink(download, fileModel) {
 @Override
 public void onClick() {
 System.out.println(onClick of download link called!);
 try {
  super.onClick();
  System.out.println(super onClick was successful);
 } catch (Throwable t) {
  t.printStackTrace();
 }
 }
});

or you could debug it of course..



Pablo Scagno wrote:

FYI
--
From: Pablo Scagno [EMAIL PROTECTED]
Sent: Thursday, October 09, 2008 5:54 PM
To: users@wicket.apache.org
Subject: DownloadLink


Hi,
I was trying to use DownloadLink but for some reason  I couldn't make 
it work.
I'm trying to insert the link in a grid, but when I test the 
application and I click the link, an error page appears The webPage 
cannot be found


this url appears in the page
http:///?wicket:interface=:7:table:rows:1:cells:2:cell:download::ILinkListener:: 



here Is the code where I create the link

public class ActionPanel extends Panel{
   public ActionPanel(String id, IModelDocument model){
   super(id, model);
   try {
   File file = ((Document)model.getObject()).getOriginalFile();
   IModelFile fileModel = new ModelFile();
   fileModel.setObject(file);
   add(new DownloadLink(download,fileModel));
   } catch (FileNotFoundException e) {
   e.printStackTrace();
   }
   }
}

I've debug the app and I saw that the file was loaded, and the link 
was created without any problem. Can anyone tell me if need anything 
else to make it works?


Thanks in advance

Pablo 



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





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



RE: Navigation set active Page

2008-10-09 Thread Serkan Camurcuoglu
I don't think it's a best practice but I set the active link name in the 
session when a navigation link is clicked and then in the base page constructor 
I get the active link name from the session and modify the css class of the 
related link item using an attribute appender..


-Original Message-
From: HITECH79 [mailto:[EMAIL PROTECTED]
Sent: Thu 10/9/2008 2:40 PM
To: users@wicket.apache.org
Subject: Navigation set active Page
 

Hallo,

i want to solve this problem:

I create a Navigation for my project with css. I cant set the active Page in
the Navigation. Body-Problem with child and extend?

Have someone a best-practise or help for me ...

Thanks...
HITECH68


-- 
View this message in context: 
http://www.nabble.com/Navigation-set-active-Page-tp19897122p19897122.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]



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

RE: html code in component class

2008-10-09 Thread Serkan Camurcuoglu
Peter means that you can put html as the string content of a label like this:

Label l = new Label(myLabel, ulliSome html here/li/ul);
l.setEscapeModelStrings(false);
l.setRenderBodyOnly(true);

this way the label will display only the html that you've given..



-Original Message-
From: miro [mailto:[EMAIL PROTECTED]
Sent: Fri 10/10/2008 12:20 AM
To: users@wicket.apache.org
Subject: Re: html code in component class
 

here the html again


spant wicket:id=custmenu
   ult
lit wicket:id=repater
/lit
   /ult
/spant
hml for repeater

spant wicket:id=customlink
At href=# 
wicket:id=linklabelt wicket:id=lbl/label 

please ignore t with every tag its just to show actual html

miro wrote:
 
 Its not just label   here is the html
 
   
  ul
   li wicket:id=repater
   /li
  /ul
   
 hml for repeater
 
   
# label 
 wicket:id=lbl/label 
   
 
 
 instead of writing the same html  at 10 paqlces  i want to write it once
 and reuse it in the please twell me how ?
 
 
 
 Peter Ertl-3 wrote:
 
 If it's just a line use Label
 
 Am 09.10.2008 um 21:01 schrieb miro:
 

 Using panel I have to write a .html   file which I dont want to do  
 becasue my
 html code is very little just a line   ,
 next option is Fragment but this is not clear, neither the api doc  
 nor the
 wicket examples  please can you give me small example  using  
 fragment   ?

 jwcarman wrote:

 What's wrong with using a panel?  If this is to be done in only one
 class, have you thought about using a Fragment?

 On Thu, Oct 9, 2008 at 2:28 PM, miro [EMAIL PROTECTED] wrote:

 the label appears complex i looking for a simple solution

 My custom componentuses wicket components internally  here is an
 example

   protected class CustomLinkComponent extends   
 WebMarkupContainer  {
   String displayName;
   Class  clazz;
   public CustomLinkComponent(String displayName, Class
 clazz) {
   super(customlink);
   this.displayName=displayName;
   this.clazz=clazz;
   add(getBookmarkablePageLink());
   add(getDisplayNameLabel());
   }
   protected BookmarkablePageLink   
 getBookmarkablePageLink(){
   return new BookmarkablePageLink(link,  
 clazz);
   }
   protected  Label  getDisplayNameLabel(){
   return new Label(lbl,displayName);
   }

   }

 the html  for this is
 # label wicket:id=lbl/label

 so instead of writing a html page  i want my component to render  
 this
 html
 and further wicket should replace the child components  link and  
 lbl with
 actual values  ,  can I do this ?




 jwcarman wrote:

 Sure.  Look at what the Label class does.  It doesn't have an HTML
 template.

 On Thu, Oct 9, 2008 at 1:49 PM, miro [EMAIL PROTECTED] wrote:

 like I have  very little html and I dont want a write a  new .html
 file
 and
 just in my component i want to override some method  which  
 returns html
 as
 string  for the component .Is  this possible ?
 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19903944.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]



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




 --
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19904618.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]



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




 -- 
 View this message in context:
 http://www.nabble.com/html-code-in-component-class-tp19903944p19905223.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: nested components

2008-10-08 Thread Serkan Camurcuoglu
according to your previous mail, in the markup you sent, there's a hierarchy 
csrHome - inbox - inboxMenu but in the exception you get, it says that it 
cannot find inboxMenu below path 
0:csrHome.RicolaGroupbox which suggests that you actually have a component with 
id RicolaGroupbox in the middle (although you think its id is inbox I think 
you have given it id RicolaGroupbox in your Java code)..


-Original Message-
From: miro [mailto:[EMAIL PROTECTED]
Sent: Thu 10/9/2008 12:26 AM
To: users@wicket.apache.org
Subject: nested components
 

 My problem is html for nested components  I have a  page to this added 
component A (container) and to this added component B (label)

 page
   A  
 B

now how would html look  for this

  div  wicket id=A
 label wicket:id=B/label 
   /div


is this right   please  tell me ?
 

-- 
View this message in context: 
http://www.nabble.com/nested-components-tp19887925p19887925.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]



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

RE: nested components

2008-10-08 Thread Serkan Camurcuoglu
moreover, if the markup that you sent is a real copy/paste, then in this line

div  wicket id=inbox

the colon in the middle of wicket:id seems to be missing..



-Original Message-
From: Serkan Camurcuoglu [mailto:[EMAIL PROTECTED]
Sent: Thu 10/9/2008 12:43 AM
To: users@wicket.apache.org
Subject: RE: nested components
 
according to your previous mail, in the markup you sent, there's a hierarchy 
csrHome - inbox - inboxMenu but in the exception you get, it says that it 
cannot find inboxMenu below path 
0:csrHome.RicolaGroupbox which suggests that you actually have a component with 
id RicolaGroupbox in the middle (although you think its id is inbox I think 
you have given it id RicolaGroupbox in your Java code)..


-Original Message-
From: miro [mailto:[EMAIL PROTECTED]
Sent: Thu 10/9/2008 12:26 AM
To: users@wicket.apache.org
Subject: nested components
 

 My problem is html for nested components  I have a  page to this added 
component A (container) and to this added component B (label)

 page
   A  
 B

now how would html look  for this

  div  wicket id=A
 label wicket:id=B/label 
   /div


is this right   please  tell me ?
 

-- 
View this message in context: 
http://www.nabble.com/nested-components-tp19887925p19887925.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]





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

Re: GMap2 or Wicket Ajax issue?

2008-10-07 Thread Serkan Camurcuoglu
Do you get this error in firefox? Can you try with IE? This looks like a 
problem I usually have with wicket ajax functionality in gecko based 
browsers..




Doug Leeper wrote:

I am trying to get the latest GMap2 in wicketstuff to work with Wicket 1.3.4
(can't upgrade to 1.4 just yet)

As the mvn repository only is applicable to 1.4, I downloaded the sources
and adjusted the two places that would not compile (both specifically
dealing with generics)

However, when I run my application, I am trying to pop up a Modal window
with a GMap2 instance in it. When I click the AjaxLink and show the window,
I get the following error in my console:

java.io.IOException: The filename, directory name, or volume label syntax is
incorrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:395)
at java.io.File.getCanonicalPath(File.java:531)
at org.mortbay.resource.FileResource.getAlias(FileResource.java:184)
at
org.mortbay.jetty.servlet.DefaultServlet.getResource(DefaultServlet.java:275)
at 
org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:375)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1098)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:246)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at
com.positiontech.hib.HibernateFilter$$M$1a2d7b4a.doFilter(HibernateFilter.java:67)
at 
com.positiontech.hib.HibernateFilter$$A$1a2d7b4a.doFilter(generated)
at com.positiontech.hib.HibernateFilter.doFilter(generated)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
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:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

When I view the Ajax Debug Console, it contains the following information:


INFO: focus set on 
INFO: focus removed from 
INFO: focus set on setTargets15

INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax GET request on
?wicket:interface=:4:contractForm:advertising:setTargets::IBehaviorListener:0:random=0.5156089011856273
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (4665 characters)
INFO:
?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution
encoding=wicket1 ![CDATA[head
xmlns:wicket=http://wicket.apache.org;script type=text/javascript
src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script
script type=text/javascript
src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script
script type=text/javascript
src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script
script type=text/javascript
id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/
wicketAjaxDebugEnable=true;
/*--]^]^*//script

script type=text/javascript
src=resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.js/script
link rel=stylesheet type=text/css
href=resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css
/
script type=text/javascript
src=http://www.google.com/jsapi?key=ABQIzaZpf6nHOd9w1PfLaM9u2xQRS2YPSd8S9D1NKPBvdB1fr18_CxR-svEYj6URCf5QDFq3i03mqrDlbA;/script
script type=text/javascript
id=wicket.contrib.gmap.GMapHeaderContributor_googleload!--/*--![CDATA[/*!--*/
google.load(maps, 2.x);
/*--]^]^*//script

script type=text/javascript
src=resources/wicket.contrib.gmap.GMap2/wicket-gmap.js/script
script type=text/javascript !--/*--![CDATA[/*!--*/
Wicket.Event.add(window, onUnload, function() { google.maps.Unload();;});

Re: How to answer Request with 500 error

2008-10-07 Thread Serkan Camurcuoglu

The WIA book says:

Setting an HTTP status code:
If you want to set an HTTP status code for your page, such as 404 (not 
found), you

can do so by overriding the page’s setHeaders method:

@Override
protected void setHeaders(WebResponse response) {
response.getHttpServletResponse().setStatus(
HttpServletResponse.SC_NOT_FOUND);
super.setHeaders(response);
}

Alternatively, you can throw an AbortWithWebErrorCodeException and 
provide it

with the appropriate error code and an optional message.




Stefan Lindner wrote:

I try to create a watchdog page for our site. My idea was to check the
neccessary resources and respond with a 500 error in case of failure.
So I placed


getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus
(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

in the page constructor and in onAfterRender but the page is displayed
correctly, no 500 error shown in browser.
Any idea?

Stefan

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


  



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



Re: GMap2 or Wicket Ajax issue?

2008-10-07 Thread Serkan Camurcuoglu
well that's beyond me.. what I was talking about was an error similar to 
http://issues.apache.org/jira/browse/WICKET-1426 which causes http 404 
errors in gecko browsers and I have to patch wicket-ajax.js to 
workaround it.. but your error seems to be more subtle, maybe you should 
send this [object Error] you receive on IE to the list and someone with 
better javascript skills might help..




Doug Leeper wrote:

So I tried in IE 7 and this is what I get in the Ajax Debug Window.

Note: the modal window does show up...but IE indicates that it has
experienced an error and asks that I debug.

...

INFO: Initiating Ajax GET request on
http://www.google.com/jsapi?key=ABQIzaZpf6nHOd9w1PfLaM9u2xQRS2YPSd8S9D1NKPBvdB1fr18_CxR-svEYj6URCf5QDFq3i03mqrDlbA
INFO: Invoking pre-call handler(s)...
INFO: focus removed from setTargets15
INFO: focus set on setTargets15
INFO: Received ajax response (12326 characters)
INFO: Invoking post-call handler(s)...
INFO: 
INFO: Initiating Ajax GET request on

resources/wicket.contrib.gmap.GMap2/wicket-gmap.js
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (7079 characters)
INFO: focus removed from setTargets15
INFO: Invoking post-call handler(s)...
ERROR: Exception evaluating javascript: [object Error]
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: focus set on setTargets15
INFO: focus removed from setTargets15
INFO: last focus id was not set
INFO: focus set on wicketDebugLink
INFO: focus removed from wicketDebugLink
INFO: focus set on wicketDebugLink
INFO: focus removed from wicketDebugLink
  



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



Re: GMap2 or Wicket Ajax issue?

2008-10-07 Thread Serkan Camurcuoglu

I apply my patch, to change this code on line 824

if (Wicket.Browser.isGecko()) {

to

if (Wicket.Browser.isGecko()  url.match(^http://;) == null) {

works for me, which ensures that the url is not an absolute url..




Doug Leeper wrote:

It could be related.  One way to find out...

I will apply the suggested patch and see what happens.

Which patch should I try?  There appears to be two suggestions.

Thanks
- Doug
  



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



Re: Newbie Question, Very Basic Model Use

2008-10-06 Thread Serkan Camurcuoglu
Model assigns a new object as the model object, and I think 
java.lang.Boolean is immutable so it can't change after it's constructed 
anyway. So instead of checking the value of toggleableObject I think you 
can check myCheckbox.getModelObject() == Boolean.TRUE etc..




Ryan Gravener wrote:

If you would like the property model to work with local variables do
new propertymodel(this,property)

On 10/6/08, walnutmon [EMAIL PROTECTED] wrote:
  

After using property models, it's nice to have automatic binding to
variables
in objects... However, I can't seem to get the same thing to work with local
variables... as an example...

new CheckBox(toggleSomething, new PropertyModel(someObject,
toggleableProperty));
works beautifully...

However,
new CheckBox(toggleSomething, new Model(toggleableObject));
//toggleableObject is a Boolean

doesn't seem to change anything on form submit, that toggleable object only
dictates the initial state of the checkbox, but doesn't change with it
What am I missing?

--
View this message in context:
http://www.nabble.com/Newbie-Question%2C-Very-Basic-Model-Use-tp19837933p19837933.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]






  



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



Re: How to expose regular exception message in FeedbackPanel?

2008-10-06 Thread Serkan Camurcuoglu
you can use the info, warn, error or fatal methods of component to 
generate feedback messages.. usually you can just write:


catch (Exception e) {
 error(e.getMessage());
}



Seven Corners wrote:

I have a form whose submission can possibly generate exceptions.  I would
like to expose the exception text in the FeedbackPanel.  How can I do this?

I've tried getting the FeedbackMessagesModel and doing a setObject() on that
but it's not accepting a String, a FeedbackMessages List, or a new
FeedbackMessage.  Obviously I'm going about this the wrong way.

Ideas?

Thanking you in advance for your time and trouble.
  



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



RE: force page reload

2008-10-06 Thread Serkan Camurcuoglu
If I understood you correctly, I've done something like this to show a 
different page depending on a url parameter. You should override the 
newRequestCycleProcessor() method of your application class, and return a 
different request target from the resolve method. Here I return a 
bookmarkablepagerequesttarget which creates a new home page if a certain 
parameter exists in the request:

@Override
protected IRequestCycleProcessor newRequestCycleProcessor() {
return new WebRequestCycleProcessor() {
@Override
public IRequestTarget resolve(RequestCycle cycle, RequestParameters 
params) {
if (null != 
params.getParameters().get(ContentSearchPage.PARAM_SEARCH_KEY)) {
return new 
BookmarkablePageRequestTarget(ContentSearchPage.class);
}
return super.resolve(cycle, params);
}
};
}



-Original Message-
From: francisco treacy [mailto:[EMAIL PROTECTED]
Sent: Mon 10/6/2008 10:07 PM
To: users@wicket.apache.org
Subject: force page reload
 
hi,

i'm integrating a wicket application with an online payment system
provided by a bank.

i have a wicket stateful page (ie shows visa / mastercard icons) which
links to the bank app's payment page. depending on the transaction,
the bank sends us back a result code in an encrypted http url
parameter, appended to the url of our wicket page.

String encrypted =
getWebRequestCycle().getWebRequest().getHttpServletRequest().getParameter(DATA);

according to the bank's response, i decide whether to show a please
pay or a thank you page with wicket variations.

the only problem i am having here is: the wicket page is cached, so no
matter what the  result is, it will show the last seen version in the
pagemap - that is, it won't re-execute the page's java code.

i tried overriding headers

protected void setHeaders(WebResponse response) {
response.setHeader(Pragma, no-cache);
response.setDateHeader(Expires,0);
response.setHeader(Cache-Control, no-cache, max-age=0,
must-revalidate, no-store);
}

but none of these http headers are seen in the html output whatsoever.

i also tried implementing IMarkupCacheKeyProvider and returning null.
with no success so far.

what should i do to execute the page's code, no matter when it is called?

thanks,

francisco

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



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

Re: customizing PagingNavigator

2008-09-24 Thread Serkan Camurcuoglu

Here's an example of how I extend paging navigator:

   /**
* Overridden to make links invisible.
*/
   @Override
   protected Link newPagingNavigationLink(String id, IPageable 
pageable, int pageNumber) {

   Link l = super.newPagingNavigationLink(id, pageable, pageNumber);
   // we don't want first/last links..
   l.setVisible(false);
   return l;
   }

as you see, I call l.setVisible(false) to make the first/last links 
invisible. You should also provide markup with your extended navigator 
(for example, my class is SimplePagingNavigator and I have a 
corresponding SimplePagingNavigator.html) and you can change  and  to 
prev and next within your new markup . You should copy the original 
PagingNavigator.html from wicket source, rename it and modify it for 
yourself.


hth,

SerkanC



eyalbenamram wrote:

Hi
I need to have a PagingNavigator that has only the next and previous
links visible,
and in addition, to change their looks from  to prev  and from  to
next
Can you please add code? I searched the forum and found some messy stuff
that didn't work..

Thaks, Eyal.
  



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



Adding jquery effects to paging navigator

2008-09-22 Thread Serkan Camurcuoglu

Hi all,
I want to add some decoration to AjaxPagingNavigator. I want the current 
page to fade out and the new page to fade in when the user clicks next. 
I'm thinking of using JQuery for effects. Can anybody show me some 
pointers to achieve this?



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



Re: Adding jquery effects to paging navigator

2008-09-22 Thread Serkan Camurcuoglu
How can I modify the onclick attribute of the links in the 
AjaxPagingNavigator? I override newPagingNavigationLink in my ajax 
paging navigator as shown below, but my javascript is not prepended. I 
want to add JQuery fadeout code before wicketAjaxGet:


@Override
   protected Link newPagingNavigationLink(String arg0, IPageable arg1, 
int arg2) {
   AjaxPagingNavigationLink l = (AjaxPagingNavigationLink) 
super.newPagingNavigationLink(arg0, arg1, arg2);
   String onClickJavascript = 
jQuery('#+topContainer.getMarkupId()+').fadeOut('slow');;
   AttributeModifier am = new AttributeModifier(onclick, new 
Model(onClickJavascript)) {

   @Override
   protected String newValue(String current, String replacement) {
   // prepend javascript before ajax call..
   return replacement + current;
   }
   };
   return l;
   }


Serkan Camurcuoglu wrote:

Hi all,
I want to add some decoration to AjaxPagingNavigator. I want the 
current page to fade out and the new page to fade in when the user 
clicks next. I'm thinking of using JQuery for effects. Can anybody 
show me some pointers to achieve this?



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





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



Re: Adding jquery effects to paging navigator

2008-09-22 Thread Serkan Camurcuoglu
just noticed I forgot to add the behavior to the link, but still the 
javascript does not show up..




Serkan Camurcuoglu wrote:
How can I modify the onclick attribute of the links in the 
AjaxPagingNavigator? I override newPagingNavigationLink in my ajax 
paging navigator as shown below, but my javascript is not prepended. I 
want to add JQuery fadeout code before wicketAjaxGet:


@Override
   protected Link newPagingNavigationLink(String arg0, IPageable arg1, 
int arg2) {
   AjaxPagingNavigationLink l = (AjaxPagingNavigationLink) 
super.newPagingNavigationLink(arg0, arg1, arg2);
   String onClickJavascript = 
jQuery('#+topContainer.getMarkupId()+').fadeOut('slow');;
   AttributeModifier am = new AttributeModifier(onclick, new 
Model(onClickJavascript)) {

   @Override
   protected String newValue(String current, String 
replacement) {

   // prepend javascript before ajax call..
   return replacement + current;
   }
   };
   return l;
   }


Serkan Camurcuoglu wrote:

Hi all,
I want to add some decoration to AjaxPagingNavigator. I want the 
current page to fade out and the new page to fade in when the user 
clicks next. I'm thinking of using JQuery for effects. Can anybody 
show me some pointers to achieve this?



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





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





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



About Wicket portlets, DatePicker, onLoad and onDomReady

2008-09-17 Thread Serkan Camurcuoglu

Hi all,
While I was experimenting with date pickers in portlets, I've noticed 
something. When a portlet makes a header contribution, it cannot 
directly contribute to document's head, instead it generates something like:


script type=text/javascript 
src=/subscriber-web/buyOffer/ps:P-11c703e086b-1/resources/org.apache.wicket.extensions.yui.YuiLib/yuiloader-beta.js/script
script type=text/javascript 
src=/subscriber-web/buyOffer/ps:P-11c703e086b-1/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script
script type=text/javascript !--/*--![CDATA[/*!--*/


in the page body. Here P-11c703e086b is the portlet's id, and each 
portlet fragment on the page has a different id, and hence they load 
different javascript files (from the browser's point of view). So now, 
when I have two instances of the same portlet which contains date 
pickers, they both include their own wicket-event and yuiloader 
javascript files. The result of this is that only the date pickers in 
the second (last loaded) portlet work, and the date pickers in the first 
portlet do not work. I think that the global javascript objects from the 
last loaded file override the ones from the first (such as Wicket and 
YAHOO objects).


However, I've noticed that (while developing a different javascript 
behaviour for myself), if I execute the required javascript code during 
the onLoad event (instead of the onDomReady event), all of the date 
pickers work as expected. I have confirmed this by modifying the 
DatePicker class and using it within my portlets.


Does anybody have an explanation for this? I know that using onLoad is 
bad, but it seems to solve my problem..


(BTW I'm using wicket 1.3.4 and Jetspeed 2.1.3)

Best regards,

SerkanC



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



Re: Form values lost on converter error when inside table

2008-09-12 Thread Serkan Camurcuoglu
if you were using a listview, you should have called setReuseItems(true) 
on it.. Maybe there exists something similar for DataView.. ListView 
javadoc says:


If you nest a ListView in a Form, ALLWAYS set this property to true, as 
otherwise validation will not work properly. 




Lorenzo Bolzani wrote:

Hi,
I'need to display some editable values inside an HTML table.
The form contains both string and numeric values. If I submit an
invalid numeric value an error is reporter but all other values are
lost.

Using a simple form this does not happens, it happens only when we had
the table part. I think we have done something wrong with the
dataview and the dataProvider but we cannot see what's wrong.

Following this article (we skipped the detachable part)

http://liminescence.blogspot.com/2007/12/wicket-html-table-implementation.html

I defined a very simple DataProvider

protected List readAll() {
  return Arrays.asList(new Bean(a, 1), new Bean(b, 2));
}

a simple dataView

@Override
protected void populateItem(Item item) {
   Bean bean = (Bean) item.getModelObject();
   item.setModel(new CompoundPropertyModel(bean));
   item.add(new TextField(rock));
   item.add(new TextField(number));
}

and added this to a form

 final DataView personDataView = new PersonDataView(beanList,
dataProvider);
 form.add(personDataView);

This is the markup

 table width=100% border=0 
   trthRock/th
  thNumber/th/tr
   tr wicket:id=beanList
  td 
   input wicket:id=rock type=text size=20
maxlength=5/br/
  /td
  td
   input wicket:id=number type=text size=20
maxlength=5/br/
  /td
   /tr
 /table

When I type an invalid value for the number field the rock field
is reset to the default value and the input from the user is lost.

What are we doing wrong?


Thanks, bye

Lorenzo

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


  



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



Re: Form values lost on converter error when inside table

2008-09-12 Thread Serkan Camurcuoglu
I think you can make a quick test by implementing a simple reuse 
strategy which directly returns the existingItems iterator..



Lorenzo Bolzani wrote:

2008/9/12 Serkan Camurcuoglu [EMAIL PROTECTED]:
  

if you were using a listview, you should have called setReuseItems(true) on
it.. Maybe there exists something similar for DataView.. ListView javadoc
says:

If you nest a ListView in a Form, ALLWAYS set this property to true, as
otherwise validation will not work properly. 




Hi Serkan,
think you very much for the reply, we looked for something similar but
we completely missed that.
I think could be useful to report the same warning in the DataView and
DataTable javadoc (or maybe just Form).

Anyway in our example we are using a DataView and that method is not present.
We found a setReuseStrategy both on DataView and on DataTable but none
of the provided strategies (default and reuseIfEquals) worked.

What is the ReuseStrategy providing a behavior equivalent to
setReuseItems(true)?

I suspect is ReuseIfModelsEqualStrategy and we have to define a custom
model with the correct equals but I'm not sure and I'm looking for a
confirm.


Thanks again.

Bye

Lorenzo

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


  



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



Re: Components render problem

2008-09-11 Thread Serkan Camurcuoglu
how do you submit the form? it seems like you do not add a submit button 
or submit link into the form..



Ajayi Yinka wrote:

Hi,
This problem still persist till now. I can really figure out the cause of
the problem. Could anyone help me out? This is one of the pages in my
application. I have searched all the texts I have on wicket to get the cause
of the problem but I coudn't find one.

I appreciate any asisstance anyone can render on this.

Thanks in advance.
package web.page;

import web.UserSession;
import web.component.MainNavigationComponent;
import pojo.User;
import services.TouchPayService;
import java.util.List;
import org.apache.wicket.Session;
import org.apache.wicket.injection.web.InjectorHolder;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

/**
 *
 * @author AJAYI YINKA
 */
public final class Login extends AbstractConsoleWebPage  {

Form form;
private TextField userId;
private PasswordTextField userPassword;
ListUser users;
@SpringBean
TouchPayService touchpay;
private static final long serialVersionUID = 1L;
public Login() {

InjectorHolder.getInjector().inject(this);

org.apache.wicket.Component mainNavigation;

mainNavigation = new MainNavigationComponent(mainNavigation,
null);

userId = new TextField(userId, new Model( ));
userId.setRequired(true);


userPassword = new PasswordTextField(userPassword, new Model(
));
userPassword.setRequired(true);

form = new LoginFormComponent(f);

add(new FeedbackPanel(errorMsg));
form.add(userId);
form.add(userPassword);
add(form);
add(mainNavigation);


}

public void setUser(User user) {
((UserSession) getSession()).setCurrentUser(user);
}


@Override
public String getTitle() {
return Login Page;
}

class LoginFormComponent extends Form {

public LoginFormComponent(String id) {
super(id);
}

@Override
public void onError(){

setResponsePage(Login.class);
 }

@Override
public void onSubmit() {


String userId = (String) Login.this.getUserId();
String userPassword = (String) Login.this.getPassword();

User user = null;
users = touchpay.findAllUsers();

for (User userInDB : users) {
if ((userInDB.getUsername().equals(userId)) 
(userInDB.getPassword().equals(userPassword))) {
user = userInDB;
}
}
if (user == null) {
// not yet implemented
} else {
setUser(user);
Session.get().info(You have logged in successfully);

if (!continueToOriginalDestination()) {
setResponsePage(HomePage.class);
}
}

}
}

/** Helper methods to retrieve the userId and the password **/
protected String getUserId() {
return userId.getModelObjectAsString();
}

protected String getPassword() {
return userPassword.getModelObjectAsString();
}
}




On Wed, Sep 10, 2008 at 6:18 AM, Ajayi Yinka [EMAIL PROTECTED]wrote:

  

hi guys,
I have try to get over the problem by calling Login.class in onError
method. this seems to cover this bugs, but I am not satistify as the error
message is still redisplaying in the next page.
I think what i really need is the problems that are associated with
validation.

On Wed, Sep 10, 2008 at 4:58 AM, Ajayi Yinka [EMAIL PROTECTED]wrote:



I thought as much, it seems I am missing something out in validation
process. Please help me check out from this snippet of my codes

userId = new TextField(userId, new Model());
userId.setRequired(true);


userPassword = new PasswordTextField(userPassword, new
Model());
userPassword.setRequired(true);

form.add(userId);
form.add(userPassword);
  add(form);

add(new FeedbackPanel(errorMsg));

thanks.



On Wed, Sep 10, 2008 at 4:06 AM, Serkan Camurcuoglu [EMAIL PROTECTED]
  

wrote:

if onSubmit is not called and the form is redisplayed with the values

that you've last entered, it seems like the form is not validated
successfully..



Ajayi Yinka wrote:



Hi guys,
I am a newbie in wicket. I am presently developpng an application using
wicket framework. I am having problem in submitting my forms.
The form submissionis actually working whenever I enter a value but if
no
value is put in the textbox, feedback panel will  display  the error
message
(I think this is good).

The problem is that if I now enter values in the textboxes

Re: WebResource and authentication

2008-09-11 Thread Serkan Camurcuoglu

Session javadoc says:

*Access via Thread Local *- In the odd case where neither a RequestCycle 
nor a Component is available, the currently active Session for the 
calling thread can be retrieved by calling the static method 
Session.get(). This last form should only be used if the first two forms 
cannot be used since thread local access can involve a potentially more 
expensive hash map lookup.







Adriano dos Santos Fernandes wrote:

Am I on wrong direction?

How can I have a PDF generator integrated with Wicket authentication?

I can't image how can I ask Wicket if user is authenticated or not. I 
don't even see how can I access the Session from WebResource...



Adriano


Adriano dos Santos Fernandes escreveu:

H!

I inherited my application class from AuthenticatedWebApplication so 
my pages requires authentication. It worked.


But I've created a class inherited from WebResource to deliver Jasper 
Report in PDF and mounted it with this code:

   mountSharedResource(/Report, new ResourceReference(Report) {
   @Override
   protected Resource newResource()
   {
   return new ReportWebResource();
   }
   }.getSharedResourceKey());

The problem is that when I access /Report it bypass the 
authentication system, and I don't want this. How can I make 
WebResource require authentication?


Thanks,


Adriano


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




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





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



Re: Components render problem

2008-09-11 Thread Serkan Camurcuoglu
turning your code into a quickstart project works for me, onSubmit is 
successfully called.. Did you debug and see the return value of 
continueToOriginalDestination() ?




Ajayi Yinka wrote:

Thanks for your concern. I added it (check the LoginForm class, you will see
the onSubmit method). I used the default form submit button. I tried the
wicket button before, but the same problem persist.

On Thu, Sep 11, 2008 at 5:33 AM, Serkan Camurcuoglu [EMAIL PROTECTED]wrote:

  

how do you submit the form? it seems like you do not add a submit button or
submit link into the form..



Ajayi Yinka wrote:



Hi,
This problem still persist till now. I can really figure out the cause of
the problem. Could anyone help me out? This is one of the pages in my
application. I have searched all the texts I have on wicket to get the
cause
of the problem but I coudn't find one.

I appreciate any asisstance anyone can render on this.

Thanks in advance.
package web.page;

import web.UserSession;
import web.component.MainNavigationComponent;
import pojo.User;
import services.TouchPayService;
import java.util.List;
import org.apache.wicket.Session;
import org.apache.wicket.injection.web.InjectorHolder;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

/**
 *
 * @author AJAYI YINKA
 */
public final class Login extends AbstractConsoleWebPage  {

   Form form;
   private TextField userId;
   private PasswordTextField userPassword;
   ListUser users;
   @SpringBean
   TouchPayService touchpay;
   private static final long serialVersionUID = 1L;
   public Login() {

   InjectorHolder.getInjector().inject(this);

   org.apache.wicket.Component mainNavigation;

   mainNavigation = new MainNavigationComponent(mainNavigation,
null);

   userId = new TextField(userId, new Model( ));
   userId.setRequired(true);


   userPassword = new PasswordTextField(userPassword, new Model(
));
   userPassword.setRequired(true);

   form = new LoginFormComponent(f);

   add(new FeedbackPanel(errorMsg));
   form.add(userId);
   form.add(userPassword);
   add(form);
   add(mainNavigation);


   }

   public void setUser(User user) {
   ((UserSession) getSession()).setCurrentUser(user);
   }


   @Override
   public String getTitle() {
   return Login Page;
   }

   class LoginFormComponent extends Form {

   public LoginFormComponent(String id) {
   super(id);
   }

   @Override
   public void onError(){

   setResponsePage(Login.class);
}

   @Override
   public void onSubmit() {


   String userId = (String) Login.this.getUserId();
   String userPassword = (String) Login.this.getPassword();

   User user = null;
   users = touchpay.findAllUsers();

   for (User userInDB : users) {
   if ((userInDB.getUsername().equals(userId)) 
(userInDB.getPassword().equals(userPassword))) {
   user = userInDB;
   }
   }
   if (user == null) {
   // not yet implemented
   } else {
   setUser(user);
   Session.get().info(You have logged in successfully);

   if (!continueToOriginalDestination()) {
   setResponsePage(HomePage.class);
   }
   }

   }
   }

   /** Helper methods to retrieve the userId and the password **/
   protected String getUserId() {
   return userId.getModelObjectAsString();
   }

   protected String getPassword() {
   return userPassword.getModelObjectAsString();
   }
}




On Wed, Sep 10, 2008 at 6:18 AM, Ajayi Yinka [EMAIL PROTECTED]
  

wrote:



  

hi guys,
I have try to get over the problem by calling Login.class in onError
method. this seems to cover this bugs, but I am not satistify as the
error
message is still redisplaying in the next page.
I think what i really need is the problems that are associated with
validation.

On Wed, Sep 10, 2008 at 4:58 AM, Ajayi Yinka [EMAIL PROTECTED]


wrote:
  




I thought as much, it seems I am missing something out in validation
process. Please help me check out from this snippet of my codes

userId = new TextField(userId, new Model());
   userId.setRequired(true);


   userPassword = new PasswordTextField(userPassword, new
Model());
   userPassword.setRequired(true);

   form.add(userId);
   form.add(userPassword);
 add(form);

add(new FeedbackPanel(errorMsg));

thanks.



On Wed, Sep 10, 2008 at 4:06 AM, Serkan Camurcuoglu 
[EMAIL PROTECTED]


  

wrote:
   if onSubmit is not called and the form is redisplayed with the
values
that you've last entered

Re: Components render problem

2008-09-11 Thread Serkan Camurcuoglu
when I try, it works as expected, onError is called whenever data is not 
entered, and onSubmit is called when I enter both values..



Ajayi Yinka wrote:

When I debugged the codes, it wasn't getting to the onSubmit method. Maybe
you try to do this with the code, don't enter value when the page is first
rendered and click the submit button. After that, enter values nto the
textfields and click the submit button and check if the onSubmit method is
executed. If this works for you, then something is wrong in my code that I
don't know about.
Thanks so much,
yinka

On Thu, Sep 11, 2008 at 6:33 AM, Serkan Camurcuoglu [EMAIL PROTECTED]wrote:

  

turning your code into a quickstart project works for me, onSubmit is
successfully called.. Did you debug and see the return value of
continueToOriginalDestination() ?

Ajayi Yinka wrote:



Thanks for your concern. I added it (check the LoginForm class, you will
see
the onSubmit method). I used the default form submit button. I tried the
wicket button before, but the same problem persist.

On Thu, Sep 11, 2008 at 5:33 AM, Serkan Camurcuoglu [EMAIL PROTECTED]
  

wrote:



  

how do you submit the form? it seems like you do not add a submit button
or
submit link into the form..



Ajayi Yinka wrote:





Hi,
This problem still persist till now. I can really figure out the cause
of
the problem. Could anyone help me out? This is one of the pages in my
application. I have searched all the texts I have on wicket to get the
cause
of the problem but I coudn't find one.

I appreciate any asisstance anyone can render on this.

Thanks in advance.
package web.page;

import web.UserSession;
import web.component.MainNavigationComponent;
import pojo.User;
import services.TouchPayService;
import java.util.List;
import org.apache.wicket.Session;
import org.apache.wicket.injection.web.InjectorHolder;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

/**
 *
 * @author AJAYI YINKA
 */
public final class Login extends AbstractConsoleWebPage  {

  Form form;
  private TextField userId;
  private PasswordTextField userPassword;
  ListUser users;
  @SpringBean
  TouchPayService touchpay;
  private static final long serialVersionUID = 1L;
  public Login() {

  InjectorHolder.getInjector().inject(this);

  org.apache.wicket.Component mainNavigation;

  mainNavigation = new MainNavigationComponent(mainNavigation,
null);

  userId = new TextField(userId, new Model( ));
  userId.setRequired(true);


  userPassword = new PasswordTextField(userPassword, new Model(
));
  userPassword.setRequired(true);

  form = new LoginFormComponent(f);

  add(new FeedbackPanel(errorMsg));
  form.add(userId);
  form.add(userPassword);
  add(form);
  add(mainNavigation);


  }

  public void setUser(User user) {
  ((UserSession) getSession()).setCurrentUser(user);
  }


  @Override
  public String getTitle() {
  return Login Page;
  }

  class LoginFormComponent extends Form {

  public LoginFormComponent(String id) {
  super(id);
  }

  @Override
  public void onError(){

  setResponsePage(Login.class);
   }

  @Override
  public void onSubmit() {


  String userId = (String) Login.this.getUserId();
  String userPassword = (String) Login.this.getPassword();

  User user = null;
  users = touchpay.findAllUsers();

  for (User userInDB : users) {
  if ((userInDB.getUsername().equals(userId)) 
(userInDB.getPassword().equals(userPassword))) {
  user = userInDB;
  }
  }
  if (user == null) {
  // not yet implemented
  } else {
  setUser(user);
  Session.get().info(You have logged in successfully);

  if (!continueToOriginalDestination()) {
  setResponsePage(HomePage.class);
  }
  }

  }
  }

  /** Helper methods to retrieve the userId and the password **/
  protected String getUserId() {
  return userId.getModelObjectAsString();
  }

  protected String getPassword() {
  return userPassword.getModelObjectAsString();
  }
}




On Wed, Sep 10, 2008 at 6:18 AM, Ajayi Yinka 
[EMAIL PROTECTED]


  

wrote:





  

hi guys,
I have try to get over the problem by calling Login.class in onError
method. this seems to cover this bugs, but I am not satistify as the
error
message is still redisplaying in the next page.
I think what i really need is the problems that are associated with
validation.

On Wed, Sep 10, 2008 at 4:58 AM, Ajayi Yinka 
[EMAIL PROTECTED]




wrote

Re: Components render problem

2008-09-11 Thread Serkan Camurcuoglu

I can't help that much but I've uploaded my quickstart project here 
http://www.nabble.com/file/p19436483/ajaylogin.zip ajaylogin.zip  , you can
run it using

mvn -Dmaven.test.skip=true jetty:run

and see for yourself.. Good luck..






Ajayi Yinka wrote:
 
 Thanks so much, I appreciate this, Now help me remove the onError method
 from the LoginForm class so that Login.class is not called. Do the same
 thing again and check the result. check if the page in the setResponsePage
 is redered. Actually, I am confussed with this problem.
 
 thanks so much
 yinka
 
 On Thu, Sep 11, 2008 at 6:57 AM, Serkan Camurcuoglu
 [EMAIL PROTECTED]wrote:
 
 when I try, it works as expected, onError is called whenever data is not
 entered, and onSubmit is called when I enter both values..



 Ajayi Yinka wrote:

 When I debugged the codes, it wasn't getting to the onSubmit method.
 Maybe
 you try to do this with the code, don't enter value when the page is
 first
 rendered and click the submit button. After that, enter values nto the
 textfields and click the submit button and check if the onSubmit method
 is
 executed. If this works for you, then something is wrong in my code that
 I
 don't know about.
 Thanks so much,
 yinka

 On Thu, Sep 11, 2008 at 6:33 AM, Serkan Camurcuoglu
 [EMAIL PROTECTED]
 wrote:



 turning your code into a quickstart project works for me, onSubmit is
 successfully called.. Did you debug and see the return value of
 continueToOriginalDestination() ?

 
 

-- 
View this message in context: 
http://www.nabble.com/Components-render-problem-tp19411126p19436483.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: Components render problem

2008-09-10 Thread Serkan Camurcuoglu
if onSubmit is not called and the form is redisplayed with the values 
that you've last entered, it seems like the form is not validated 
successfully..



Ajayi Yinka wrote:

Hi guys,
I am a newbie in wicket. I am presently developpng an application using
wicket framework. I am having problem in submitting my forms.
The form submissionis actually working whenever I enter a value but if no
value is put in the textbox, feedback panel will  display  the error message
(I think this is good).

The problem is that if I now enter values in the textboxes, the onsubmit
method is not executed. I dont know what is causing this.
I need a prompt response as this is delaying the progress of my job.
Thanks.
Yinka.

  



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



Re: Wicket Cart: open-source e-commerce wicket app

2008-08-28 Thread Serkan Camurcuoglu
I have another idea for brix.. I believe that a portlet which displays 
these brix tiles as portlets would be incredibly useful for portal 
developers, because WYSIWYG content editing in portals is a very handy 
feature, and it's missing in Jetspeed AFAIK.. For example, one could add 
an instance of this portlet to a portal page, and in the edit (or 
edit-defaults) mode of the portlet, he/she would select the tile that 
should be displayed by this portlet fragment, and in the view mode the 
portlet would display the tile content..




Patrick Angeles wrote:

James,

If you need any CMS functionality at all for your cart project, please have
a look at:

http://brix-cms.googlecode.com/

For example, you could incorporate your cart panels as tiles inside of
Brix.


msc65jap wrote:
  

Is anyone interested in contributing to an open-source e-commerce
wicket engine? I was thinking of calling it WicketCart. I have written
a primitive version which serves as a good foundation to build upon.

I have a new client, a royal college, requiring an e-commerce web app
so just pondering the idea of WicketCart. If other developers are
interested in contributing then I will make it open-source. I have
written it so far using Spring and Hibernate but very open for it to
additionally be implemented for other frameworks.

If anyone wants specific details or wants to discuss it a bit more,
then feel free to email me.

Best,
James.

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






  



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



Re: Tomcat crashes out of memory

2008-08-28 Thread Serkan Camurcuoglu
in my experience it's not possible to determine the cause of an 
outofmemory error by looking at the stack trace.. you should use a 
profiler and find out where the memory leak is..



Igor Vaynberg wrote:

this is not caused by wicket as is clear from the stacktrace...

-igor

On Thu, Aug 28, 2008 at 8:39 AM, Mathias P.W Nilsson
[EMAIL PROTECTED] wrote:
  

Hi!

My tomcat crashes with out of memory error.

I have set this in my startup.bat file
set JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=256m

Any other pointers? here is some logging

2008-aug-28 17:26:18 org.apache.catalina.core.StandardWrapperValve invoke
ALLVARLIG: Servlet.service() for servlet ItemResourceServlet threw exception
java.lang.OutOfMemoryError
   at java.util.zip.Deflater.init(Native Method)
   at java.util.zip.Deflater.init(Deflater.java:123)
   at java.util.zip.GZIPOutputStream.init(GZIPOutputStream.java:46)
   at java.util.zip.GZIPOutputStream.init(GZIPOutputStream.java:58)
   at
se.edgesoft.hairless.web.optimization.GZIPResponseStream.init(GZIPResponseStream.java:23)
   at
se.edgesoft.hairless.web.optimization.GZIPResponseWrapper.createOutputStream(GZIPResponseWrapper.java:26)
   at
se.edgesoft.hairless.web.optimization.GZIPResponseWrapper.getOutputStream(GZIPResponseWrapper.java:48)
   at
se.edgesoft.hairless.web.resource.ItemResourceServlet.writeResource(ItemResourceServlet.java:96)
   at
se.edgesoft.hairless.web.resource.ItemResourceServlet.doGet(ItemResourceServlet.java:82)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
   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.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:246)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:111)
   at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at
se.edgesoft.hairless.web.optimization.GZIPFilter.doFilter(GZIPFilter.java:34)
   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:175)
   at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:619)
--
View this message in context: 
http://www.nabble.com/Tomcat-crashes-out-of-memory-tp19203247p19203247.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]





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


  



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



Severe log: no Header Container was found but components..

2008-08-19 Thread Serkan Camurcuoglu

Hi all,
I need to change the direction of the html file to rtl if the logged in 
user's locale is arabic. I followed the method in this previous message 
http://www.nabble.com/How-can-I-switch-page-direction-(LTR-RTL)--td13747743.html#a14025235 
. It works fine, but I'm constantly getting the following log:


SEVERE: You probably forgot to add a body or header tag to your 
markup since no Header Container was

found but components where found which want to write to the head section.
link rel=stylesheet type=text/css href=../stylesheets/generic.css /
script type=text/javascript src=../javascript/util.js/script

because I have

add(HeaderContributor.forCss(stylesheets/generic.css));
add(HeaderContributor.forJavaScript(javascript/util.js));


in my page code, right after I add the html markup container. Actually 
this log does not seem to cause any error, but I really would like to 
get rid of it. Does anybody have any idea?


Best regards,

SerkanC


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



Re: Asynchronous Components

2008-07-23 Thread Serkan Camurcuoglu
you may also consider using a portal framework and portlets, for example 
apache jetspeed portal (and possibly others) has parallel portlet 
rendering option..



Igor Vaynberg wrote:

if you want the page to render all at once you have to spin off as
many threads as there are components and block rendering until all
threads are done. you can do this in page#onbeforerender() which is
called before any components start to render.

the problem with this is that if it takes a while someone can easily
dos your app because you are blocking servlet thread pool.

a better way to do this would be to drop each component into an iframe
and make it poll for data which is retrieved using some global
threadpool.

-igor

On Tue, Jul 22, 2008 at 2:12 PM, Sebastian [EMAIL PROTECTED] wrote:
  

Hi,

I have not yet looked much into Wicket but am quite interested in the
project.

We have a specific requirement where I could not yet find the right
information/documentation for.

We need to put multiple components onto a page receiving data through web
services. A single web services call takes some time. In our scenario it
would be bad to have the different components of a page to request their
data sequentially, therefore we'd like to have components retrieve the
required data in parallel by firing the web services call concurrenlty.

What is the best approach to achieve this (preferable in a generic, reusable
fashion).

I do not want to use AJAX for this, the whole page needs to be rendered at
once on the server side.

Thanks for any hints and thoughts in advance,

Seb


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





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


  



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



Simple i18n question

2008-07-16 Thread Serkan Camurcuoglu

Hi,
In my resource file, I need a property expression to display the 
toString() value of my model object. I've discovered that using ${} 
works, but it seems like a bad hack to me. What's the correct way of 
doing this?


Regards,


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



Re: Issue with Form submission in portlet container

2008-07-15 Thread Serkan Camurcuoglu
form submitting with normal portlets works fine (I'm using jetpeed 2.1.3 
and wicket 1.3.4), maybe your problem is about the modal dialog box.. if 
you still haven't found a solution, posting this message to the jetspeed 
user mailing list may also help..




Arun Wagle wrote:

Hello,
 
I have an issue with submitting form in a jetspeed portal which is 
using WicketPortlet. The form is invoked from a wicket Modal dialog box.
I am able to run this as a normal wicket applcation(without running as 
a wicket portlet application)
 
I get the following exception
WicketMessage: Method onFormSubmitted of interface 
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at 
component [MarkupContainer [Component id = uploadReportForm, page = 
com.bluenog.bi.reportmgr.dialogs.addreport.AddReportDialog, path = 
0:uploadReportForm.AddReportInputForm, isVisible = true, isVersioned = 
true]] threw an exception

*Root cause:

java.lang.IllegalStateException: ServletRequest does not contain 
multipart content*
** 
 
From the exception it looks like when we submit the form data, the 
** wicket portlet request handler is not setting the multipart/form-data.
 
I have attached the complete stack trace as well.
 
Please help as this is a show stopper in my application currently.
 
 
Regards,

Arun Wagle


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



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



Re: DateTextField question

2008-07-15 Thread Serkan Camurcuoglu
I'm not sure about the reason, but in my portlet application, only one 
of the date pickers is initialized if I add two portlets on the same 
page containing date pickers, so only one of them works.. also it seems 
like the date picker doesn't work if there is any other wicket ajax 
component loaded on the page.. I think it's a problem with the 
wicketCalendarInits array object which is used for initializing these 
date pickers, but I haven't found the exact cause yet, I'd like to hear 
if you find a solution..



Cristi Manole wrote:

Hello,

Any ideas why the calendar does not show on my modal window?

-I've seen the examples and I know it's working.
-It is not a problem related to z-index

*It seems the yui class does not get appended to the tag so clicking the
calendar icon does nothing (i presume that's the reason).

*Has anyone by any chance experienced this or something similar? Any
suggestion is highly appreciated :).

Tks a bunch,
Cristi Manole

  



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



Re: DateTextField question

2008-07-15 Thread Serkan Camurcuoglu
No, my configuration is Tomcat 5.5.23 Jetspeed 2.1.3 Wicket 1.3.4 and 
Firefox 2.0 on Linux.. Do you know which file was patched for the safari 
problem? This could be a pointer to find the cause of the problem..


Regards,




Ryan Gravener wrote:

Are you guys using safari?  If so I think this problem is patched in 1.3.4.

On 7/15/08, Serkan Camurcuoglu [EMAIL PROTECTED] wrote:
  

I'm not sure about the reason, but in my portlet application, only one
of the date pickers is initialized if I add two portlets on the same
page containing date pickers, so only one of them works.. also it seems
like the date picker doesn't work if there is any other wicket ajax
component loaded on the page.. I think it's a problem with the
wicketCalendarInits array object which is used for initializing these
date pickers, but I haven't found the exact cause yet, I'd like to hear
if you find a solution..


Cristi Manole wrote:


Hello,

Any ideas why the calendar does not show on my modal window?

-I've seen the examples and I know it's working.
-It is not a problem related to z-index

*It seems the yui class does not get appended to the tag so clicking the
calendar icon does nothing (i presume that's the reason).

*Has anyone by any chance experienced this or something similar? Any
suggestion is highly appreciated :).

Tks a bunch,
Cristi Manole


  

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






  



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



Re: request.getSession.getAttribute()

2008-07-15 Thread Serkan Camurcuoglu

I think this may give you the HttpSession object..

((WebRequestCycle)getRequestCycle()).getWebRequest().getHttpServletRequest().getSession();



Karen Schaper wrote:

Hi,

I am calling a servlet that is not part of my wicket application.  This
servlet is expecting some things in the Session object.

The non wicket servlet is  calling getSession on the HttpServletRequest
object and then gets out the attributes.

 request.getSession().getAttribute( user );


Is there a way I can put this attribute in this session ?


Thanks

Karen


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


  



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



Re: ?xml tag, japanese and ie6

2008-07-11 Thread Serkan Camurcuoglu
Do you include static japanese text within the markup? I believe the 
only time when the ?xml declaration is important is when the template 
is initially parsed from file by wicket using an xml parser. I don't 
think dynamically included japanese text (such as text that's defined by 
the model of a label object) has anything to do with the ?xml 
declaration (so in my opinion converting static japanese text directly 
included in the markup to wicket:message tags should solve the problem 
but it's only my guess)..




Toscano wrote:

Hello,

Thank you for your answer.

In every case, the encoding in the browser is utf-8. It doesn't work with
the metatag you send to me, it is already added in all the pages. It only
works if I add the ?xml tag.

Even more, I have one page with three different panels. Two of them have the
?xml line in the markup and the Japanese shows correctly, the third one has
not and the japanese is corrupted. So in the same page we have correct and
incorrect japanese, because the ?xml is not there.

Has to be something related with Wicket... 


Thank you again,
Oskar




richardwilko wrote:
  

What is the encoding of your outputted pages (in firefox right click, view
page info)?  This will depend on what platform you are running on (os and
webserver).  if it is not utf-8 then you will need to change your setup so
that it is.  then it *should* work.  its also possible that the page
encoding is being forced to something else by the browser.

you could also try adding this line to your html head

meta http-equiv=Content-Type content=text/html; charset=UTF-8 /

btw, I dont think this isnt really a wicket problem, more a server setup
problem.



Toscano wrote:


Hello,

We are developing a multilanguage application, so our standard is utf-8.
We are making intensive use of Wicket's localization features, but
recently we found a problem and we can't find a good solution for it.

Basically is this: for not getting corrupted Japanese, we have to include
the following line in the html file:
?xml version=1.0 encoding=UTF-8?

But if we include that file, then all the layout in 
http://lists.xml.org/archives/xml-dev/200109/msg00182.html IE6 is a mess

. We tried to change the ?XML declaration with metatags inside the head
of the file, but it doesn't work, the Japanese only shows correctly if
the tag is there.

So if we leave the tag, we get Japanese but the layout is a mess in IE6.
If we removed it, we get good layout but corrupted Japanese.

Is there any tag or something to configure in Wicket for making the
Japanese show correctly without the ?XML tag?

As always, thank you for your time,
Oskar


  



  



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



Re: disabling error validation

2008-07-10 Thread Serkan Camurcuoglu

this link may help you a bit..

http://cwiki.apache.org/WICKET/conditional-validation.html



tbt wrote:

Hi

But I need the component models to be updated. Thats why i'm using a
SubmitLink instead of using a Link. I was hoping there was a simple method
to disable form validation with the SubmitLink such as 
'link2.setFormValidation(false)' or something like that.


Is there a way to disable validations for some links and enable validations
for others, yet at the same time update the form components when the links
are clicked. Please provide a simple example.

Thanks  



ZedroS wrote:
  

Hi

If you don't want our form to be validated, why do you use a SubmitLink ?
A simple Link wouldn't trigger  the validation. Isn't that what you're
looking for ?

++
zedros





  



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



Best practice for navigating between pages

2008-06-22 Thread Serkan Camurcuoglu

Hi all,
I'm quite new to Wicket and I'd like to ask whether what I'm doing is 
right. Say I have two pages A and B. Page A loads a list of information 
from the database and keeps it in an instance field. When a link on page 
A is clicked, a new page B is created and page A passes itself as one of 
the constructor arguments of B. Page B displays the information and 
includes a link at the bottom saying Back. When this link is clicked, 
Page B calls setResponsePage() using the instance of Page A that was 
passed in its constructor, and Page A is displayed again.


That way I believe that I avoid reloading the data from the database 
again in Page A.


But I think somewhere in the mail archives I've read that it's 
recommended to use setResponsePage(Class) instead of using 
setResponsePage(Page). So I'm wondering whether I'm doing it right, and 
if there is a better way I'd like to learn it.


Sorry if this is a dumb question but I want to be confident about what 
I'm developing..


Regards,

SerkanC


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



  1   2   >