Re: DropDownChoice.onSelectionChanged() in ModalWindow

2009-08-07 Thread Martin Makundi
ModalWindow supports only AJAX behavior.

You must add OnChangeAjaxBehavior onto the dropdown and NOT
wantOnSelectionChangedNotifications().

dropdown.add(new OnchangeAjaxBehavior() {
  onUpdate() {... }
});

**
Martin

2009/8/7 Petr Fejfar petr.fej...@gmail.com:
 Hi all,

 I have a DropDownChoice on a panel within ModalWindow
 and once I return true from wantOnSelectionChangedNotifications()
 method and its value is changed, a browser shows dialog asking
 for confirmation to continue:

   Reloading this page will cause the modal window to disappear

 Please, could somebody advice me what I am missing?


 Thanks, Petr

 -
 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: WicketByExample.com - Soft launch and we need editors

2009-08-07 Thread Andrew Lombardi
Quick note, those of you that have submitted an example via the form,  
or requested to become an editor via the form, there was some error  
with the plugin doing the contacting ... which has been fixed.


feel free to re-submit at your leisure.

cheers!

On Aug 4, 2009, at 8:02 PM, Andrew Lombardi wrote:


/me goes out to the store to buy some Wicket dog food.

On Aug 4, 2009, at 7:36 PM, Igor Vaynberg wrote:


i look forward to a version powered by wicket. traitors! :)

-igor

On Tue, Aug 4, 2009 at 7:14 PM, Jeremy
Thomersonjer...@wickettraining.com wrote:

Nice site.  I look forward to looking at it some more.

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




On Tue, Aug 4, 2009 at 2:51 PM, Andrew Lombardiand...@mysticcoders.com 
 wrote:
I don't know about you guys, but I learn best by examples, a lot  
of them.
So the team at Mystic decided to put together a really simple,  
easy to
navigate, no nonsense examples site ... and start filling it with  
relevant

Wicket code examples for doing common things like:

  * How to use a FeedbackPanel with AJAX
  * Getting Started Guide
  * How to use AutoCompleteTextField
  * Putting Javascript or CSS into the header using a Resource
  * Using a Visitor to add multiple form components to an  
AjaxTarget

  * Working with Wicket and Spring
  * and on and on...

In all we have about 15 examples so far, and it's growing daily.   
We would
love you to at least drop by, and contribute with your tips and  
tricks and
examples of usage that might not have been covered, or was very  
hard to find

when you were looking for it.

happy monday!  and develop happy!


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,  
directly or

indirectly, use,
disclose, distribute, print, or copy any part of this message if  
you are

not the intended recipient.





-
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 our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,  
directly or indirectly, use,
disclose, distribute, print, or copy any part of this message if you  
are not the intended recipient.






To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,  
directly or indirectly, use,
 disclose, distribute, print, or copy any part of this message if you  
are not the intended recipient.





Re: add a default-gray-text to AutoCompleteTextField

2009-08-07 Thread glooorrryyy

I've got the solution. I have to send the markup-id to the jquery code.
Looks like the markup-id is changed from the predefined one.


glooorrryyy wrote:
 
 Why couldn't I set default gray text (like in Google search input field)
 for an AutoCompleteTextField?
 The fact is, I could do this to TextField component.
 I'm using TextTemplateHeaderContributor to make this happen to TextField.
 
 Does anyone know the the reason?
 Or perhaps I did something wrong???
 
  Thanks in Advance,
 Gloria Saripah Patara
 
 
 
   
 

-- 
View this message in context: 
http://www.nabble.com/add-a-default-gray-text-to-AutoCompleteTextField-tp24825708p24859437.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: DropDownChoice.onSelectionChanged() in ModalWindow

2009-08-07 Thread Petr Fejfar
On Fri, Aug 7, 2009 at 8:03 AM, Martin
Makundimartin.maku...@koodaripalvelut.com wrote:

 You must add OnChangeAjaxBehavior onto the dropdown and NOT
 wantOnSelectionChangedNotifications().

I see... I fixed it following you recommendation. Thanks for prompt help.

--

Anyway, I'm still fighting with Ajax:

I want to show/hide a AjaxButton in dependence on whether
there is any value selected by the DropDownChoice.

I've AjaxButton on my form in the modal window hidden at the beginning:

musterButton.setOutputMarkupId(true);
musterButton.setVisible(false);
form.add(musterButton);

and in the handler of onUpdate event I'm trying to show it if selected
value is not null:

protected void onUpdate(AjaxRequestTarget target) {
...
musterButton.setVisible(pp.getMuster()!=null);
target.addComponent(musterButton);
}

But the button is not shown event if setVisible() is set to true.
What I'm missing now?


Thanks, Petr

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



Re: DropDownChoice.onSelectionChanged() in ModalWindow

2009-08-07 Thread Martin Makundi
 I've AjaxButton on my form in the modal window hidden at the beginning:
 But the button is not shown event if setVisible() is set to true.
 What I'm missing now?

Look at Wicket Debug console in your browser. You will probably see
that canont replace hidden component with visible component because
hidden component not found.. naturally. So in order for  the hidden
component to exist in the HTML DOM tree even if it is HIDDEN, you
must set:

dropDownChoice.setOutputMarkupPlaceholderTag(true);

**
Martin



 Thanks, Petr

 -
 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.onSelectionChanged() in ModalWindow

2009-08-07 Thread Petr Fejfar
On Fri, Aug 7, 2009 at 8:39 AM, Martin
Makundimartin.maku...@koodaripalvelut.com wrote:

 hidden component not found.. naturally. So in order for  the hidden
 component to exist in the HTML DOM tree even if it is HIDDEN, you
 must set:

... still thinking like in Desktop world  :'(

Thanks for prompt help

Petr

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



wicket 1.2.7 to 1.4-rc5 Error

2009-08-07 Thread Gerald Fernando
Hello Friends,
previously i used wicket 1.2.7 jar wicket extension 1.2.7 jar and
servlet-api-2.5-6.0.1.jar
my wicket page is worked well.
now i have changed wicket 1.4-rc5. jar wicket extension 1.4-rc5. jar and
servlet-api-2.5-6.0.1.jar
 my web.xml written like this

?xml version=1.0 encoding=UTF-8?
web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=
http://java.sun.com/xml/ns/javaee; xmlns:web=
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID
version=2.5
  display-nameWicket Examples/display-name
 welcome-file-list
  welcome-filetest.html/welcome-file
 /welcome-file-list

   servlet
  servlet-nameHelloWorldApplication/servlet-name
  servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class

  init-param
param-nameapplicationClassName/param-name
param-valuehelloworld.HelloWorldApplication/param-value
  /init-param
 /servlet
 servlet-mapping
  servlet-nameHelloWorldApplication/servlet-name
  url-pattern/helloworld/*/url-pattern
 /servlet-mapping

/web-app



When i run this page it shows the error

javax.servlet.ServletException: Error instantiating servlet class
org.apache.wicket.protocol.http.WicketServlet
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory.

How can i solve it.
please give me solution to solve this problem

is there any .jar files i need to include?
or
i need to change my web.xml file???



-- 
Thanksregards,
Gerald A


AW: wicket 1.2.7 to 1.4-rc5 Error

2009-08-07 Thread Greven, Jens
Gerald,


You need to include slf4j.jar. As far as I understand it, slf4jar is only a 
wrapper for a logging framework of your choice, let's assume you use log4j 
for logging, you would also have to include slf4-log4j12.jar. 

I use the follwing:
slf4j-api-1.5.8.jar
slf4j-log4j12-1.5.8.jar
log4j-1.2.14.jar


Hope this helps,
Jens

-Ursprüngliche Nachricht-
Von: Gerald Fernando [mailto:gerald.anto.ferna...@gmail.com] 
Gesendet: Freitag, 7. August 2009 11:17
An: users@wicket.apache.org
Betreff: wicket 1.2.7 to 1.4-rc5 Error

Hello Friends,
previously i used wicket 1.2.7 jar wicket extension 1.2.7 jar and
servlet-api-2.5-6.0.1.jar
my wicket page is worked well.
now i have changed wicket 1.4-rc5. jar wicket extension 1.4-rc5. jar and
servlet-api-2.5-6.0.1.jar
 my web.xml written like this

?xml version=1.0 encoding=UTF-8?
web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=
http://java.sun.com/xml/ns/javaee; xmlns:web=
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID
version=2.5
  display-nameWicket Examples/display-name
 welcome-file-list
  welcome-filetest.html/welcome-file
 /welcome-file-list

   servlet
  servlet-nameHelloWorldApplication/servlet-name
  servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class

  init-param
param-nameapplicationClassName/param-name
param-valuehelloworld.HelloWorldApplication/param-value
  /init-param
 /servlet
 servlet-mapping
  servlet-nameHelloWorldApplication/servlet-name
  url-pattern/helloworld/*/url-pattern
 /servlet-mapping

/web-app



When i run this page it shows the error

javax.servlet.ServletException: Error instantiating servlet class
org.apache.wicket.protocol.http.WicketServlet
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory.

How can i solve it.
please give me solution to solve this problem

is there any .jar files i need to include?
or
i need to change my web.xml file???



-- 
Thanksregards,
Gerald A

Jens Greven
Team EDV

Telefon: 0251-70017-339
Telefax: 0251-70017-203
E-Mail: jgre...@pma.de

[pma: ] Finanz-Service GmbH
Ein Unternehmen von Pramerica Financial
Münsterstr. 111
48155 Münster
http://www.pma.de

Geschäftsführung: Jörg Matheis, Lambert Stegemann
Handelsregister: Amtsgericht Münster HRB 4256Diese Information ist 
ausschließlich für die adressierte Person oder Organisation bestimmt und könnte 
vertrauliches Material enthalten. Sollten Sie diese Nachricht irrtümlich 
erhalten haben, bitten wir Sie, sich mit dem Absender in Verbindung zu setzen 
und das Material von Ihrem Computer zu löschen. Das unerlaubte Kopieren sowie 
die unbefugte Weitergabe dieser Mail ist nicht gestattet.

Wir weisen darauf hin, dass E-Mail-Nachrichten mit und ohne Zutun von Dritten 
verloren gehen, verändert oder verfälscht werden können. Herkömmliche E-Mails 
sind nicht gegen den Zugriff von Dritten geschützt und deshalb ist auch die 
Vertraulichkeit unter Umständen nicht gewahrt. Wir haften deshalb nicht für die 
Unversehrtheit von E-Mails nachdem sie unseren Herrschaftsbereich verlassen 
haben und können Ihnen hieraus entstehende Schäden nicht ersetzen. Sollten 
trotz der von uns verwendeten Virus-Schutz-Programme durch die Zusendung von 
E-Mails ein Virus in Ihre Systeme gelangen, haften wir nicht für eventuell 
hieraus entstehende Schäden. Dieser Haftungsausschluss gilt nur soweit 
gesetzlich zulässig.



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



Re: wicket 1.2.7 to 1.4-rc5 Error

2009-08-07 Thread Martijn Dashorst
We have migration guides available that explain this, and other stuff as well.

http://cwiki.apache.org/WICKET/migrate-13.html
http://cwiki.apache.org/WICKET/migrate-14.html

Martijn

