DataView the easy way?

2011-06-07 Thread Zeldor
Hi,

I am trying to make my first DataView and I found an example that does what
I want. It's quite confusing though - it takes like 15 pages and classes to
do it and I cannot decipher it. 
http://wicketstuff.org/wicket14/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.SimplePage
http://wicketstuff.org/wicket14/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.SimplePage
 

So, any ideas how to do it fast, just on one page? I have a HashTable with
ArrayLists [HashTablelt;Integer, ArrayListlt;Longgt;] that I want to
display. Of course I don't know how many rows I will have, that's why I want
DataView. I want to display 3 first data from the ArrayList in the map and I
want to be able to select rows [so I can delete them by int id].

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataView-the-easy-way-tp3578760p3578760.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Links blocked when I enter page

2011-06-07 Thread Zeldor
Hi,

I have rather weird problem. I have a page with navigation panel [mostly
bookmarkable links]. It works fine on all but one. On that one page when I
enter it, some of my navigation links get blocked - 2 out of 5. Any idea
what may be causing it? They turn fine when I click on submit button on that
page [it turns visibility of another button to true - can there be some
weird bug with it?].

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Links-blocked-when-I-enter-page-tp3578762p3578762.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: DataView the easy way?

2011-06-07 Thread Martin Grigorov
There are 15+ pages because there are examples for several components
in this folder.
Just take a look at SimplePage.java and it should become clear how to do it.

On Tue, Jun 7, 2011 at 8:53 AM, Zeldor pgronkiew...@gmail.com wrote:
 Hi,

 I am trying to make my first DataView and I found an example that does what
 I want. It's quite confusing though - it takes like 15 pages and classes to
 do it and I cannot decipher it.
 http://wicketstuff.org/wicket14/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.SimplePage
 http://wicketstuff.org/wicket14/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.SimplePage

 So, any ideas how to do it fast, just on one page? I have a HashTable with
 ArrayLists [HashTablelt;Integer, ArrayListlt;Longgt;] that I want to
 display. Of course I don't know how many rows I will have, that's why I want
 DataView. I want to display 3 first data from the ArrayList in the map and I
 want to be able to select rows [so I can delete them by int id].

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/DataView-the-easy-way-tp3578760p3578760.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Links blocked when I enter page

2011-06-07 Thread Martin Grigorov
A link will autodisable itself if it links to the same page in which
it is being shown.
See org.apache.wicket.markup.html.link.Link.linksTo(Page)

On Tue, Jun 7, 2011 at 8:55 AM, Zeldor pgronkiew...@gmail.com wrote:
 Hi,

 I have rather weird problem. I have a page with navigation panel [mostly
 bookmarkable links]. It works fine on all but one. On that one page when I
 enter it, some of my navigation links get blocked - 2 out of 5. Any idea
 what may be causing it? They turn fine when I click on submit button on that
 page [it turns visibility of another button to true - can there be some
 weird bug with it?].

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Links-blocked-when-I-enter-page-tp3578762p3578762.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Links blocked when I enter page

2011-06-07 Thread Zeldor
Well, they don't do it in my case. Maybe because they are in panel...

Anyway, I wouldn't have problem with that. It's that 2 other links are
blocked, those that lead to other pages. I don't have problem like that on
other pages and only thing here that is different is that additional submit
button with changing visibility. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Links-blocked-when-I-enter-page-tp3578762p3578815.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Using GAE/J deferred tasks in Apache Wicket

2011-06-07 Thread Ian Marshall
I have tried using Google App Engine for Java (GAE/J) deferred tasks in
Apache Wicket.

They do indeed run, but I cannot access the bulk of my data exchange code
since it needs the context of an application and/or a session to work. I
presume that the underlying cause of this is because when the task fires, it
calls a default servlet as opposed to one of my web pages (which results in
the page's code running in the context of an application and a session).

I have reverted to using GAE/J enqueued tasks to fire up a web page and do
my processing from there. But I was interested in using DeferredTask since I
wanted to:

  ·  bypass the GAE/J 30-second web page response limit and use the GAE/J
10-minute task processing limit instead
  ·  obviate having to code new web pages and just implement the
DeferredTask.run() method.

Has anyone got to use DeferredTask within the context of an application and
session successfully?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-GAE-J-deferred-tasks-in-Apache-Wicket-tp3578949p3578949.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: database

2011-06-07 Thread Miroslav F.
The original question was I would like to make my wicket app to store
images in
database. No problem but I don't know how to configure tomcat + wicket for
database.

No is it good idea to store images in database? ;-)