On Fri, Aug 7, 2009 at 11:17 AM, Gerald
Fernandogerald.anto.ferna...@gmail.com wrote:
 Hello Friends,
 previously i used wicket 1.2.7 jar wicket extension 1.2.7 jar and
 servlet-api-2.5-6.0.1.jar
 my wicket page is worked well.
 now i have changed wicket 1.4-rc5. jar wicket extension 1.4-rc5. jar and
 servlet-api-2.5-6.0.1.jar
  my web.xml written like this

 ?xml version=1.0 encoding=UTF-8?
 web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=
 http://java.sun.com/xml/ns/javaee; xmlns:web=
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=
 http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID
 version=2.5
  display-nameWicket Examples/display-name
  welcome-file-list
  welcome-filetest.html/welcome-file
  /welcome-file-list

   servlet
  servlet-nameHelloWorldApplication/servlet-name
  servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class

  init-param
    param-nameapplicationClassName/param-name
    param-valuehelloworld.HelloWorldApplication/param-value
  /init-param
  /servlet
  servlet-mapping
  servlet-nameHelloWorldApplication/servlet-name
  url-pattern/helloworld/*/url-pattern
  /servlet-mapping

 /web-app



 When i run this page it shows the error

 javax.servlet.ServletException: Error instantiating servlet class
 org.apache.wicket.protocol.http.WicketServlet
 java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory.

 How can i solve it.
 please give me solution to solve this problem

 is there any .jar files i need to include?
 or
 i need to change my web.xml file???



 --
 Thanksregards,
 Gerald A




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: DataView/IDataProvider/Detach

2009-08-07 Thread Robin Sander


Hi,

correct me if I'm wrong, Igor, but I thought detach() is used to keep  
the model memory footprint low

*between requests* and Serialization is a total different story.
If I mark a field as transient I don't have to nullify it in detach().
For example using a IDataProvider for pagination:
If I set a (transient) field to null after every request I have to  
initialize it before every request too,
sounds inefficient to me. To re-initialize a transient field I would  
use readObject(ObjectInputStream in)

instead.
If I'm right the following comment in IDetachable is misleading:

/**
	 * Detaches model after use. This is generally used to null out  
transient references that can be

 * re-attached later.
 */
void detach();

What am I missing?

Robin.



On 06.08.2009, at 21:45, Igor Vaynberg wrote:


yep, lazy init is the way to do things. also helps to mark those
fields as transient as an additional safeguard.

-igor

On Thu, Aug 6, 2009 at 12:22 AM, Gabi Kaltmangkalt...@yahoo.com  
wrote:

Hi,

I'm very young on the Wicket planet, so please excuse my simple  
question related to DataView/IDataProvider


My configuration:
1. I use a DataView (MyDataView)
2. I added a PageNavigator to MyDataView
3. I defined a IDataProvider attached to  MyDataView (MyDataProvider)
4. MyDataProvider has a not-serializable field (MyField)
5. MyField is used in the method MyDataProvider.size()
6. I use Wicket 1.4.0

What I do:
1.  In the method MyDataProvider.detach() , I nullify MyField  
(MyField = null)


What happens:
1. When I navigate through pages, I get a NPE in  
MyDataProvider.size() as MyField became null


How I fixed it:
1. I overrode in MyDataView the method getDataProvider(). Didn't  
work. I noticed that this method is never invoked
2. I tested again null in MyDataProvider.size(). If MyField is  
null, I just reinitialize it. It works


My question is if this solution is the optimal one, or there is a  
better one?


Thanks,
kaltman






-
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: Help us release 1.4 sooner by helping out with the migration guide

2009-08-07 Thread Major Péter
Hmm... On the Wiki page did you forgot the LinkTree modification, or 
isn't that so relevant, to put it on wiki?


Also it is strange that there are two wiki pages for migrating guide:
http://cwiki.apache.org/WICKET/migrate-14.html
and
http://cwiki.apache.org/confluence/display/WICKET/Migrating+to+Wicket+1.4

The second one is a little more detailed, than the first one, but 
Martijn has linked the first one just before. Don't you need to 
synchronize this two page?


Regards,
Peter

2009-07-14 03:47 keltezéssel, Igor Vaynberg írta:

thanks major, i added a couple of notes to the wiki. i totally forgot
about 2350, i will get it into 1.4.0 for sure.

-igor

2009/7/11 Major Pétermajorpe...@sch.bme.hu:

Hi,

I have recently upgraded my project and I did find these changes:
- the first parameter of
org.apache.wicket.markup.html.tree.LinkTree#onNodeLinkClicked has been
changed from TreeNode to Object, so if you had override this method, you
need to change the parametertype.
- localization messages for validations works only in
form.component.validatorType=message format, the
component.validatorType=message format isn't working anymore (but this could
be change for final release - for further infos see:
https://issues.apache.org/jira/browse/WICKET-2350 )

Besides this, I found in WebApplication#getConfigurationType a FIXME
comment, so in theory the init-param's name for filter/servlet (or
context-param) should be changed from configuration to
wicket.configuration in final 1.4 release. (See:
https://issues.apache.org/jira/browse/WICKET-1317 )

//Also many old component has been genericized, a list of these components
would be helpful, (for example TextField, RequiredTF, and so on, if you
follow these changes in your code, it would be easier to read next time)

p.s: I would wrote this on wiki, but I know how bad my english is. :)

Best Regards,
Peter Major

2009-07-10 21:22 keltezéssel, Igor Vaynberg írta:

We would like to release Wicket 1.4 very soon, but in order to do so
we would like to provide our users with a good migration guide.

We have started one here:
http://cwiki.apache.org/confluence/display/WICKET/Migrate-1.4 but it
probably lacks the smaller tweaks necessary to migrate.

If you have recently migrated a project, or remember any changes you
had to perform, or have any helpful tips or hints please add them to
the migration guide. Do not worry about formatting, for now we are
looking for content.

If you do not want to bother putting them on the wiki simply add them
to this thread.

Thanks!

-igor


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



Re: wicket 1.2.7 to 1.4-rc5 Error

2009-08-07 Thread Gerald Fernando
Hi Jens,
how to get these jar files and where to include it?
please give me urgent solution

ThanksRegards,
Gerald A

2009/8/7 Greven, Jens jgre...@pma.de

 Gerald,


 You need to include slf4j.jar. As far as I understand it, slf4jar is only a
 wrapper for a logging framework of your choice, let's assume you use log4j
 for logging, you would also have to include slf4-log4j12.jar.

 I use the follwing:
 slf4j-api-1.5.8.jar
 slf4j-log4j12-1.5.8.jar
 log4j-1.2.14.jar


 Hope this helps,
 Jens

 -Ursprüngliche Nachricht-
 Von: Gerald Fernando [mailto:gerald.anto.ferna...@gmail.com]
 Gesendet: Freitag, 7. August 2009 11:17
 An: users@wicket.apache.org
 Betreff: wicket 1.2.7 to 1.4-rc5 Error

 Hello Friends,
 previously i used wicket 1.2.7 jar wicket extension 1.2.7 jar and
 servlet-api-2.5-6.0.1.jar
 my wicket page is worked well.
 now i have changed wicket 1.4-rc5. jar wicket extension 1.4-rc5. jar and
 servlet-api-2.5-6.0.1.jar
  my web.xml written like this

 ?xml version=1.0 encoding=UTF-8?
 web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=
 http://java.sun.com/xml/ns/javaee; xmlns:web=
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=
 http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID
 version=2.5
  display-nameWicket Examples/display-name
  welcome-file-list
  welcome-filetest.html/welcome-file
  /welcome-file-list

   servlet
  servlet-nameHelloWorldApplication/servlet-name

  servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class

  init-param
param-nameapplicationClassName/param-name
param-valuehelloworld.HelloWorldApplication/param-value
  /init-param
  /servlet
  servlet-mapping
  servlet-nameHelloWorldApplication/servlet-name
  url-pattern/helloworld/*/url-pattern
  /servlet-mapping

 /web-app



 When i run this page it shows the error

 javax.servlet.ServletException: Error instantiating servlet class
 org.apache.wicket.protocol.http.WicketServlet
 java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory.

 How can i solve it.
 please give me solution to solve this problem

 is there any .jar files i need to include?
 or
 i need to change my web.xml file???



 --
 Thanksregards,
 Gerald A

 Jens Greven
 Team EDV

 Telefon: 0251-70017-339
 Telefax: 0251-70017-203
 E-Mail: jgre...@pma.de

 [pma: ] Finanz-Service GmbH
 Ein Unternehmen von Pramerica Financial
 Münsterstr. 111
 48155 Münster
 http://www.pma.de

 Geschäftsführung: Jörg Matheis, Lambert Stegemann
 Handelsregister: Amtsgericht Münster HRB 4256Diese Information ist
 ausschließlich für die adressierte Person oder Organisation bestimmt und
 könnte vertrauliches Material enthalten. Sollten Sie diese Nachricht
 irrtümlich erhalten haben, bitten wir Sie, sich mit dem Absender in
 Verbindung zu setzen und das Material von Ihrem Computer zu löschen. Das
 unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht
 gestattet.

 Wir weisen darauf hin, dass E-Mail-Nachrichten mit und ohne Zutun von
 Dritten verloren gehen, verändert oder verfälscht werden können.
 Herkömmliche E-Mails sind nicht gegen den Zugriff von Dritten geschützt und
 deshalb ist auch die Vertraulichkeit unter Umständen nicht gewahrt. Wir
 haften deshalb nicht für die Unversehrtheit von E-Mails nachdem sie unseren
 Herrschaftsbereich verlassen haben und können Ihnen hieraus entstehende
 Schäden nicht ersetzen. Sollten trotz der von uns verwendeten
 Virus-Schutz-Programme durch die Zusendung von E-Mails ein Virus in Ihre
 Systeme gelangen, haften wir nicht für eventuell hieraus entstehende
 Schäden. Dieser Haftungsausschluss gilt nur soweit gesetzlich zulässig.



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




-- 
Thanksregards,
Gerald A


Re: wicket 1.2.7 to 1.4-rc5 Error

2009-08-07 Thread Martin Makundi
Are you using Maven?

That's the easiest solution. Otherwise you can try to google jar finder.

**
Maritn

2009/8/7 Gerald Fernando gerald.anto.ferna...@gmail.com:
 Hi Jens,
 how to get these jar files and where to include it?
 please give me urgent solution

 ThanksRegards,
 Gerald A

 2009/8/7 Greven, Jens jgre...@pma.de

 Gerald,


 You need to include slf4j.jar. As far as I understand it, slf4jar is only a
 wrapper for a logging framework of your choice, let's assume you use log4j
 for logging, you would also have to include slf4-log4j12.jar.

 I use the follwing:
 slf4j-api-1.5.8.jar
 slf4j-log4j12-1.5.8.jar
 log4j-1.2.14.jar


 Hope this helps,
 Jens

 -Ursprüngliche Nachricht-
 Von: Gerald Fernando [mailto:gerald.anto.ferna...@gmail.com]
 Gesendet: Freitag, 7. August 2009 11:17
 An: users@wicket.apache.org
 Betreff: wicket 1.2.7 to 1.4-rc5 Error

 Hello Friends,
 previously i used wicket 1.2.7 jar wicket extension 1.2.7 jar and
 servlet-api-2.5-6.0.1.jar
 my wicket page is worked well.
 now i have changed wicket 1.4-rc5. jar wicket extension 1.4-rc5. jar and
 servlet-api-2.5-6.0.1.jar
  my web.xml written like this

 ?xml version=1.0 encoding=UTF-8?
 web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=
 http://java.sun.com/xml/ns/javaee; xmlns:web=
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=
 http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID
 version=2.5
  display-nameWicket Examples/display-name
  welcome-file-list
  welcome-filetest.html/welcome-file
  /welcome-file-list

   servlet
  servlet-nameHelloWorldApplication/servlet-name

  servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class

  init-param
    param-nameapplicationClassName/param-name
    param-valuehelloworld.HelloWorldApplication/param-value
  /init-param
  /servlet
  servlet-mapping
  servlet-nameHelloWorldApplication/servlet-name
  url-pattern/helloworld/*/url-pattern
  /servlet-mapping

 /web-app



 When i run this page it shows the error

 javax.servlet.ServletException: Error instantiating servlet class
 org.apache.wicket.protocol.http.WicketServlet
 java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory.

 How can i solve it.
 please give me solution to solve this problem

 is there any .jar files i need to include?
 or
 i need to change my web.xml file???



 --
 Thanksregards,
 Gerald A

 Jens Greven
 Team EDV

 Telefon: 0251-70017-339
 Telefax: 0251-70017-203
 E-Mail: jgre...@pma.de

 [pma: ] Finanz-Service GmbH
 Ein Unternehmen von Pramerica Financial
 Münsterstr. 111
 48155 Münster
 http://www.pma.de

 Geschäftsführung: Jörg Matheis, Lambert Stegemann
 Handelsregister: Amtsgericht Münster HRB 4256Diese Information ist
 ausschließlich für die adressierte Person oder Organisation bestimmt und
 könnte vertrauliches Material enthalten. Sollten Sie diese Nachricht
 irrtümlich erhalten haben, bitten wir Sie, sich mit dem Absender in
 Verbindung zu setzen und das Material von Ihrem Computer zu löschen. Das
 unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht
 gestattet.

 Wir weisen darauf hin, dass E-Mail-Nachrichten mit und ohne Zutun von
 Dritten verloren gehen, verändert oder verfälscht werden können.
 Herkömmliche E-Mails sind nicht gegen den Zugriff von Dritten geschützt und
 deshalb ist auch die Vertraulichkeit unter Umständen nicht gewahrt. Wir
 haften deshalb nicht für die Unversehrtheit von E-Mails nachdem sie unseren
 Herrschaftsbereich verlassen haben und können Ihnen hieraus entstehende
 Schäden nicht ersetzen. Sollten trotz der von uns verwendeten
 Virus-Schutz-Programme durch die Zusendung von E-Mails ein Virus in Ihre
 Systeme gelangen, haften wir nicht für eventuell hieraus entstehende
 Schäden. Dieser Haftungsausschluss gilt nur soweit gesetzlich zulässig.



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




 --
 Thanksregards,
 Gerald A


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



Re: wicket 1.2.7 to 1.4-rc5 Error

2009-08-07 Thread Gerald Fernando
I am not using Maven.
am just using only the apache tomcat.
so according to you i have to get the following files in Google

slf4j-api-1.5.8.jar
slf4j-log4j12-1.5.8.jar
log4j-1.2.14.jar


am i correct??
shall i down load it from google??
ThanksRegards,
Gerald A

2009/8/7 Martin Makundi martin.maku...@koodaripalvelut.com

 Are you using Maven?

 That's the easiest solution. Otherwise you can try to google jar finder.

 **
 Maritn

 2009/8/7 Gerald Fernando gerald.anto.ferna...@gmail.com:
   Hi Jens,
  how to get these jar files and where to include it?
  please give me urgent solution
 
  ThanksRegards,
  Gerald A
 
  2009/8/7 Greven, Jens jgre...@pma.de
 
  Gerald,
 
 
  You need to include slf4j.jar. As far as I understand it, slf4jar is
 only a
  wrapper for a logging framework of your choice, let's assume you use
 log4j
  for logging, you would also have to include slf4-log4j12.jar.
 
  I use the follwing:
  slf4j-api-1.5.8.jar
  slf4j-log4j12-1.5.8.jar
  log4j-1.2.14.jar
 
 
  Hope this helps,
  Jens
 
  -Ursprüngliche Nachricht-
  Von: Gerald Fernando [mailto:gerald.anto.ferna...@gmail.com]
  Gesendet: Freitag, 7. August 2009 11:17
  An: users@wicket.apache.org
  Betreff: wicket 1.2.7 to 1.4-rc5 Error
 
  Hello Friends,
  previously i used wicket 1.2.7 jar wicket extension 1.2.7 jar and
  servlet-api-2.5-6.0.1.jar
  my wicket page is worked well.
  now i have changed wicket 1.4-rc5. jar wicket extension 1.4-rc5. jar and
  servlet-api-2.5-6.0.1.jar
   my web.xml written like this
 
  ?xml version=1.0 encoding=UTF-8?
  web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=
  http://java.sun.com/xml/ns/javaee; xmlns:web=
  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=
  http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID
  version=2.5
   display-nameWicket Examples/display-name
   welcome-file-list
   welcome-filetest.html/welcome-file
   /welcome-file-list
 
servlet
   servlet-nameHelloWorldApplication/servlet-name
 
 
  servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
 
   init-param
 param-nameapplicationClassName/param-name
 param-valuehelloworld.HelloWorldApplication/param-value
   /init-param
   /servlet
   servlet-mapping
   servlet-nameHelloWorldApplication/servlet-name
   url-pattern/helloworld/*/url-pattern
   /servlet-mapping
 
  /web-app
 
 
 
  When i run this page it shows the error
 
  javax.servlet.ServletException: Error instantiating servlet class
  org.apache.wicket.protocol.http.WicketServlet
  java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory.
 
  How can i solve it.
  please give me solution to solve this problem
 
  is there any .jar files i need to include?
  or
  i need to change my web.xml file???
 
 
 
  --
  Thanksregards,
  Gerald A
 
  Jens Greven
  Team EDV
 
  Telefon: 0251-70017-339
  Telefax: 0251-70017-203
  E-Mail: jgre...@pma.de
 
  [pma: ] Finanz-Service GmbH
  Ein Unternehmen von Pramerica Financial
  Münsterstr. 111
  48155 Münster
  http://www.pma.de
 
  Geschäftsführung: Jörg Matheis, Lambert Stegemann
  Handelsregister: Amtsgericht Münster HRB 4256Diese Information ist
  ausschließlich für die adressierte Person oder Organisation bestimmt und
  könnte vertrauliches Material enthalten. Sollten Sie diese Nachricht
  irrtümlich erhalten haben, bitten wir Sie, sich mit dem Absender in
  Verbindung zu setzen und das Material von Ihrem Computer zu löschen. Das
  unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht
  gestattet.
 
  Wir weisen darauf hin, dass E-Mail-Nachrichten mit und ohne Zutun von
  Dritten verloren gehen, verändert oder verfälscht werden können.
  Herkömmliche E-Mails sind nicht gegen den Zugriff von Dritten geschützt
 und
  deshalb ist auch die Vertraulichkeit unter Umständen nicht gewahrt. Wir
  haften deshalb nicht für die Unversehrtheit von E-Mails nachdem sie
 unseren
  Herrschaftsbereich verlassen haben und können Ihnen hieraus entstehende
  Schäden nicht ersetzen. Sollten trotz der von uns verwendeten
  Virus-Schutz-Programme durch die Zusendung von E-Mails ein Virus in Ihre
  Systeme gelangen, haften wir nicht für eventuell hieraus entstehende
  Schäden. Dieser Haftungsausschluss gilt nur soweit gesetzlich zulässig.
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Thanksregards,
  Gerald A
 

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




-- 
Thanksregards,
Gerald A


RE: wicket 1.2.7 to 1.4-rc5 Error

2009-08-07 Thread Greven, Jens
Hi Gerald,


Have a look at http://logging.apache.org/log4j/1.2/download.html and 
http://www.slf4j.org/download.html.


Rgds
Jens


-Original Message-
From: Gerald Fernando [mailto:gerald.anto.ferna...@gmail.com] 
Sent: Friday, August 07, 2009 1:12 PM
To: users@wicket.apache.org
Subject: Re: wicket 1.2.7 to 1.4-rc5 Error

I am not using Maven.
am just using only the apache tomcat.
so according to you i have to get the following files in Google

slf4j-api-1.5.8.jar
slf4j-log4j12-1.5.8.jar
log4j-1.2.14.jar


am i correct??
shall i down load it from google??
ThanksRegards,
Gerald A

2009/8/7 Martin Makundi martin.maku...@koodaripalvelut.com

 Are you using Maven?

 That's the easiest solution. Otherwise you can try to google jar finder.

 **
 Maritn

 2009/8/7 Gerald Fernando gerald.anto.ferna...@gmail.com:
   Hi Jens,
  how to get these jar files and where to include it?
  please give me urgent solution
 
  ThanksRegards,
  Gerald A
 
  2009/8/7 Greven, Jens jgre...@pma.de
 
  Gerald,
 
 
  You need to include slf4j.jar. As far as I understand it, slf4jar is
 only a
  wrapper for a logging framework of your choice, let's assume you use
 log4j
  for logging, you would also have to include slf4-log4j12.jar.
 
  I use the follwing:
  slf4j-api-1.5.8.jar
  slf4j-log4j12-1.5.8.jar
  log4j-1.2.14.jar
 
 
  Hope this helps,
  Jens
 
  -Ursprüngliche Nachricht-
  Von: Gerald Fernando [mailto:gerald.anto.ferna...@gmail.com]
  Gesendet: Freitag, 7. August 2009 11:17
  An: users@wicket.apache.org
  Betreff: wicket 1.2.7 to 1.4-rc5 Error
 
  Hello Friends,
  previously i used wicket 1.2.7 jar wicket extension 1.2.7 jar and
  servlet-api-2.5-6.0.1.jar
  my wicket page is worked well.
  now i have changed wicket 1.4-rc5. jar wicket extension 1.4-rc5. jar and
  servlet-api-2.5-6.0.1.jar
   my web.xml written like this
 
  ?xml version=1.0 encoding=UTF-8?
  web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=
  http://java.sun.com/xml/ns/javaee; xmlns:web=
  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=
  http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID
  version=2.5
   display-nameWicket Examples/display-name
   welcome-file-list
   welcome-filetest.html/welcome-file
   /welcome-file-list
 
servlet
   servlet-nameHelloWorldApplication/servlet-name
 
 
  servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
 
   init-param
 param-nameapplicationClassName/param-name
 param-valuehelloworld.HelloWorldApplication/param-value
   /init-param
   /servlet
   servlet-mapping
   servlet-nameHelloWorldApplication/servlet-name
   url-pattern/helloworld/*/url-pattern
   /servlet-mapping
 
  /web-app
 
 
 
  When i run this page it shows the error
 
  javax.servlet.ServletException: Error instantiating servlet class
  org.apache.wicket.protocol.http.WicketServlet
  java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory.
 
  How can i solve it.
  please give me solution to solve this problem
 
  is there any .jar files i need to include?
  or
  i need to change my web.xml file???
 
 
 
  --
  Thanksregards,
  Gerald A
 
  Jens Greven
  Team EDV
 
  Telefon: 0251-70017-339
  Telefax: 0251-70017-203
  E-Mail: jgre...@pma.de
 
  [pma: ] Finanz-Service GmbH
  Ein Unternehmen von Pramerica Financial
  Münsterstr. 111
  48155 Münster
  http://www.pma.de
 
  Geschäftsführung: Jörg Matheis, Lambert Stegemann
  Handelsregister: Amtsgericht Münster HRB 4256Diese Information ist
  ausschließlich für die adressierte Person oder Organisation bestimmt und
  könnte vertrauliches Material enthalten. Sollten Sie diese Nachricht
  irrtümlich erhalten haben, bitten wir Sie, sich mit dem Absender in
  Verbindung zu setzen und das Material von Ihrem Computer zu löschen. Das
  unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht
  gestattet.
 
  Wir weisen darauf hin, dass E-Mail-Nachrichten mit und ohne Zutun von
  Dritten verloren gehen, verändert oder verfälscht werden können.
  Herkömmliche E-Mails sind nicht gegen den Zugriff von Dritten geschützt
 und
  deshalb ist auch die Vertraulichkeit unter Umständen nicht gewahrt. Wir
  haften deshalb nicht für die Unversehrtheit von E-Mails nachdem sie
 unseren
  Herrschaftsbereich verlassen haben und können Ihnen hieraus entstehende
  Schäden nicht ersetzen. Sollten trotz der von uns verwendeten
  Virus-Schutz-Programme durch die Zusendung von E-Mails ein Virus in Ihre
  Systeme gelangen, haften wir nicht für eventuell hieraus entstehende
  Schäden. Dieser Haftungsausschluss gilt nur soweit gesetzlich zulässig.
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  Thanksregards,
  Gerald A
 

 -
 To unsubscribe, e-mail: 

How To Kill Previous Page

2009-08-07 Thread Carlo Camerino
Hi,

I would like to ask if it's possible to kill the previous page out of the
pagestore.
I have this requirement in which i have a view screen which can be able to
delete or edit an entity.

My problem is that when the client copies the url and pastes it back the
client can go back to the previous page since the client can retrieve it
from the session store.

Is there  a way in which wicket can actually destroy the previous page?

the problem is the users can copy for exampler

View Page
wicket:interface=1

Acknowledgement Page
wicket:interface=2

The user can actually paste the url

wicket:interface=1 to the browser and still be able to view the record.

Is there any way for me to kill the page with id = 1?

Thanks A Lot
Carlo


Re: How To Kill Previous Page

2009-08-07 Thread Alex Objelean

getPage().getPageMap().remove(); ?

Alex Objelean