Still don't know how to work with database in wicket. Is anywhere examples?
wicket phonebook example is not working:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook/

I move to direction not use pure JDBC and using Hibernate. Does someone know
where to find docs for using Hibernate in webapp project? Where to put
config
file or any other specific issues for using Hibernate in webapp?

Thanks, Miro



 -Original Message-
 From: meduolis [mailto:meduol...@gmail.com] 
 Sent: Sunday, 05. June 2011 12:19
 To: users@wicket.apache.org
 Subject: Re: database
 
 Why do you want to store images in database? I think that is 
 not a very good idea. You better store images in your file 
 system, and persist into database only the paths to images.
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/database-tp3573282p
3574812.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



Re: DataView the easy way?

2011-06-07 Thread Zeldor
Right :)


So I want to start with something like:

add(new DataViewExpedition(expedition,
MySession.loggedInUser.colonisations) {
});

I am confused how to implement populateItem though...


 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataView-the-easy-way-tp3578760p3579124.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: DataView the easy way?

2011-06-07 Thread Martin Grigorov
populateItem() gives you one Expedition at a time. You decide how to render it.

On Tue, Jun 7, 2011 at 11:42 AM, Zeldor pgronkiew...@gmail.com wrote:
 Right :)


 So I want to start with something like:

 add(new DataViewExpedition(expedition,
 MySession.loggedInUser.colonisations) {
 });

 I am confused how to implement populateItem though...




 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/DataView-the-easy-way-tp3578760p3579124.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: database

2011-06-07 Thread Martin Grigorov
http://www.jweekend.com/dev/LegUp
Here you can choose a Maven archetype that will create an application
skeleton with the technologies you chose.

https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/phonebook
This is the latest source of phonebook

On Tue, Jun 7, 2011 at 11:41 AM, Miroslav F. mir...@seznam.cz wrote:
 The original question was I would like to make my wicket app to store
 images in
 database. No problem but I don't know how to configure tomcat + wicket for
 database.

 No is it good idea to store images in database? ;-)

 Still don't know how to work with database in wicket. Is anywhere examples?
 wicket phonebook example is not working:
 http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook/

 I move to direction not use pure JDBC and using Hibernate. Does someone know
 where to find docs for using Hibernate in webapp project? Where to put
 config
 file or any other specific issues for using Hibernate in webapp?

 Thanks, Miro



 -Original Message-
 From: meduolis [mailto:meduol...@gmail.com]
 Sent: Sunday, 05. June 2011 12:19
 To: users@wicket.apache.org
 Subject: Re: database

 Why do you want to store images in database? I think that is
 not a very good idea. You better store images in your file
 system, and persist into database only the paths to images.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/database-tp3573282p
 3574812.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: DataView the easy way?

2011-06-07 Thread Zeldor
Do I need to do anything special? Will it automatically go through all rows
of my Map? When my map is HashMaplt;Integer,ArrayListgt; then Expedition
will be my ArrayList or whole row, together with int id? I could probably
use just a list of ArrayLists if it'd be easier...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataView-the-easy-way-tp3578760p3579147.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Links blocked when I enter page

2011-06-07 Thread Andrea Del Bene

Hi Zeldor,

do these two links depend for any reason on the button you make 
visible/invisible? Have you overridden method isEnabled on this two links?

Hi,

I have rather weird problem. I have a page with navigation panel [mostly
bookmarkable links]. It works fine on all but one. On that one page when I
enter it, some of my navigation links get blocked - 2 out of 5. Any idea
what may be causing it? They turn fine when I click on submit button on that
page [it turns visibility of another button to true - can there be some
weird bug with it?].

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Links-blocked-when-I-enter-page-tp3578762p3578762.html
Sent from the Users forum mailing list archive at Nabble.com.

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






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



Re: DataView the easy way?

2011-06-07 Thread Zeldor
Ok, I changed it to ArrayListlt;ArrayListlt;Longgt;, but I still don't
get how to use populateItem...


Even testing just that
add(new DataViewExpedition(expedition,
MySession.loggedInUser.colonisations)
{

});

Results in:
internal error; cannot instantiate org.
apache.wicket.markup.repeater.data.DateView.init at
org.apache.wicket.markup.repeater.data.DAtaViewExpedition to ()

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataView-the-easy-way-tp3578760p3579173.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Links blocked when I enter page

2011-06-07 Thread Zeldor
Nope, panel is separate. There should be no connection... I will rather paste
some code, maybe it will give a hint...

add(new FeedbackPanel(errorMsg));
// starting form
private boolean col_approval = false;   

Button calculateColCost = new 
Button(calculateColCost) {
@Override
public void onSubmit() {
//some methods, one with

sendExpedition.setVisible(false);

else {

sendExpedition.setVisible(true);


//...
Button sendExpedition = new Button(sendExpedition) {
//...
};
{
add(sendExpedition);
sendExpedition.setVisible(col_approval);
};

};
//add form


I don't see anything special here, so no idea how it could make result like
that...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Links-blocked-when-I-enter-page-tp3578762p3579180.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: DataView the easy way?

2011-06-07 Thread Achim Wiedemann

Hi Zeldor,

the populateItem-method is used to populate the rows of your table. 
Basically, you can add the cells of your rows there. DataView will 
loop through the elements of your collection automatically, and for 
every element in the collection call the populateItem-method with the 
current element passed as a parameter.


So by slightly modifying the SimplePage that Martin suggested to match 
your case you should get something like this:



ListExpedition colonisations = ...; // initialized somewhere else
add(
  new DataViewExpedition(
expeditionsView,
new ListDataProviderExpedition(colonisations)
  )
{
@Override
protected void populateItem(final ItemExpedition item)
{
Expedition expedition = item.getModelObject();

// item represents the current row-component
item.add(new Label(title, expedition.getTitle());
item.add(new Label(price, expedition.getPrice())
}
}
);


As you can see, you're just populating your table-rows' cells with the 
components you need. Instead of Labels you could also add Buttons or 
whatever you like.



greetz,
achim



Am 07.06.2011 12:10, schrieb Zeldor:

Ok, I changed it to ArrayListlt;ArrayListlt;Longgt;, but I still don't
get how to use populateItem...


Even testing just that
add(new DataViewExpedition(expedition,
MySession.loggedInUser.colonisations)
 {

 });

Results in:
internal error; cannot instantiate org.
apache.wicket.markup.repeater.data.DateView.init  at
org.apache.wicket.markup.repeater.data.DAtaViewExpedition  to ()

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataView-the-easy-way-tp3578760p3579173.html
Sent from the Users forum mailing list archive at Nabble.com.

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



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



Re: DataView the easy way?

2011-06-07 Thread Zeldor
I almost have it... I have my ArrayList of lists, so I guess my code should
look smth like that:


ArrayListlt;ArrayListlt;Longgt; colonisations =
MySession.loggedInUser.colonisations;
add(new DataView(expeditionsView, new 
ListDataProvider(colonisations))
 {
 @Override
 protected void populateItem(final Item item)
 {
 ArrayList expedition = (ArrayList)item.getModelObject();   

// item represents the current row-component
 item.add(new Label(title, expedition.get(0)));
 item.add(new Label(price, expedition.get(1)));
 }
 }); 

I must be doing some fundamental mistake here, as it can't work. It throws
cannot find symbol: symbol constructor Label at both item.add lines

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataView-the-easy-way-tp3578760p3579270.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Basic TextField question

2011-06-07 Thread drf
When I create a TextField as follows:
TextField postCode = new TextFieldString( new ModelString(xxx));
the object is created and shows the correct value.

However, once the object is created, I do not seem to be able to change the
value.
postCode.setModelObject(zzz);
and 
postCode.setModet(new ModelString(zzz));
both do not appear to work, even with all the Ajax stuff setup correctly.

What would be the correct code, thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Basic-TextField-question-tp3579272p3579272.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: DataView the easy way?

2011-06-07 Thread Martin Grigorov
try with  item.add(new Label(title, expedition.get(0).toString()));

On Tue, Jun 7, 2011 at 1:07 PM, Zeldor pgronkiew...@gmail.com wrote:
 I almost have it... I have my ArrayList of lists, so I guess my code should
 look smth like that:


 ArrayListlt;ArrayListlt;Longgt; colonisations =
 MySession.loggedInUser.colonisations;
                add(new DataView(expeditionsView, new 
 ListDataProvider(colonisations))
         {
             @Override
             protected void populateItem(final Item item)
             {
                 ArrayList expedition = (ArrayList)item.getModelObject();
                // item represents the current row-component
                 item.add(new Label(title, expedition.get(0)));
                 item.add(new Label(price, expedition.get(1)));
             }
         });

 I must be doing some fundamental mistake here, as it can't work. It throws
 cannot find symbol: symbol constructor Label at both item.add lines

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/DataView-the-easy-way-tp3578760p3579270.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Basic TextField question

2011-06-07 Thread Martin Grigorov
call postCode.modelChanged() after these calls

On Tue, Jun 7, 2011 at 1:08 PM, drf davidrfi...@gmail.com wrote:
 When I create a TextField as follows:
 TextField postCode = new TextFieldString( new ModelString(xxx));
 the object is created and shows the correct value.

 However, once the object is created, I do not seem to be able to change the
 value.
 postCode.setModelObject(zzz);
 and
 postCode.setModet(new ModelString(zzz));
 both do not appear to work, even with all the Ajax stuff setup correctly.

 What would be the correct code, thanks.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Basic-TextField-question-tp3579272p3579272.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Basic TextField question

2011-06-07 Thread drf
Still does not work


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Basic-TextField-question-tp3579272p3579294.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Session values not stored using chrome

2011-06-07 Thread Patrick Petermair

Hi!

Our wicket application has the following scenario:

-) save myValue in the session
-) redirect the user to an external page (using 
getRequestCycle().setRequestTarget())
-) the external pages redirects back to our webapp after the user 
entered some data

-) read myValue from the session and do something based on myValue