carlo c wrote:
 
 Hi,
 
 I would like to ask if it's possible to kill the previous page out of the
 pagestore.
 I have this requirement in which i have a view screen which can be able to
 delete or edit an entity.
 
 My problem is that when the client copies the url and pastes it back the
 client can go back to the previous page since the client can retrieve it
 from the session store.
 
 Is there  a way in which wicket can actually destroy the previous page?
 
 the problem is the users can copy for exampler
 
 View Page
 wicket:interface=1
 
 Acknowledgement Page
 wicket:interface=2
 
 The user can actually paste the url
 
 wicket:interface=1 to the browser and still be able to view the record.
 
 Is there any way for me to kill the page with id = 1?
 
 Thanks A Lot
 Carlo
 
 

-- 
View this message in context: 
http://www.nabble.com/How-To-Kill-Previous-Page-tp24863148p24863291.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: Can I send a parameter value to RequestCycle?

2009-08-07 Thread marius1maru

   Thank you Igor and Alex for your answers.
   
  I managed to send the itemId parameter to WebRequestCycle, by modifying
the URL inside wicketAjaxGet, generated by AjaxLink.
  
  The code looks like this:
c.add(new AbstractBehavior() {
@Override
public void onComponentTag(Component 
component,
ComponentTag tag) {

inservAdvIdInAjaxLink(tag, 
advertisementId);
}

/**
 * Insert advId at the end of the url 
inside wicketAjaxGet from tag
attribute onclick.
 * @param tag ComponentTag
 * @param advId advertisement id
 */
private void 
inservAdvIdInAjaxLink(ComponentTag tag,
String advId) {
String onclickElement = 
(String) tag.getAttributes().get(onclick);

String elementToModify = 
wicketAjaxGet(';
String subOnclickElement =
onclickElement.substring(onclickElement.indexOf(elementToModify) +
elementToModify.length());
String ajaxHref = 
subOnclickElement.substring(0,
subOnclickElement.indexOf('));
onclickElement = 
onclickElement.replace(ajaxHref, ajaxHref +
itemId= + advId);

tag.put(href, ajaxHref + 
itemId= + advId);
tag.put(onclick, 
onclickElement);
}
}); 

The 'onclick' attribute changed from:   

wicketShow('id10--ajax-indicator');var
wcall=wicketAjaxGet('?wicket:interface=:2:10:::0:',function(){;wicketHide('id10--ajax-indicator');}.bind(this),function()
{ ;wicketHide('id10--ajax-indicator');}.bind(this), function() {return
Wicket.$('id10') != null;}.bind(this));return !wcall;
  
  to:
  
  wicketShow('id10--ajax-indicator');var
wcall=wicketAjaxGet('?wicket:interface=:2:10:::0:itemId=xxx',function(){;wicketHide('id10--ajax-indicator');}.bind(this),function()
{ ;wicketHide('id10--ajax-indicator');}.bind(this), function() {return
Wicket.$('id10') != null;}.bind(this));return !wcall;   


If someone have a more elegant solution, please post it.
  Marius Anton


Alexandru Objelean wrote:
 
 I think this is not enough...
 The generated markup looks like this:
 
 li wicket:id=tabs class=tab2 last 
a
 href=?wicket:interface=:2:tabs:tabs-container:tabs:2:link::ILinkListener::amp;itemId=2
 wicket:id=link id=link8 onclick=var
 wcall=wicketAjaxGet('?wicket:interface=:2:tabs:tabs-container:tabs:2:link::IBehaviorListener:0:',null,null,
 function() {return Wicket.$('link8') != null;}.bind(this));return
 !wcall; span wicket:id=titlethird tab/ a 
   / li 
 /pre
 
 In order to make it work, the wicketAjaxGet url should also contain the
 itemId parameter appended.. Otherwise it will work only when javascript is
 disabled.
 
 Alex Objelean
 
 
 igor.vaynberg wrote:
 
 c.add(new abstractbehavior() {
   oncomponenttag(tag) {
 tag.put(href, tag.getattributes().get(href)+itemid=xxx);
   }
 }
 
 -igor
 
 
 On Thu, Aug 6, 2009 at 6:05 AM, marius1marumarius1m...@yahoo.com wrote:

  Thank you for your answer Igor.

  I did not manage to append the id to the url. I tried something like
 this:

                tabbedPanel = new AjaxTabbedPanel(mytabpanel, tabs) {

                       �...@override
                        protected WebMarkupContainer newLink(String
 linkId, final int index) {

                                final WebMarkupContainer c = new
 IndicatingAjaxLink(linkId) {

                                       �...@override
                                        public void
 onClick(AjaxRequestTarget target) {
                                                setSelectedTab(index);
                                                if (target != null) {
                                                      
  target.addComponent(MyTabbedPanel.this);
                                                }
                                                onAjaxUpdate(target);
                                        }
                                };

      

Re: Help us release 1.4 sooner by helping out with the migration guide

2009-08-07 Thread Erik van Oosten
If I remember correctly: the first link should be use. The second can be 
edited and will be copied to the first after each change. If the pages 
are not equal, something went wrong with the copy process.


Re. LinkTree: every change should be on this page. Please add it.

Regards,
   Erik.

Major Péter wrote:
Hmm... On the Wiki page did you forgot the LinkTree modification, or 
isn't that so relevant, to put it on wiki?


Also it is strange that there are two wiki pages for migrating guide:
http://cwiki.apache.org/WICKET/migrate-14.html
and
http://cwiki.apache.org/confluence/display/WICKET/Migrating+to+Wicket+1.4

The second one is a little more detailed, than the first one, but 
Martijn has linked the first one just before. Don't you need to 
synchronize this two page?


Regards,
Peter

2009-07-14 03:47 keltezéssel, Igor Vaynberg írta:

thanks major, i added a couple of notes to the wiki. i totally forgot
about 2350, i will get it into 1.4.0 for sure.

-igor

2009/7/11 Major Pétermajorpe...@sch.bme.hu:

Hi,

I have recently upgraded my project and I did find these changes:
- the first parameter of
org.apache.wicket.markup.html.tree.LinkTree#onNodeLinkClicked has been
changed from TreeNode to Object, so if you had override this method, 
you

need to change the parametertype.
- localization messages for validations works only in
form.component.validatorType=message format, the
component.validatorType=message format isn't working anymore (but 
this could

be change for final release - for further infos see:
https://issues.apache.org/jira/browse/WICKET-2350 )

Besides this, I found in WebApplication#getConfigurationType a FIXME
comment, so in theory the init-param's name for filter/servlet (or
context-param) should be changed from configuration to
wicket.configuration in final 1.4 release. (See:
https://issues.apache.org/jira/browse/WICKET-1317 )

//Also many old component has been genericized, a list of these 
components

would be helpful, (for example TextField, RequiredTF, and so on, if you
follow these changes in your code, it would be easier to read next 
time)


p.s: I would wrote this on wiki, but I know how bad my english is. :)

Best Regards,
Peter Major

2009-07-10 21:22 keltezéssel, Igor Vaynberg írta:

We would like to release Wicket 1.4 very soon, but in order to do so
we would like to provide our users with a good migration guide.

We have started one here:
http://cwiki.apache.org/confluence/display/WICKET/Migrate-1.4 but it
probably lacks the smaller tweaks necessary to migrate.

If you have recently migrated a project, or remember any changes you
had to perform, or have any helpful tips or hints please add them to
the migration guide. Do not worry about formatting, for now we are
looking for content.

If you do not want to bother putting them on the wiki simply add them
to this thread.

Thanks!

-igor


-
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



Creating a blog engine with templates using Wicket

2009-08-07 Thread Kent Larsson
Hi,

I've used Wordpress for some blogging, but I've never really felt
comfortable with it.

I'd like to create something myself, for my own personal use to begin
with (but there is no reason for me not to make it free (as in
speech). Some thoughts:

- Plugins could be created using Wicket
- I need some way for users to create templates. Now that I think
about it maybe the template system could simply be normal HTML-pages
with Wicket markup?

I'm simply looking for some feedback. Does it sound like Wicket is the
tool to go with? (For me it does.) Do you have any suggestions on
things to think about from the beginning when creating something like
this? Is there something like this already?

To start with I'll create something for me. But it's always good to
get some input and maybe it'll help me turn the project in the right
direction from the beginning.

Best regards, Kent

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



Re: DataView/IDataProvider/Detach

2009-08-07 Thread Gabi Kaltman
Hi Robin,

If I understood correctly, your question is: why nullifying in detach()
a transient field? The only answer I see is related to your
observation: memory footprint and serialization are 2 different
aspects. So, when one implements an IDataProvider , one should deal
with both aspects without making assumptions about the framework. Maybe
the framework decides to keep in memory the IDataProvider for a time t
and only then, to serialize it and store it. This means that for the
time t, your (possible large) object will stay in memory.



I'm not sure that my explanation is ok, but I do not have a better one. :)



About performance, some other posts suggest that the transient object should be 
cached, so, it can be retrieved fast.



Regards,

kaltman

--- On Fri, 8/7/09, Robin Sander robin.san...@gmx.net wrote:

From: Robin Sander robin.san...@gmx.net
Subject: Re: DataView/IDataProvider/Detach
To: users@wicket.apache.org
Date: Friday, August 7, 2009, 11:42 AM


Hi,

correct me if I'm wrong, Igor, but I thought detach() is used to keep the model 
memory footprint low
*between requests* and Serialization is a total different story.
If I mark a field as transient I don't have to nullify it in detach().
For example using a IDataProvider for pagination:
If I set a (transient) field to null after every request I have to initialize 
it before every request too,
sounds inefficient to me. To re-initialize a transient field I would use 
readObject(ObjectInputStream in)
instead.
If I'm right the following comment in IDetachable is misleading:

    /**
 * Detaches model after use. This is generally used to null out transient 
references that can be
 * re-attached later.
 */
    void detach();

What am I missing?

Robin.



On 06.08.2009, at 21:45, Igor Vaynberg wrote:

 yep, lazy init is the way to do things. also helps to mark those
 fields as transient as an additional safeguard.
 
 -igor
 
 On Thu, Aug 6, 2009 at 12:22 AM, Gabi Kaltmangkalt...@yahoo.com wrote:
 Hi,
 
 I'm very young on the Wicket planet, so please excuse my simple question 
 related to DataView/IDataProvider
 
 My configuration:
 1. I use a DataView (MyDataView)
 2. I added a PageNavigator to MyDataView
 3. I defined a IDataProvider attached to  MyDataView (MyDataProvider)
 4. MyDataProvider has a not-serializable field (MyField)
 5. MyField is used in the method MyDataProvider.size()
 6. I use Wicket 1.4.0
 
 What I do:
 1.  In the method MyDataProvider.detach() , I nullify MyField (MyField = 
 null)
 
 What happens:
 1. When I navigate through pages, I get a NPE in MyDataProvider.size() as 
 MyField became null
 
 How I fixed it:
 1. I overrode in MyDataView the method getDataProvider(). Didn't work. I 
 noticed that this method is never invoked
 2. I tested again null in MyDataProvider.size(). If MyField is null, I just 
 reinitialize it. It works
 
 My question is if this solution is the optimal one, or there is a better one?
 
 Thanks,
 kaltman
 
 
 
 
 
 -
 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: Creating a blog engine with templates using Wicket

2009-08-07 Thread Martijn Dashorst
Take a look at brix cms components, and possibly elephas for inspiration...

Martijn

On Fri, Aug 7, 2009 at 2:47 PM, Kent Larssonkent.lars...@gmail.com wrote:
 Hi,

 I've used Wordpress for some blogging, but I've never really felt
 comfortable with it.

 I'd like to create something myself, for my own personal use to begin
 with (but there is no reason for me not to make it free (as in
 speech). Some thoughts:

 - Plugins could be created using Wicket
 - I need some way for users to create templates. Now that I think
 about it maybe the template system could simply be normal HTML-pages
 with Wicket markup?

 I'm simply looking for some feedback. Does it sound like Wicket is the
 tool to go with? (For me it does.) Do you have any suggestions on
 things to think about from the beginning when creating something like
 this? Is there something like this already?

 To start with I'll create something for me. But it's always good to
 get some input and maybe it'll help me turn the project in the right
 direction from the beginning.

 Best regards, Kent

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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: Creating a blog engine with templates using Wicket

2009-08-07 Thread Andrew Lombardi
Take a look at the Brix CMS.  All built in Wicket, might be just what  
the doctor ordered.


On Aug 7, 2009, at 5:47 AM, Kent Larsson wrote:


Hi,

I've used Wordpress for some blogging, but I've never really felt
comfortable with it.

I'd like to create something myself, for my own personal use to begin
with (but there is no reason for me not to make it free (as in
speech). Some thoughts:

- Plugins could be created using Wicket
- I need some way for users to create templates. Now that I think
about it maybe the template system could simply be normal HTML-pages
with Wicket markup?

I'm simply looking for some feedback. Does it sound like Wicket is the
tool to go with? (For me it does.) Do you have any suggestions on
things to think about from the beginning when creating something like
this? Is there something like this already?

To start with I'll create something for me. But it's always good to
get some input and maybe it'll help me turn the project in the right
direction from the beginning.

Best regards, Kent

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




To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,  
directly or indirectly, use,
 disclose, distribute, print, or copy any part of this message if you  
are not the intended recipient.





Re: WicketByExample.com - Soft launch and we need editors

2009-08-07 Thread David Brown
I have been back to the site with the target in mind to look for the 
wicketbyexample wish-list. But, the cupboard was bare. Any plans?



- Original Message -
From: Andrew Lombardi and...@mysticcoders.com
To: users@wicket.apache.org
Sent: Friday, August 7, 2009 1:08:50 AM GMT -06:00 US/Canada Central
Subject: Re: WicketByExample.com - Soft launch and we need editors

Quick note, those of you that have submitted an example via the form,  
or requested to become an editor via the form, there was some error  
with the plugin doing the contacting ... which has been fixed.

feel free to re-submit at your leisure.

cheers!

On Aug 4, 2009, at 8:02 PM, Andrew Lombardi wrote:

 /me goes out to the store to buy some Wicket dog food.

 On Aug 4, 2009, at 7:36 PM, Igor Vaynberg wrote:

 i look forward to a version powered by wicket. traitors! :)

 -igor

 On Tue, Aug 4, 2009 at 7:14 PM, Jeremy
 Thomersonjer...@wickettraining.com wrote:
 Nice site.  I look forward to looking at it some more.

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




 On Tue, Aug 4, 2009 at 2:51 PM, Andrew Lombardiand...@mysticcoders.com 
  wrote:
 I don't know about you guys, but I learn best by examples, a lot  
 of them.
 So the team at Mystic decided to put together a really simple,  
 easy to
 navigate, no nonsense examples site ... and start filling it with  
 relevant
 Wicket code examples for doing common things like:

   * How to use a FeedbackPanel with AJAX
   * Getting Started Guide
   * How to use AutoCompleteTextField
   * Putting Javascript or CSS into the header using a Resource
   * Using a Visitor to add multiple form components to an  
 AjaxTarget
   * Working with Wicket and Spring
   * and on and on...

 In all we have about 15 examples so far, and it's growing daily.   
 We would
 love you to at least drop by, and contribute with your tips and  
 tricks and
 examples of usage that might not have been covered, or was very  
 hard to find
 when you were looking for it.

 happy monday!  and develop happy!


 To our success!

 Mystic Coders, LLC | Code Magic | www.mysticcoders.com

 ANDREW LOMBARDI | and...@mysticcoders.com
 2321 E 4th St. Ste C-128, Santa Ana CA 92705
 ofc: 949-528-6480
 fax: 714-782-6024
 cell: 714-697-8046
 linked-in: http://www.linkedin.com/in/andrewlombardi
 twitter: http://www.twitter.com/kinabalu

 Eco-Tip: Printing e-mails is usually a waste.

 
 This message is for the named person's use only. You must not,  
 directly or
 indirectly, use,
 disclose, distribute, print, or copy any part of this message if  
 you are
 not the intended recipient.
 



 -
 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 our success!

 Mystic Coders, LLC | Code Magic | www.mysticcoders.com

 ANDREW LOMBARDI | and...@mysticcoders.com
 2321 E 4th St. Ste C-128, Santa Ana CA 92705
 ofc: 949-528-6480
 fax: 714-782-6024
 cell: 714-697-8046
 linked-in: http://www.linkedin.com/in/andrewlombardi
 twitter: http://www.twitter.com/kinabalu

 Eco-Tip: Printing e-mails is usually a waste.

 
 This message is for the named person's use only. You must not,  
 directly or indirectly, use,
 disclose, distribute, print, or copy any part of this message if you  
 are not the intended recipient.
 



To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,  
directly or indirectly, use,
  disclose, distribute, print, or copy any part of this message if you  
are not the intended recipient.



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



Re: wicket 1.2.7 to 1.4-rc5 Error

2009-08-07 Thread Gerald Fernando
Hi Jens,Martin,Greven

i have successfully run my first application  in wicket 1.4 .
Thanks for your kind co-operations.
Finally i included the jar files mentioned by Jens i got my first
Application.

i need some examples to improve my wicket knowledge,so if anyone has, please
give some modal code.

ThanksRegards,
Gerald Anto Fernando

2009/8/7 Greven, Jens jgre...@pma.de

 Hi Gerald,


 Have a look at http://logging.apache.org/log4j/1.2/download.html and
 http://www.slf4j.org/download.html.


 Rgds
 Jens


 -Original Message-
 From: Gerald Fernando [mailto:gerald.anto.ferna...@gmail.com]
 Sent: Friday, August 07, 2009 1:12 PM
 To: users@wicket.apache.org
 Subject: Re: wicket 1.2.7 to 1.4-rc5 Error

 I am not using Maven.
 am just using only the apache tomcat.
 so according to you i have to get the following files in Google

 slf4j-api-1.5.8.jar
 slf4j-log4j12-1.5.8.jar
 log4j-1.2.14.jar


 am i correct??
 shall i down load it from google??
 ThanksRegards,
 Gerald A

 2009/8/7 Martin Makundi martin.maku...@koodaripalvelut.com

  Are you using Maven?
 
  That's the easiest solution. Otherwise you can try to google jar
 finder.
 
  **
  Maritn
 
  2009/8/7 Gerald Fernando gerald.anto.ferna...@gmail.com:
Hi Jens,
   how to get these jar files and where to include it?
   please give me urgent solution
  
   ThanksRegards,
   Gerald A
  
   2009/8/7 Greven, Jens jgre...@pma.de
  
   Gerald,
  
  
   You need to include slf4j.jar. As far as I understand it, slf4jar is
  only a
   wrapper for a logging framework of your choice, let's assume you use
  log4j
   for logging, you would also have to include slf4-log4j12.jar.
  
   I use the follwing:
   slf4j-api-1.5.8.jar
   slf4j-log4j12-1.5.8.jar
   log4j-1.2.14.jar
  
  
   Hope this helps,
   Jens
  
   -Ursprüngliche Nachricht-
   Von: Gerald Fernando [mailto:gerald.anto.ferna...@gmail.com]
   Gesendet: Freitag, 7. August 2009 11:17
   An: users@wicket.apache.org
   Betreff: wicket 1.2.7 to 1.4-rc5 Error
  
   Hello Friends,
   previously i used wicket 1.2.7 jar wicket extension 1.2.7 jar and
   servlet-api-2.5-6.0.1.jar
   my wicket page is worked well.
   now i have changed wicket 1.4-rc5. jar wicket extension 1.4-rc5. jar
 and
   servlet-api-2.5-6.0.1.jar
my web.xml written like this
  
   ?xml version=1.0 encoding=UTF-8?
   web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns=
   http://java.sun.com/xml/ns/javaee; xmlns:web=
   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
 xsi:schemaLocation=
   http://java.sun.com/xml/ns/javaee
   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID
   version=2.5
display-nameWicket Examples/display-name
welcome-file-list
welcome-filetest.html/welcome-file
/welcome-file-list
  
 servlet
servlet-nameHelloWorldApplication/servlet-name
  
  
 
  servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
  
init-param
  param-nameapplicationClassName/param-name
  param-valuehelloworld.HelloWorldApplication/param-value
/init-param
/servlet
servlet-mapping
servlet-nameHelloWorldApplication/servlet-name
url-pattern/helloworld/*/url-pattern
/servlet-mapping
  
   /web-app
  
  
  
   When i run this page it shows the error
  
   javax.servlet.ServletException: Error instantiating servlet class
   org.apache.wicket.protocol.http.WicketServlet
   java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory.
  
   How can i solve it.
   please give me solution to solve this problem
  
   is there any .jar files i need to include?
   or
   i need to change my web.xml file???
  
  
  
   --
   Thanksregards,
   Gerald A
  
   Jens Greven
   Team EDV
  
   Telefon: 0251-70017-339
   Telefax: 0251-70017-203
   E-Mail: jgre...@pma.de
  
   [pma: ] Finanz-Service GmbH
   Ein Unternehmen von Pramerica Financial
   Münsterstr. 111
   48155 Münster
   http://www.pma.de
  
   Geschäftsführung: Jörg Matheis, Lambert Stegemann
   Handelsregister: Amtsgericht Münster HRB 4256Diese Information ist
   ausschließlich für die adressierte Person oder Organisation bestimmt
 und
   könnte vertrauliches Material enthalten. Sollten Sie diese Nachricht
   irrtümlich erhalten haben, bitten wir Sie, sich mit dem Absender in
   Verbindung zu setzen und das Material von Ihrem Computer zu löschen.
 Das
   unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist
 nicht
   gestattet.
  
   Wir weisen darauf hin, dass E-Mail-Nachrichten mit und ohne Zutun von
   Dritten verloren gehen, verändert oder verfälscht werden können.
   Herkömmliche E-Mails sind nicht gegen den Zugriff von Dritten
 geschützt
  und
   deshalb ist auch die Vertraulichkeit unter Umständen nicht gewahrt.
 Wir
   haften deshalb nicht für die Unversehrtheit von E-Mails nachdem sie
  unseren
   Herrschaftsbereich verlassen haben und können Ihnen hieraus
 entstehende
   Schäden nicht ersetzen. Sollten trotz der von uns verwendeten
   Virus-Schutz-Programme durch 

Re: WicketByExample.com - Soft launch and we need editors

2009-08-07 Thread Andrew Lombardi
Would be more than happy to start a wish-list page!  You want to start  
with your list and we can check 'em off?


On Aug 7, 2009, at 6:23 AM, David Brown wrote:

I have been back to the site with the target in mind to look for the  
wicketbyexample wish-list. But, the cupboard was bare. Any plans?




- Original Message -
From: Andrew Lombardi and...@mysticcoders.com
To: users@wicket.apache.org
Sent: Friday, August 7, 2009 1:08:50 AM GMT -06:00 US/Canada Central
Subject: Re: WicketByExample.com - Soft launch and we need editors

Quick note, those of you that have submitted an example via the form,
or requested to become an editor via the form, there was some error
with the plugin doing the contacting ... which has been fixed.

feel free to re-submit at your leisure.

cheers!

On Aug 4, 2009, at 8:02 PM, Andrew Lombardi wrote:


/me goes out to the store to buy some Wicket dog food.

On Aug 4, 2009, at 7:36 PM, Igor Vaynberg wrote:


i look forward to a version powered by wicket. traitors! :)

-igor

On Tue, Aug 4, 2009 at 7:14 PM, Jeremy
Thomersonjer...@wickettraining.com wrote:

Nice site.  I look forward to looking at it some more.

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




On Tue, Aug 4, 2009 at 2:51 PM, Andrew Lombardiand...@mysticcoders.com

wrote:
I don't know about you guys, but I learn best by examples, a lot
of them.
So the team at Mystic decided to put together a really simple,
easy to
navigate, no nonsense examples site ... and start filling it with
relevant
Wicket code examples for doing common things like:

 * How to use a FeedbackPanel with AJAX
 * Getting Started Guide
 * How to use AutoCompleteTextField
 * Putting Javascript or CSS into the header using a Resource
 * Using a Visitor to add multiple form components to an
AjaxTarget
 * Working with Wicket and Spring
 * and on and on...

In all we have about 15 examples so far, and it's growing daily.
We would
love you to at least drop by, and contribute with your tips and
tricks and
examples of usage that might not have been covered, or was very
hard to find
when you were looking for it.

happy monday!  and develop happy!


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,
directly or
indirectly, use,
disclose, distribute, print, or copy any part of this message if
you are
not the intended recipient.





-
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 our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,
directly or indirectly, use,
disclose, distribute, print, or copy any part of this message if you
are not the intended recipient.





To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not,
directly or indirectly, use,
 disclose, distribute, print, or copy any part of this message if you
are not the intended recipient.



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




To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 949-528-6480
fax: 714-782-6024
cell: 714-697-8046
linked-in: 

Re: DataView/IDataProvider/Detach

2009-08-07 Thread Igor Vaynberg
detach() is used to detach any state at the end of request. this can
include memory related, serialization related tasks, whatever other
tasks the component needs.

if you mark the field as transient, then indeed you do not have to
null it out in ondetach - at least not for serialization reasons, but
you still have to keep the lazy load logic for that field because if
the component is loaded from storage the field will again be null.

-igor

On Fri, Aug 7, 2009 at 2:42 AM, Robin Sanderrobin.san...@gmx.net wrote:

 Hi,

 correct me if I'm wrong, Igor, but I thought detach() is used to keep the
 model memory footprint low
 *between requests* and Serialization is a total different story.
 If I mark a field as transient I don't have to nullify it in detach().
 For example using a IDataProvider for pagination:
 If I set a (transient) field to null after every request I have to
 initialize it before every request too,
 sounds inefficient to me. To re-initialize a transient field I would use
 readObject(ObjectInputStream in)
 instead.
 If I'm right the following comment in IDetachable is misleading:

        /**
         * Detaches model after use. This is generally used to null out
 transient references that can be
         * re-attached later.
         */
        void detach();

 What am I missing?

 Robin.



 On 06.08.2009, at 21:45, Igor Vaynberg wrote:

 yep, lazy init is the way to do things. also helps to mark those
 fields as transient as an additional safeguard.

 -igor

 On Thu, Aug 6, 2009 at 12:22 AM, Gabi Kaltmangkalt...@yahoo.com wrote:

 Hi,

 I'm very young on the Wicket planet, so please excuse my simple question
 related to DataView/IDataProvider

 My configuration:
 1. I use a DataView (MyDataView)
 2. I added a PageNavigator to MyDataView
 3. I defined a IDataProvider attached to  MyDataView (MyDataProvider)
 4. MyDataProvider has a not-serializable field (MyField)
 5. MyField is used in the method MyDataProvider.size()
 6. I use Wicket 1.4.0

 What I do:
 1.  In the method MyDataProvider.detach() , I nullify MyField (MyField =
 null)

 What happens:
 1. When I navigate through pages, I get a NPE in MyDataProvider.size() as
 MyField became null

 How I fixed it:
 1. I overrode in MyDataView the method getDataProvider(). Didn't work. I
 noticed that this method is never invoked
 2. I tested again null in MyDataProvider.size(). If MyField is null, I
 just reinitialize it. It works

 My question is if this solution is the optimal one, or there is a better
 one?

 Thanks,
 kaltman





 -
 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: Problem with Palette

2009-08-07 Thread Elad Katz


egolan74 wrote:
 
 I guess you've checked that selectedEvents is not empty?
 
yes, they both have stuff in them


egolan74 wrote:
 
 If it's not, I think you should check your model representing the choices.
 
What do you mean check?


egolan74 wrote:
 
 BTW,
 AFAIK, the selected choices should be a subset of the 'all available'.
 Please corect me if i'm wrong.
 
That's what I understood from reading the forums, and that is how it's done
in my implementation - but it still doesn't work
any other ideas?
anyone?
-- 
View this message in context: 
http://www.nabble.com/Problem-with-Palette-tp24834525p24866473.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: can not close the modal window any more.

2009-08-07 Thread Jing Ge (Besitec IT DEHAM)
Hello,

Has anyone any solution?

Best regards!
Jing

 
-Original Message-
From: Jing Ge (Besitec IT DEHAM) [mailto:j...@besitec.com] 
Sent: Donnerstag, 6. August 2009 16:53
To: users@wicket.apache.org
Subject: can not close the modal window any more.

Hello all,

Maybe this is a known problem...

when user opens a modal window and the web browser's screen is smaller
than the modal window, than he get the problem: the modal window's head
and foot will be cut off. After the user maximizes his browser, the
head of the modal window is still out of the screen. The result: user
can not close the modal window any more.

I have googled and found a workaround here (maybe work, I have not
tested it):

http://steve-on-sakai.blogspot.com/2009/05/repositioning-modalwindow-in-
wicket.html

My question is:

Could we do it in this way: before the modal window is opened, use
javascript checking the browser screen and set the right position to the
modal window. The Head, i.e. title with the X and right edge, should
be NEVER out of screen.

Do I miss some feature of wicket modal window? Any help will be
appreciated. :-)

Best Regards!
Jing


-
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



LoadableDetachableModel/Serialization Problem

2009-08-07 Thread Mostafa Mohamed
we're working on wicket/spring/hibernate application (a research
repository).

my SortableDataProvider looks like this.

public class PublicationDataProvider extends SortableDataProvider {
private IBrowseService browseService;
private Class? type;

public PublicationDataProvider() {};

public PublicationDataProvider(IBrowseService browseService, Class?
type) {
this.browseService = browseService;
this.type = type;
setSort(title, true);
}

 public IteratorIPublication iterator(int first, int count)
 {
 SortParam sp = getSort();
 return browseService.find(first, count, sp.getProperty(),
sp.isAscending(), type).iterator();
 }

 public int size()
 {
 return browseService.countAll();
 }

 public IModel model(Object object)
 {
 return new DomainObjectModelIPublication((IPublication)object);
 }

 public void detach() {}
}

I use it with a dataview on the following panel

package main.java.web.components.browser;

import main.java.domain.publication.IPublication;
import main.java.domain.user.IUser;
import main.java.services.publication.IBrowseService;
import main.java.web.components.content.BasicPanel;

import org.apache.wicket.ajax.AjaxRequestTarget;
import
org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
import
org.apache.wicket.extensions.ajax.markup.html.repeater.data.sort.AjaxFallbackOrderByLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.spring.injection.annot.SpringBean;

public class BrowsePanel extends BasicPanel {
@SpringBean
IBrowseService browseService;

transient IPublication publication;

public BrowsePanel(Class? type) {
super(block, Browse Publications);
setOutputMarkupId(true);

final WebMarkupContainer dataContainer = new
WebMarkupContainer(dataContainer);
dataContainer.setOutputMarkupId(true);
add(dataContainer);

PublicationDataProvider pdp = new
PublicationDataProvider(browseService, type);
final DataView dataView = new DataView(publication, pdp, 10) {
@Override
protected void populateItem(Item item) {
publication = (IPublication) item.getModelObject();
item.add(new Label(number,  + (getCurrentPage() * 10 +
item.getIndex() + 1)));
item.add(new Label(title, publication.getTitle()));

IModel authorsModel = new LoadableDetachableModel() {
@Override
protected Object load() {
return publication.getAuthorsInOrder();
}
};

ListView authorsListView = new ListView(author,
authorsModel) {
@Override
protected void populateItem(ListItem item) {
Object author = item.getModelObject();
Link authorLink = new Link(authorLink) {
@Override
public void onClick() {

}
};
if (author instanceof IUser) {
authorLink.add(new Label(authorName, ((IUser)
author).getFullName()));
}
else {
authorLink.add(new Label(authorName,
author.toString()));
authorLink.setEnabled(false);
}
item.add(authorLink);
}
};
item.add(authorsListView);
item.add(new Label(abstract,
publication.getAbstractText()));
}
};

dataContainer.add(new AjaxFallbackOrderByLink(orderByTitle,
title, pdp) {
@Override
protected void onSortChanged() {
dataView.setCurrentPage(0);
}

@Override
protected void onAjaxClick(AjaxRequestTarget target) {
target.addComponent(dataContainer);
}
});

dataContainer.add(dataView);

AjaxPagingNavigator pager = new AjaxPagingNavigator(pager,
dataView) {
@Override
protected void onAjaxEvent(AjaxRequestTarget target) {
target.addComponent(dataContainer);
}
};

dataContainer.add(pager);
}
}

when the publication instance variable wasn't transient i would get a wicket
not serializable exception on this field. 

Re: LoadableDetachableModel/Serialization Problem

2009-08-07 Thread Igor Vaynberg
you have to chain your models, so instead of

 item.add(new Label(title, publication.getTitle()));

do

item.add(new Label(title, new PropertyModel(item.getModel(), title));

instead of

 IModel authorsModel = new LoadableDetachableModel() {
   @Override
   protected Object load() {
   return publication.getAuthorsInOrder();
   }
   };

do

authorsModel=new PropertyModel(item.getModel(), authorsInOrder);

that way you never have to hold a reference to the domain object
itself, only a model to it.

-igor


On Fri, Aug 7, 2009 at 10:03 AM, Mostafa Mohamedes.most...@gmail.com wrote:
 we're working on wicket/spring/hibernate application (a research
 repository).

 my SortableDataProvider looks like this.

 public class PublicationDataProvider extends SortableDataProvider {
    private IBrowseService browseService;
    private Class? type;

    public PublicationDataProvider() {};

    public PublicationDataProvider(IBrowseService browseService, Class?
 type) {
        this.browseService = browseService;
        this.type = type;
        setSort(title, true);
    }

     public IteratorIPublication iterator(int first, int count)
     {
         SortParam sp = getSort();
         return browseService.find(first, count, sp.getProperty(),
 sp.isAscending(), type).iterator();
     }

     public int size()
     {
         return browseService.countAll();
     }

     public IModel model(Object object)
     {
         return new DomainObjectModelIPublication((IPublication)object);
     }

     public void detach() {}
 }

 I use it with a dataview on the following panel

 package main.java.web.components.browser;

 import main.java.domain.publication.IPublication;
 import main.java.domain.user.IUser;
 import main.java.services.publication.IBrowseService;
 import main.java.web.components.content.BasicPanel;

 import org.apache.wicket.ajax.AjaxRequestTarget;
 import
 org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
 import
 org.apache.wicket.extensions.ajax.markup.html.repeater.data.sort.AjaxFallbackOrderByLink;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.repeater.Item;
 import org.apache.wicket.markup.repeater.data.DataView;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.LoadableDetachableModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;

 public class BrowsePanel extends BasicPanel {
   �...@springbean
    IBrowseService browseService;

    transient IPublication publication;

    public BrowsePanel(Class? type) {
        super(block, Browse Publications);
        setOutputMarkupId(true);

        final WebMarkupContainer dataContainer = new
 WebMarkupContainer(dataContainer);
        dataContainer.setOutputMarkupId(true);
        add(dataContainer);

        PublicationDataProvider pdp = new
 PublicationDataProvider(browseService, type);
        final DataView dataView = new DataView(publication, pdp, 10) {
           �...@override
            protected void populateItem(Item item) {
                publication = (IPublication) item.getModelObject();
                item.add(new Label(number,  + (getCurrentPage() * 10 +
 item.getIndex() + 1)));
                item.add(new Label(title, publication.getTitle()));

                IModel authorsModel = new LoadableDetachableModel() {
                   �...@override
                    protected Object load() {
                        return publication.getAuthorsInOrder();
                    }
                };

                ListView authorsListView = new ListView(author,
 authorsModel) {
                   �...@override
                    protected void populateItem(ListItem item) {
                        Object author = item.getModelObject();
                        Link authorLink = new Link(authorLink) {
                           �...@override
                            public void onClick() {

                            }
                        };
                        if (author instanceof IUser) {
                            authorLink.add(new Label(authorName, ((IUser)
 author).getFullName()));
                        }
                        else {
                            authorLink.add(new Label(authorName,
 author.toString()));
                            authorLink.setEnabled(false);
                        }
                        item.add(authorLink);
                    }
                };
                item.add(authorsListView);
                item.add(new Label(abstract,
 publication.getAbstractText()));
            }
        };

        dataContainer.add(new AjaxFallbackOrderByLink(orderByTitle,
 title, pdp) {
           

Re: Handle file uploads in Behavior and respond using AjaxRequestTarget

2009-08-07 Thread Igor Vaynberg
tada, all done in trunk

-igor

On Wed, Aug 5, 2009 at 8:23 PM, Igor Vaynbergigor.vaynb...@gmail.com wrote:
 yes, the form action is rewritten to the behavior url. the behavior
 url processes the form the same way it does when an ajax request is
 used, but because we do not use an ajax request the form contains its
 multipart data.

 i tested it on a small example and it works like a charm save
 javascript problems.

 -igor

 On Wed, Aug 5, 2009 at 8:16 PM, Bas Goorenb...@iswd.nl wrote:
 Interesting, it looks like you simply POST the form to the AJAX url using an
 IFRAME.

 How does it work server-side? I would expect that it does not work, since
 the form action no longer contains it's usual value, and the new form action
 points directly to an interface (IBehaviorListener).
 But I guess that since you're using Wicket.Ajax.Call.submitForm, server-side
 knows a form is being submitted.

 I got uploadify working in a componentized form. Works like a charm for now.

 Bas

 - Original Message - From: Igor Vaynberg igor.vaynb...@gmail.com
 To: users@wicket.apache.org
 Sent: Thursday, August 06, 2009 4:32 AM
 Subject: Re: Handle file uploads in Behavior and respond using
 AjaxRequestTarget


 On Wed, Aug 5, 2009 at 4:10 PM, Bas Goorenb...@iswd.nl wrote:

 One of the working components I built using IFRAMEs is actually not that
 complex (400 LOC),

 i just wrote something that is about 30 lines of javascript that does
 this. only works in firefox so far. see WICKET-2420.

 -igor

 -
 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: Handle file uploads in Behavior and respond using AjaxRequestTarget

2009-08-07 Thread Bas Gooren

Great! Will take a look at it soon.

This is what I love about Wicket most: very active development (constant 
flow of improvement).


Thanks Igor.

Bas

- Original Message - 
From: Igor Vaynberg igor.vaynb...@gmail.com

To: users@wicket.apache.org
Sent: Friday, August 07, 2009 7:28 PM
Subject: Re: Handle file uploads in Behavior and respond using 
AjaxRequestTarget




tada, all done in trunk

-igor

On Wed, Aug 5, 2009 at 8:23 PM, Igor Vaynbergigor.vaynb...@gmail.com 
wrote:

yes, the form action is rewritten to the behavior url. the behavior
url processes the form the same way it does when an ajax request is
used, but because we do not use an ajax request the form contains its
multipart data.

i tested it on a small example and it works like a charm save
javascript problems.

-igor

On Wed, Aug 5, 2009 at 8:16 PM, Bas Goorenb...@iswd.nl wrote:
Interesting, it looks like you simply POST the form to the AJAX url 
using an

IFRAME.

How does it work server-side? I would expect that it does not work, 
since
the form action no longer contains it's usual value, and the new form 
action

points directly to an interface (IBehaviorListener).
But I guess that since you're using Wicket.Ajax.Call.submitForm, 
server-side

knows a form is being submitted.

I got uploadify working in a componentized form. Works like a charm for 
now.


Bas

- Original Message - From: Igor Vaynberg 
igor.vaynb...@gmail.com

To: users@wicket.apache.org
Sent: Thursday, August 06, 2009 4:32 AM
Subject: Re: Handle file uploads in Behavior and respond using
AjaxRequestTarget



On Wed, Aug 5, 2009 at 4:10 PM, Bas Goorenb...@iswd.nl wrote:

One of the working components I built using IFRAMEs is actually not 
that

complex (400 LOC),


i just wrote something that is about 30 lines of javascript that does
this. only works in firefox so far. see WICKET-2420.

-igor

-
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: LoadableDetachableModel/Serialization Problem

2009-08-07 Thread sky.walker

I actually tried that, however my publication object looks like this. (I
trimmed it to the relevant parts). as you can see there's no authorsInOrder
Property only the authors property which can't be displayed to the user. I
have to call getAuthorsInOrder() to retrieve the the list of author objects.
Right now i can't change this pojo implementation but i can try to convince
the domain model guy. What are my options if it can be changed and if it
can't? 

package main.java.domain.publication;

import java.util.*;

import main.java.domain.user.IUser;

/**
 * An abstract publication POJO implementation for the IPublication
interface.
 * 
 * @see main.java.domain.publication.IPublication
 * @author Karim El-Sayed
 */
public abstract class Publication implements IPublication {
/**
 * The unique id of this publication.
 */
private Long id;

/**
 * The names of the authors of this publication in the same ordered that
 * have been entered by the user as a codeString/code separated by
 * commas. The authors within the organization has their id entered 
while
 * external authors directly have their name.
 */
private String authors;

private SetIUser internalAuthors = new HashSetIUser();

/**
 * Default constructor.
 */
public Publication() {
}

@Override
public Long getId() {
return id;
}

@Override
public void setId(Long id) {
this.id = id;
}

@Override
public String getAuthors() {
return authors;
}

@Override
public void setAuthors(String authors) {
this.authors = authors;
}

@Override
public List getAuthorsInOrder() {
List authorsInOrder = new ArrayList();
String[] order = authors.split(#);
for (String author : order) {
long authorId = isNumber(author);
if (authorId == -1) {
authorsInOrder.add(author);
} else {
IteratorIUser iterator = 
internalAuthors.iterator();
while (iterator.hasNext()) {
IUser user = iterator.next();
if (user.getId() == authorId) {
authorsInOrder.add(user);
break;
}
}
}
}
return authorsInOrder;
}
}


igor.vaynberg wrote:
 
 instead of
 
  IModel authorsModel = new LoadableDetachableModel() {
@Override
protected Object load() {
return publication.getAuthorsInOrder();
}
};
 
 do
 
 authorsModel=new PropertyModel(item.getModel(), authorsInOrder);
 

-- 
View this message in context: 
http://www.nabble.com/LoadableDetachableModel-Serialization-Problem-tp24868498p24869176.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: LoadableDetachableModel/Serialization Problem

2009-08-07 Thread Igor Vaynberg
the propertymodel will call the getter function.

-igor

On Fri, Aug 7, 2009 at 10:44 AM, sky.walkeres.most...@gmail.com wrote:

 I actually tried that, however my publication object looks like this. (I
 trimmed it to the relevant parts). as you can see there's no authorsInOrder
 Property only the authors property which can't be displayed to the user. I
 have to call getAuthorsInOrder() to retrieve the the list of author objects.
 Right now i can't change this pojo implementation but i can try to convince
 the domain model guy. What are my options if it can be changed and if it
 can't?

 package main.java.domain.publication;

 import java.util.*;

 import main.java.domain.user.IUser;

 /**
  * An abstract publication POJO implementation for the IPublication
 interface.
  *
  * @see main.java.domain.publication.IPublication
  * @author Karim El-Sayed
  */
 public abstract class Publication implements IPublication {
        /**
         * The unique id of this publication.
         */
        private Long id;

        /**
         * The names of the authors of this publication in the same ordered 
 that
         * have been entered by the user as a codeString/code separated by
         * commas. The authors within the organization has their id entered 
 while
         * external authors directly have their name.
         */
        private String authors;

        private SetIUser internalAuthors = new HashSetIUser();

        /**
         * Default constructor.
         */
        public Publication() {
        }

       �...@override
        public Long getId() {
                return id;
        }

       �...@override
        public void setId(Long id) {
                this.id = id;
        }

       �...@override
        public String getAuthors() {
                return authors;
        }

       �...@override
        public void setAuthors(String authors) {
                this.authors = authors;
        }

       �...@override
        public List getAuthorsInOrder() {
                List authorsInOrder = new ArrayList();
                String[] order = authors.split(#);
                for (String author : order) {
                        long authorId = isNumber(author);
                        if (authorId == -1) {
                                authorsInOrder.add(author);
                        } else {
                                IteratorIUser iterator = 
 internalAuthors.iterator();
                                while (iterator.hasNext()) {
                                        IUser user = iterator.next();
                                        if (user.getId() == authorId) {
                                                authorsInOrder.add(user);
                                                break;
                                        }
                                }
                        }
                }
                return authorsInOrder;
        }
 }


 igor.vaynberg wrote:

 instead of

  IModel authorsModel = new LoadableDetachableModel() {
                   �...@override
                    protected Object load() {
                        return publication.getAuthorsInOrder();
                    }
                };

 do

 authorsModel=new PropertyModel(item.getModel(), authorsInOrder);


 --
 View this message in context: 
 http://www.nabble.com/LoadableDetachableModel-Serialization-Problem-tp24868498p24869176.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



DatePicker from wicket-datetime working sample ?

2009-08-07 Thread Arun Gupta
I've searched the users list and Googled otherwise but can't find a
working sample of DatePicker from wicket-datetime.

Is there a handy one ?

-Arun

-- 
Need Application Server ? - Download glassfish.org
Blog: http://blogs.sun.com/arungupta

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



Re: DatePicker from wicket-datetime working sample ?

2009-08-07 Thread Igor Vaynberg
http://wicketstuff.org/wicket/dates/

-igor

On Fri, Aug 7, 2009 at 10:57 AM, Arun Guptaarun.gu...@gmail.com wrote:
 I've searched the users list and Googled otherwise but can't find a
 working sample of DatePicker from wicket-datetime.

 Is there a handy one ?

 -Arun

 --
 Need Application Server ? - Download glassfish.org
 Blog: http://blogs.sun.com/arungupta

 -
 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: LoadableDetachableModel/Serialization Problem

2009-08-07 Thread sky.walker

Thanks igor. i just tried it and it worked. It's so cool property models work
like that.


igor.vaynberg wrote:
 
 the propertymodel will call the getter function.
 
 -igor
 
 On Fri, Aug 7, 2009 at 10:44 AM, sky.walkeres.most...@gmail.com wrote:

 I actually tried that, however my publication object looks like this. (I
 trimmed it to the relevant parts). as you can see there's no
 authorsInOrder
 Property only the authors property which can't be displayed to the user.
 I
 have to call getAuthorsInOrder() to retrieve the the list of author
 objects.
 Right now i can't change this pojo implementation but i can try to
 convince
 the domain model guy. What are my options if it can be changed and if it
 can't?

 package main.java.domain.publication;

 import java.util.*;

 import main.java.domain.user.IUser;

 /**
  * An abstract publication POJO implementation for the IPublication
 interface.
  *
  * @see main.java.domain.publication.IPublication
  * @author Karim El-Sayed
  */
 public abstract class Publication implements IPublication {
        /**
         * The unique id of this publication.
         */
        private Long id;

        /**
         * The names of the authors of this publication in the same
 ordered that
         * have been entered by the user as a codeString/code
 separated by
         * commas. The authors within the organization has their id
 entered while
         * external authors directly have their name.
         */
        private String authors;

        private SetIUser internalAuthors = new HashSetIUser();

        /**
         * Default constructor.
         */
        public Publication() {
        }

       �...@override
        public Long getId() {
                return id;
        }

       �...@override
        public void setId(Long id) {
                this.id = id;
        }

       �...@override
        public String getAuthors() {
                return authors;
        }

       �...@override
        public void setAuthors(String authors) {
                this.authors = authors;
        }

       �...@override
        public List getAuthorsInOrder() {
                List authorsInOrder = new ArrayList();
                String[] order = authors.split(#);
                for (String author : order) {
                        long authorId = isNumber(author);
                        if (authorId == -1) {
                                authorsInOrder.add(author);
                        } else {
                                IteratorIUser iterator =
 internalAuthors.iterator();
                                while (iterator.hasNext()) {
                                        IUser user = iterator.next();
                                        if (user.getId() == authorId) {
                                                authorsInOrder.add(user);
                                                break;
                                        }
                                }
                        }
                }
                return authorsInOrder;
        }
 }


 igor.vaynberg wrote:

 instead of

  IModel authorsModel = new LoadableDetachableModel() {
                   �...@override
                    protected Object load() {
                        return publication.getAuthorsInOrder();
                    }
                };

 do

 authorsModel=new PropertyModel(item.getModel(), authorsInOrder);


 --
 View this message in context:
 http://www.nabble.com/LoadableDetachableModel-Serialization-Problem-tp24868498p24869176.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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/LoadableDetachableModel-Serialization-Problem-tp24868498p24869434.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: wicket 1.2.7 login error checking and reporting

2009-08-07 Thread Burton, Tom F (DOR)
I found wicketSessionFilter but not wicketFilter.  How would using
A regular submit button make a difference. I know submit request goes to the 
server  I just get an empty pair of ajaxresponse tags back from the server. 
(Firebug is really usefull, and I'm able to look at the post request I send 
thanks to TamperData).

Thanks Again,
Tom

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Thursday, August 06, 2009 11:57 AM
To: users@wicket.apache.org
Subject: Re: wicket 1.2.7 login error checking and reporting

set a breakpoint in wicketfilter and see what its doing. does it work
properly when using a regular submit button?

-igor

On Thu, Aug 6, 2009 at 12:49 PM, Burton, Tom F
(DOR)tom.bur...@alaska.gov wrote:
 Hello,

            I realize 1.2.7 is no longer officially supported.
 However, I'm hoping someone will help me anyway. Here goes nothing..




            I have a login page that is supposed to make sure a username
 and password were actually entered before validating against the auth
 source.

 If the name and/or password aren't entered it's supposed to spit out an
 error message to the user.  It works when a password is entered but no
 username.

 If I enter a username and no password, or don't enter anything at all,
 nothing seems to happen. The spinning indicator next to the
 IndicatingAjaxSubmitButton

 goes by so fast I can't see it, if it goes by at all. My error log
 statements that tell me where its at in the execution don't seem to
 write out either.  I've tested this

 in both Firefox and IE. I also tested by entering a password in the form
 and then using the Tamper Data extension for Firefox to remove the
 password.  Still no joy.

 It seems that it's somewhere in the server side code that's terminating
 the request early but for the life of me I can't figure out where.



 Thanks for any help/assistance in this matter,

 Tom Burton








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



How to use DynamicWebResource?

2009-08-07 Thread Major Péter

Hi all,

I have a page, and I need to generate a PDF file: after the user presses 
a button, then the downloading is being started.
For the PDF-generation I would like to use iText, but I have no idea, 
how to create a link to the downloadable content.
I tried to follow UploadDownload wiki page, but got lost by spring 
beans. So far I created a DynamicWebResource subclass:


public class PdfFileResource extends DynamicWebResource {

@Override
protected ResourceState getResourceState() {
return new PdfFileResourceState();
}

class PdfFileResourceState extends ResourceState {

@Override
public String getContentType() {
return application/pdf;
}

@Override
public byte[] getData() {
throw new UnsupportedOperationException(Not supported yet.);
}
}
}

I guess in the PdfFileResource's constructor I need to set the data for 
ResourceState, am I right?


The wiki sais also, that in Application#init I need to add the new 
SharedResource, so I did that too.


but after that how to use it?

I guessing the follows:
In the Button#onSubmit I should create first the outputstream 
(bytearrayoutputstream) for the pdf, after that I should create a new 
pdfFileResource with the outputstream.


- But after that, how do I get URL for the newly created resource and 
how do I redirect to it?
- While creating the URL for the resource, does it matters which 
urlcodingstrategy am I using? (I'm currently using BPRTUCS).
- what does the mountSharedResource do at all? (Is it for only static 
resources?)


Any help would be appreciated.

//I looked the archives first, but am still confused, please help

Best Regards,
Peter

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



Re: FeedbackIndicator doesn't work inside RefreshingView

2009-08-07 Thread konsul

I've implemented equals() and hashCode() then found and fix other problem.
And it works. Thanks a lot. 

There was the problem because I just use the code construction from example
(repeater/FormPage.java):
@Override
protected IModelContact model(Contact 
object)
{
return new 
CompoundPropertyModelContact(
new 
DetachableContactModel(object));
}
 
and the compoundproperymodel must override equals() and hashCode() in this
example instead of DetachableContactModel. I've just removed
compoundproperymodel from my code and it works.



igor.vaynberg wrote:
 
 On Tue, Aug 4, 2009 at 12:30 PM, konsula.komra...@gmail.com wrote:

 I call this method:
 refreshingView.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance());
 
 did you also read the javadoc and implement hashcode and equals in the
 models you are using to feed items of the refreshing view?
 

 but FeedbackIndicator still doesn't work.

 Frankly speaking I do not see any relationship between
 FormComponentFeedbackIndicator and Model reuse strategy. I thought the
 matter is in Feedback messages handling procedure.
 
 the problem is that at the beginning of each request refreshingview
 will recreate all the items - which includes recreating the
 textfields. since errors are attached to the component instance they
 are essentially lost when the repeatingview item is recreated with a
 new instance of a textfield component.
 
 the feedback messages are cached by feedbackpanels before this happens
 as they are always the first things to be updated for this exact
 reason. but the fact that the textfield is in error is lost upon the
 feedback indicator.
 
 -igor
 
 
 



 igor.vaynberg wrote:

 you have to call setreuseitemstrategy(...) on the refreshingview so
 that components are kept across requests. it is analogous to having to
 call setreuseitems(true) on the listview.

 -igor

 On Tue, Aug 4, 2009 at 1:12 AM, Anton Komratova.komra...@gmail.com
 wrote:
 I'm using RefreshingView to show and edit data. I put MinimumValidator
 to
 the TextField in RefreshingView (in method populateItem()).Also I put
 FeedbackIndicator for this TextField in RefreshingView (also in method
 populateItem()).

 MinimumValidator works fine - I'm getting error messages at the
 FeedbackPanel. But FeedbackIndicator doesn't work - no any red
 asterics
 in
 case of invalid value in TextField.
 Others FeedbackIndicators at the same pages (for others TextFields
 outside
 of the RefreshingView) work fine.

 Any solutions? (I'm using wicket 1.4rc4).

 /// Java code fragment:

 @Override
 *protected void populateItem(final Item item)* {
 item.add(new Label(name));
 item.add(new Label(surname));
 item.add(new Label(city.name));

 TextField tfam = new TextField(amount);
 tfam.add(new MinimumValidator(1));
 item.add(tfam);

                                *FormComponentFeedbackIndicator
 amountFlag
 =
 new FormComponentFeedbackIndicator (amountFlag);*
 * **amountFlag.setIndicatorFor(tfam);*
 *                                item.add(amountFlag); * }
 ///

 !--      Markup file code fragment   --

 *tr wicket:id=simple*
 td width=5**/td
 tdnbsp;/td
 tdnbsp;/td
 tdnbsp;/td
 tdinput type=text wicket:id=amount style=width:30px
 tabindex=3/input/td
 */tr*


 -
 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/FeedbackIndicator-doesn%27t-work-inside-RefreshingView-tp24804087p24814748.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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/FeedbackIndicator-doesn%27t-work-inside-RefreshingView-tp24804087p24870516.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: How To Kill Previous Page

2009-08-07 Thread Carlo Camerino
what happens when you try to access a page that was taken away from the page
map?
i'm still looking at though, and probably would need to implement it soon.

thanks for the reply

On Fri, Aug 7, 2009 at 7:41 PM, Alex Objelean alex_objel...@yahoo.comwrote:


 getPage().getPageMap().remove(); ?

 Alex Objelean


 carlo c wrote:
 
  Hi,
 
  I would like to ask if it's possible to kill the previous page out of the
  pagestore.
  I have this requirement in which i have a view screen which can be able
 to
  delete or edit an entity.
 
  My problem is that when the client copies the url and pastes it back the
  client can go back to the previous page since the client can retrieve it
  from the session store.
 
  Is there  a way in which wicket can actually destroy the previous page?
 
  the problem is the users can copy for exampler
 
  View Page
  wicket:interface=1
 
  Acknowledgement Page
  wicket:interface=2
 
  The user can actually paste the url
 
  wicket:interface=1 to the browser and still be able to view the record.
 
  Is there any way for me to kill the page with id = 1?
 
  Thanks A Lot
  Carlo
 
 

 --
 View this message in context:
 http://www.nabble.com/How-To-Kill-Previous-Page-tp24863148p24863291.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: wicket 1.2.7 login error checking and reporting

2009-08-07 Thread Burton, Tom F (DOR)
Thank you very much for the help. I'm now using onError() like I should be
I've also got the requisite error messages setup in the appropriate .properties 
file. 

Thanks again for the assistance,
Tom

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Friday, August 07, 2009 11:03 AM
To: Burton, Tom F (DOR)
Subject: Re: wicket 1.2.7 login error checking and reporting

that code is pretty horrible, you should be using wicket's built in
validation instead of all that garbage.

anyways, it fails because passwordtextfield is required by default.
what this means is that if you leave it empty it will cause a form
validation error. onsubmit will not be called, instead button's
onerror will be called, where you should add the feedbackpanel to the
target to see the errors. you can also try
passwordfield.setrequired(false) and it might revert to working like
other textfields.

-igor

On Fri, Aug 7, 2009 at 11:47 AM, Burton, Tom F
(DOR)tom.bur...@alaska.gov wrote:
 It works for Login Failures, and blank usernames. It just doesn't
 work for blank passwords or blank username and password.

 Why would the error() function work for user==null but not password==null?
 My embarrassing log.debug line doesn't even fire, when there is no password.
 Which is why I'm not sure whatever code the server runs once I hit submit 
 doesn't get as far is this code without a password to verify.

 Here is a code snippet:

 form.add(new IndicatingAjaxSubmitButton(login, form)
 {
        private static final long serialVersionUID = 1L;
        public void onSubmit(AjaxRequestTarget target, Form form)
        {
                //set user as a non myalaska user so it will log out to this 
 page...
                ((QuickStartSession)getSession()).setMyAkUser(false);
                User userLoggingIn = null;

                target.addComponent(feedbackpanel);
                target.addComponent(form);

              String user_error = 'User Name' is a requied field;
              String passwd_error = 'Password' is a required field;

                //TODO: Delete this line once blank/empty passwd format 
 verified
                log.debug(Login AS:  + user +  :  + password);

                if ( user == null  ( password == null ||
                        password.trim().equals() ) )
                {
                        error( user_error + br/\n + passwd_error );
              }

                else if (user == null)
                {
                        //log.error('User Name' is a requied field);
                        error( user_error );
                        //return;
                }

        else if (password == null || password.trim().equals() )
        {
          log.error('Passwd' is a requied field);
          error( passwd_error );
          //return;
        }
        //else { log.info(username and password entered.); }
                //end the if else if block;

        //end processing if username or password errors
        if ( user == null || password == null
            || password.trim().equals() )
        { return; }


 Thanks for the help and patience,
 Tom B.

 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Friday, August 07, 2009 10:23 AM
 To: Burton, Tom F (DOR)
 Subject: Re: wicket 1.2.7 login error checking and reporting

 right, there is no wicketfilter in 1.2.x, only wicketservlet.

 if you get empty ajaxresponse back then maybe you are forgetting to
 update the feedback panel using ajaxrequesttarget.

 -igor

 On Fri, Aug 7, 2009 at 11:08 AM, Burton, Tom F
 (DOR)tom.bur...@alaska.gov wrote:
 I found wicketSessionFilter but not wicketFilter.  How would using
 A regular submit button make a difference. I know submit request goes to the 
 server  I just get an empty pair of ajaxresponse tags back from the 
 server. (Firebug is really usefull, and I'm able to look at the post request 
 I send thanks to TamperData).

 Thanks Again,
 Tom

 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Sent: Thursday, August 06, 2009 11:57 AM
 To: users@wicket.apache.org
 Subject: Re: wicket 1.2.7 login error checking and reporting

 set a breakpoint in wicketfilter and see what its doing. does it work
 properly when using a regular submit button?

 -igor

 On Thu, Aug 6, 2009 at 12:49 PM, Burton, Tom F
 (DOR)tom.bur...@alaska.gov wrote:
 Hello,

            I realize 1.2.7 is no longer officially supported.
 However, I'm hoping someone will help me anyway. Here goes nothing..




            I have a login page that is supposed to make sure a username
 and password were actually entered before validating against the auth
 source.

 If the name and/or password aren't entered it's supposed to spit out an
 error message to the user.  It works when a password is entered but no
 username.

 If I enter a username and no password, or don't enter anything at all,
 nothing seems to happen. The spinning 

Java/Wicket Job Available with Wicket founder at Networks in Motion

2009-08-07 Thread Jonathan Locke


My company is hiring someone (ideally in Seattle, but we also have an  
Aliso Viejo office down near L.A.)
We are doing a lot of back-end server work in Java, but we would  
really prefer someone with solid Wicket experience for a variety of  
reasons.
The team is me and one other guy, so there would be three coders after  
this hire. We really need a high quality and highly productive person.
Our company is doing really well and our group is small and fun and  
focussed on simple, appropriately architected OO and OSS solutions.


http://seattle.craigslist.org/see/sof/1311327500.html

Thanks,

Jonathan Locke



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