It all works just fine in Firefox, but not in Chrome. Using Chrome 
myValue is null when the user returns to the our wicket page again. My 
first guess was that a new session must have been created or that 
myValue was never set. I debugged through the code and the session id is 
exactly the same ... myValue has also been set before the user got 
redirected.


I don't quite get how Chrome and Firefox would behave differently when 
it comes to saving values into the wicket session. Or how leaving the 
webpage and returning to it 1 minute later would suddenly result in a 
different kind of session.


Any hints?

Cheers,
Patrick


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



Re: DataView the easy way?

2011-06-07 Thread Zeldor
Thanks a lot, it works :)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataView-the-easy-way-tp3578760p3579384.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Basic TextField question

2011-06-07 Thread kamiseq
why cannot you change value in model and detach it?

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


Using Validators Outside of Wicket Components/Pages

2011-06-07 Thread eugenebalt
We have two applications, one is a Wicket app with Validator classes, and
another is an Apache POI-HSSF Excel-parsing app that parses Excel
spreadsheets.

We need to apply the same Validators to both the Wicket app (text field
components) and the Excel parser (the cells in the spreadsheet). We already
have the validators attached to the Wicket form, but is there a way to
re-use them for any abstract strings, such as Excel cells?

Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-Validators-Outside-of-Wicket-Components-Pages-tp3579655p3579655.html
Sent from the Users forum mailing list archive at Nabble.com.

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



MockHttpServletRequest

2011-06-07 Thread Adam Gray
My application's base page does checking against the user agent string to
redirect unsupported browsers to a support page.  The problem we're seeing
is that WicketTester is using a hardcoded user agent from a crazy-old
version of firefox.

Is there any recommended way to specify the user-agent used by WicketTester,
or is this a known limitation?  From what I can tell, there doesn't seem to
be a way to get at the actual header data to make the change.


Re: Basic TextField question

2011-06-07 Thread Andrea Del Bene

Hi,

are you sure that setModelObject or setModel are really called in your 
code? If you modify TextField via Ajax be sure you have added it to 
AjaxRequestTarget





When I create a TextField as follows:
TextField postCode = new TextFieldString( new ModelString(xxx));
the object is created and shows the correct value.

However, once the object is created, I do not seem to be able to change the
value.
postCode.setModelObject(zzz);
and
postCode.setModet(new ModelString(zzz));
both do not appear to work, even with all the Ajax stuff setup correctly.

What would be the correct code, thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Basic-TextField-question-tp3579272p3579272.html
Sent from the Users forum mailing list archive at Nabble.com.

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






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



Re: MockHttpServletRequest

2011-06-07 Thread Martin Grigorov
Looking at the code I see a lot of things are not possible to
configure in this area.
The easiest way to allow what you need is to add #setHeader(name,
value) which will override the previous value(s) for this name.

Please create a ticket.

On Tue, Jun 7, 2011 at 4:11 PM, Adam Gray adam.j.g...@gmail.com wrote:
 My application's base page does checking against the user agent string to
 redirect unsupported browsers to a support page.  The problem we're seeing
 is that WicketTester is using a hardcoded user agent from a crazy-old
 version of firefox.

 Is there any recommended way to specify the user-agent used by WicketTester,
 or is this a known limitation?  From what I can tell, there doesn't seem to
 be a way to get at the actual header data to make the change.




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: MockHttpServletRequest

2011-06-07 Thread Adam Gray
Will do, thanks.

On Tue, Jun 7, 2011 at 10:23 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 Looking at the code I see a lot of things are not possible to
 configure in this area.
 The easiest way to allow what you need is to add #setHeader(name,
 value) which will override the previous value(s) for this name.

 Please create a ticket.

 On Tue, Jun 7, 2011 at 4:11 PM, Adam Gray adam.j.g...@gmail.com wrote:
  My application's base page does checking against the user agent string to
  redirect unsupported browsers to a support page.  The problem we're
 seeing
  is that WicketTester is using a hardcoded user agent from a crazy-old
  version of firefox.
 
  Is there any recommended way to specify the user-agent used by
 WicketTester,
  or is this a known limitation?  From what I can tell, there doesn't seem
 to
  be a way to get at the actual header data to make the change.
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




Re: Links blocked when I enter page

2011-06-07 Thread Andrea Del Bene
Can you reproduce this behavior in a quickstart project and attach it to 
Wicket JIRA?

Nope, panel is separate. There should be no connection... I will rather paste
some code, maybe it will give a hint...

add(new FeedbackPanel(errorMsg));
// starting form
private boolean col_approval = false;   

Button calculateColCost = new 
Button(calculateColCost) {
@Override
public void onSubmit() {
//some methods, one with

sendExpedition.setVisible(false);

else {

sendExpedition.setVisible(true);


//...
Button sendExpedition = new Button(sendExpedition) {
//...
};
{
add(sendExpedition);
sendExpedition.setVisible(col_approval);
};

};
//add form


I don't see anything special here, so no idea how it could make result like
that...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Links-blocked-when-I-enter-page-tp3578762p3579180.html
Sent from the Users forum mailing list archive at Nabble.com.

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






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



Re: Using Validators Outside of Wicket Components/Pages

2011-06-07 Thread Igor Vaynberg
all validators need to work is IValidatable, so simply new your
validator and give it your own impl of ivalidatable.

-igor

On Tue, Jun 7, 2011 at 6:52 AM, eugenebalt eugeneb...@yahoo.com wrote:
 We have two applications, one is a Wicket app with Validator classes, and
 another is an Apache POI-HSSF Excel-parsing app that parses Excel
 spreadsheets.

 We need to apply the same Validators to both the Wicket app (text field
 components) and the Excel parser (the cells in the spreadsheet). We already
 have the validators attached to the Wicket form, but is there a way to
 re-use them for any abstract strings, such as Excel cells?

 Thanks

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Using-Validators-Outside-of-Wicket-Components-Pages-tp3579655p3579655.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



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



wicket-dnd not working on IE9 and only partially on IE8

2011-06-07 Thread lucast
Dear Forum,
Has any wicked-dnd user out there noticed that the functionality doesn't
work on IE9? 
I have an implementation of wicket-dnd that I have used with repeating views
so that I can use it in tables and lists but while it works on firefox,
google chrome, even konkeror, it doesn't work at all on IE9.
On IE8, the drag functionality works but when dropping the object on a drop
area, it doesn't refresh the area to display the dropped object. I have to
refresh the page to see what I have dropped.

not even the examples page from wicket-dnd work (
http://wicket-dnd.appspot.com/ http://wicket-dnd.appspot.com/ ) on IE9. 

I'm about 3 weeks away from making my system go live and this doesn't look
good.

I've tested my web app on Windows Vista using IE9 and IE8.

Any help will be, as always, much appreciated.
Kind regards,
Lucas



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-dnd-not-working-on-IE9-and-only-partially-on-IE8-tp3580258p3580258.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Feature request: use predicates with onConfigure()

2011-06-07 Thread Russell Morrisey
Guys,

I would like to see a standard implementation of onConfigure(), where the user 
can set a Predicate object for the component's visibility, and another 
Predicate for the enabled state. This is an idea that our team tossed around 
for a while; since I just discovered the onConfigure() feature when I updated 
our project to the new wicket version, I thought that onConfigure() would be a 
great place to fit it in. Let me know what you think:

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



RUSSELL E. MORRISEY
Programmer Analyst Professional
Mission Solutions Engineering, LLC

| russell.morri...@missionse.com | www.missionse.comhttp://www.missionse.com/
304 West Route 38, Moorestown, NJ 08057-3212



This is a PRIVATE message. If you are not the intended recipient, please delete 
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
order or other contract unless pursuant to explicit written agreement or 
government initiative expressly permitting the use of e-mail for such purpose.


Re: wicket-dnd not working on IE9 and only partially on IE8

2011-06-07 Thread Sven Meier

Hi Lucas,

wicket-dnd is working fine here with IE8. In case this isn't clear yet, 
you have to update the changed components by yourself via 
AjaxReqestTarget#addComponent().


I'll have to look for system with IE9 to check the functionality (I'm 
not yet on windows seven), so this might take some time.


Perhaps it's an incompatibility with prototype?

http://www.google.com/search?q=prototype+ie9

BTW which version (wicket / wicket-dnd) are you using?

Hope this helps

Sven

On 07.06.2011 19:24, lucast wrote:

Dear Forum,
Has any wicked-dnd user out there noticed that the functionality doesn't
work on IE9?
I have an implementation of wicket-dnd that I have used with repeating views
so that I can use it in tables and lists but while it works on firefox,
google chrome, even konkeror, it doesn't work at all on IE9.
On IE8, the drag functionality works but when dropping the object on a drop
area, it doesn't refresh the area to display the dropped object. I have to
refresh the page to see what I have dropped.

not even the examples page from wicket-dnd work (
http://wicket-dnd.appspot.com/ http://wicket-dnd.appspot.com/ ) on IE9.

I'm about 3 weeks away from making my system go live and this doesn't look
good.

I've tested my web app on Windows Vista using IE9 and IE8.

Any help will be, as always, much appreciated.
Kind regards,
Lucas



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-dnd-not-working-on-IE9-and-only-partially-on-IE8-tp3580258p3580258.html
Sent from the Users forum mailing list archive at Nabble.com.

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





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



adding items dynamically to ListView

2011-06-07 Thread wmike1...@gmail.com
I'm trying to add items to a listView when a user clicks a button. I have a
propertyModel backing my ListView. In the onClick(), I do:

AjaxLink newIncButton = new AjaxLink(newIncButton){
@Override
public void onClick(AjaxRequestTarget target) {
 List list = new ArrayList(bean.getIncList());
   Incident inc = new Incident();
   inc.setAction(action);
   inc.setDescription(whatever description);
   list.add(0, inc);
   bean.setIncList(list);
 }
}

the variable bean is the object which backs the propertyModel.

The ListView doesn't appear to be refreshing with the new item I put in the
list.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/adding-items-dynamically-to-ListView-tp3580840p3580840.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: adding items dynamically to ListView

2011-06-07 Thread wmike1...@gmail.com
sorry, trying to format that

AjaxLink newIncButton = new AjaxLink(newIncButton){
@Override
public void onClick(AjaxRequestTarget target) {
 List list = new ArrayList(bean.getIncList());
   Incident inc = new Incident();
   inc.setAction(action);
   inc.setDescription(whatever description);
   list.add(0, inc);
   bean.setIncList(list);
 }
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/adding-items-dynamically-to-ListView-tp3580840p3580846.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: adding items dynamically to ListView

2011-06-07 Thread Martin Grigorov
On Tue, Jun 7, 2011 at 11:20 PM, wmike1...@gmail.com
wmike1...@gmail.com wrote:
 sorry, trying to format that

 AjaxLink newIncButton = new AjaxLink(newIncButton){
        @Override
        public void onClick(AjaxRequestTarget target) {
             List list = new ArrayList(bean.getIncList());
               Incident inc = new Incident();
               inc.setAction(action);
               inc.setDescription(whatever description);
               list.add(0, inc);
               bean.setIncList(list);
listView.modelChanged();
target.addComponent(listView);
             }
 }



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/adding-items-dynamically-to-ListView-tp3580840p3580846.html
 Sent from the Users forum mailing list archive at Nabble.com.

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: ContextImage and external URL

2011-06-07 Thread Martin Grigorov
use Image with DynamicImageResource which loads the image with urlConnection

On Tue, Jun 7, 2011 at 11:46 PM, Daniele Dellafiore ilde...@gmail.com wrote:
 Hi.

 I take some user uploaded images from an external service that answer
 at, say, localhost:8181/images
 My wicket app run on localhost:9191/app
 I want to load the images from the first service, and I'd like to use
 a ContextImage that is easy to use:

  new ContextImage(picture, images/ + code);

 This of course does not work cause the base of the ContextImage points to 
 9191.

 I could use something else but I like ContextImage, One idea is to
 have something like a filter set up in web.xml that redirect each call
 to /images to a custom url like localhost:8181/images.

 What do you think? Also, I really do not have a clear idea on how to
 do that in a nice way, any tip?

 --
 Daniele Dellafiore
 http://danieledellafiore.net

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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: adding items dynamically to ListView

2011-06-07 Thread wmike1...@gmail.com
Wicket doesn't allow me to update a ListView object directly through ajax, it
suggests putting it in in a container. So I made a WebMarkupContainer to
wrap the ListView. I have now:


public void onClick(AjaxRequestTarget target)
{
List list = new ArrayList(bean.getIncList());
Incident inc = new Incident();
inc.setAction(action);
inc.setDescription(whatever description);
list.add(inc);
bean.setIncList(list);
listView.modelChanged();
container.modelChanged();
container.setOutputMarkupId(true);
listView.setOutputMarkupId(true);
container.add(listView);
target.addComponent(container);
}


I've confirmed that the model is being updated. The component is still not
being redrawn.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/adding-items-dynamically-to-ListView-tp3580840p3580990.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: adding items dynamically to ListView

2011-06-07 Thread James Carman
How do you set up the model?  Can we see some code?

Sent from tablet device.  Please excuse typos and brevity.
On Jun 7, 2011 6:13 PM, wmike1...@gmail.com wmike1...@gmail.com wrote:
 Wicket doesn't allow me to update a ListView object directly through ajax,
it
 suggests putting it in in a container. So I made a WebMarkupContainer to
 wrap the ListView. I have now:


 public void onClick(AjaxRequestTarget target)
 {
 List list = new ArrayList(bean.getIncList());
 Incident inc = new Incident();
 inc.setAction(action);
 inc.setDescription(whatever description);
 list.add(inc);
 bean.setIncList(list);
 listView.modelChanged();
 container.modelChanged();
 container.setOutputMarkupId(true);
 listView.setOutputMarkupId(true);
 container.add(listView);
 target.addComponent(container);
 }


 I've confirmed that the model is being updated. The component is still not
 being redrawn.

 --
 View this message in context:
http://apache-wicket.1842946.n4.nabble.com/adding-items-dynamically-to-ListView-tp3580840p3580990.html
 Sent from the Users forum mailing list archive at Nabble.com.

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



Gamboa Project

2011-06-07 Thread Bruno Borges
Hi everyone,

I've been working on what I call the Gamboa Project for a couple of days
and now the project is ready and published.

It is a Maven archetype for rapid web application development. It
combines well-know technologies:

- Scala
- Apache Wicket
- MongoDB
- Spring Framework
- Velocity
- HTML5+jQuery

The purpose of this project is to give developers a quick start for Web 2.0
applications based on NoSQL.
Plans for another archetype for SQL does exist though.

https://github.com/brunoborges/gamboa-project/

Also, this project aims a common scenario where web designers build
prototypes and give them to developers.
With Gamboa, all the prototype goes to *layout* folder and page classes goes
to *code/pages*.
Thanks to Wicket 1.5 and the auto resource path URL feature, it is even
better to have separated HTML+css+js from the Java/Scala code.

I also plan to build (with it) its own website at www.gamboa-project.org.

If anyone is interested on this, please take a look.
Feedbacks are welcome.

Thank you,
*Bruno Borges*
www.brunoborges.com.br
+55 21 76727099


Re: Form in modal using Internet Explorer 8

2011-06-07 Thread Matthew Goodson
Hi, I figured out what was causing my problem.
For anyone else that gets the same thing...

I had a jquery modal with a form in it. Inside the form I had an input tag
of type image. (input type=image src=/assets/img.jpg/)
I found that when I clicked the input tag ie was submitting the form. It
only happened when using ie 8 older.
It turns out that when I use an input tag of a different type then the
problem stopped.

Thanks


On Tue, Jun 7, 2011 at 4:41 PM, Matthew Goodson matt...@spidertracks.comwrote:

 Hi guys,
 I have a jquery modal which contains a form which has an ajax button.
 The problem I have is that when using internet explorer 8 (and presumibly
 older versions) when the button is clicked an ajax callback is fired for the
 button AND also an ajax form submit callback is fired.
 This doesn't happen with ie9, firefox or chrome. For these browsers I just
 get the one ajax callback for the button which is what I would expect.

 Does anyone know what would cause the form submit to fire on ie8?

 Thanks for your help.

 Matthew Goodson




-- 

Matthew

Software Engineer

Matthew Goodson | spidertracks

po box 5203 | 117a the square | Palmerston North 4441 | new zealand

P: +64 6 353 3395 | M: +64 27 6969639

E: *matt...@spidertracks.co.nz* matt...@spidertracks.co.nz   *
www.spidertracks.com*

spiderwatch - because in the rescue game, time = life.


WicketRuntimeException

2011-06-07 Thread Jeffrey Schneller
I have started to see more and more of the following exception when
users are using the wicket app.

 

org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
null is still locked by: Thread[TP-Processor24,5,main], giving up trying
to get the page for path: 4:products:0:prodBuyLink

 

If my understanding is right, it is a timeout that is occurring because
the app is still processing for the page that is trying to be viewed.
Is this correct?  Any ideas on how to debug or solve?  What are some
common reasons for this type of exception?

 

 



Re: WicketRuntimeException

2011-06-07 Thread Martin Grigorov
On Wed, Jun 8, 2011 at 7:00 AM, Jeffrey Schneller
jeffrey.schnel...@envisa.com wrote:
 I have started to see more and more of the following exception when
 users are using the wicket app.



 org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
 null is still locked by: Thread[TP-Processor24,5,main], giving up trying
 to get the page for path: 4:products:0:prodBuyLink



 If my understanding is right, it is a timeout that is occurring because
 the app is still processing for the page that is trying to be viewed.
 Is this correct?  Any ideas on how to debug or solve?  What are some
 common reasons for this type of exception?

Correct. You can dump the thread's state with tools like jconsole or
on unix machines with kill -3 pid.
Making several dumps you will see the thread that is stuck.









-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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