ListView error when using JQuery

2011-02-13 Thread flavius

I'm creating a page with widgets similar to Yahoo and Google's
home pages.  The widgets can be dragged around to change their
position.  This is largely working (using ListView) but I'm getting
an error when I drag the bottom widget of one ListView onto the
list of another.  The page no longer has a reference to the item.

I'm calling listView.modelChanging(), changing the backing List,
then calling listView.modelChanged().  I've been looking at this
and the cause is eluding me...I'm sure I'm missing something dumb.

I just put together a quickstart to demonstrate this...it seemed
easier than posting a lot of code.

The quickstart is available at silverlion.com/flavius/JQuery.zip

For this quickstart I used JWicket.  I tried the same thing with 
WiQuery, but Maven can't seem to find the dependency when 
I put that in the pom file.

Thanks in advance for any help.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ListView-error-when-using-JQuery-tp3304427p3304427.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: JWicket drag/drop handle

2011-02-01 Thread flavius

This did the trick.  setRawOptions is exactly what I needed.

Thanks Stefan
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/JWicket-drag-drop-handle-tp3250469p3253344.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



JWicket drag/drop handle

2011-01-31 Thread flavius


I'm trying to create a widget/gadget (similar to google's home page or
yahoo).
I've got it largely figured out except for one thing.  I'm trying to
restrict the
drag operation to just the top div (the header).  So my widget will look
like this:

div class=widget
  div class=wheaderDrag here/div
  div class=wbodystuff goes here.../div
/div

This functionality is described in JQuery here:
http://jqueryui.com/demos/draggable/#handle

It seems like DraggableBehavior should have a setHandle method so I can
define
the draggable region.

Any thoughts?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/JWicket-drag-drop-handle-tp3250469p3250469.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: Noob question: Link to Page that only Redirects?

2011-01-27 Thread flavius


On your MyLinkPage you can just setResponsePage...

So

if (gotoQuestionPage)
  setResponsePage(QuestionPage.class);
else
  setResponsePage(ErrorPage.class);

Is that what you're after?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Noob-question-Link-to-Page-that-only-Redirects-tp3242125p3242300.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



jWicket WiQuery

2011-01-22 Thread flavius


I'm looking to implement some ajax functionality and was looking at the
different libs that
integrate with wicket.  After looking at these statistics, I thought jquery
would be ideal.
It's the most popular in most parts of the world and has gotten good reviews
in general.

http://www.google.com/trends?q=jquery%2Cdojo%2Cmootools%2Cyui%2Cextjs

I found jWicket and WiQuery, two different projects for jQuery.  I'm looking
for some
examples to test out.  I found the examples for jWicket (nice job on this
project).
The only thing I can find for WiQuery is here:

http://code.google.com/p/wiquery-demos/

I've downloaded what I can from the google code.  It only includes sources,
javadoc,
and the wiquery lib itself.  Am I missing this someplace?

Thanks in advance.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jWicket-WiQuery-tp3231792p3231792.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: jWicket WiQuery

2011-01-22 Thread flavius


Thanks Hielke,

The example source is what I was looking for.  I found it here:
http://code.google.com/p/wiquery/source/browse/examples/?r=256#examples%2Fwiquery-examples%2Fsrc%2Fmain%2Fjava%2Forg%2Fodlabs%2Fwiquery%2Fexamples%253Fstate%253Dclosed

I saw the example war for version 1.0 from Nov '09 and was thinking
there would be an updated one for a more recent one.  This works though.


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jWicket-WiQuery-tp3231792p3232038.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: AjaxLazyLoadPanel and back button

2011-01-09 Thread flavius

Thanks Pedro.

I've opened WICKET-3318 regarding this issue and attached a quickstart.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxLazyLoadPanel-and-back-button-tp3168379p3206574.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



AjaxLazyLoadPanel and back button

2010-12-30 Thread flavius

I'm using the AjaxLazyLoadPanel to load images I'm generating from reports. 
When 
I'm on a page with the AjaxLazyLoadPanel, click a link to another page (like
a 
BookmarkablePageLink) and then click back, the image that was generated is
still in place.   

However, if I submit a form that's on the panel's page and then hit the back
button, 
it goes back to the page with the spinning busy indicator and it spins
forever, 
rather than displaying the already rendered image. 

Is this by design or should the generated image be rendered as it does when 
clicking a link?

I'm using wicket 1.4.15.



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxLazyLoadPanel-and-back-button-tp3168379p3168379.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



Passing / Persisting an object without PageParameters

2010-03-29 Thread Flavius
 
I have a list page and a detail page.  The
list is the results of a search and I put
this in a listview.  The user can then click
each item to view it in the detail.

What I'm doing now is passing the result object
to the detail page so they can continue to 
navigate (next ) the results without having
to go back to the list.  Also, when they return
to the list, it should have the same results they
had (preferrably without requerying the database).

I now want to make the detail page bookmarkable.
So I can pass a string value along that identifies
the detail record to retrieve, but I'm in a quandry
as to how to handle the result object.

I need to put this someplace where the pages can see
it and all I can think of is the session.  I'm 
reluctant to put this on the session because it
will be  1k in size and possibly up to 3k.  That's
a big object to put on the session, especially in 
a clustered environment.

Does anybody have any suggestions as to how to get
the bookmarkable detail page and still have a ref
to this result object?


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



Re: Resetting a form after ajax submit

2010-01-26 Thread Flavius


For anybody who's interested, I got this to work by just
calling form.textField.setModelValue(new String[]{});
I had to make the fields member vars of the form, though.

If there's another cleaner way of doing it, I'd appreciate seeing it.


Flavius wrote:
 
  
 I have a panel with a form on it.  I've attached an ajaxButton to submit
 the form.  Afterward, I want the inputs to be reset with the backing model
 reset.  I've done a lot of refreshing with an ajax submit, but I can't
 seem
 to get the form's values to reset in the webpage.  The backing model seems
 to be reset, but when I add the form (or it's individual children) to the
 target,
 they don't refresh.
 
 I've done a variation of this where I have a repeating view up top and
 when 
 that row is selected, it would populate the form, but I had to put the
 form
 in a fragment and add the fragment to the target to get that to work.  Can
 somebody tell me what I'm doing wrong here?
 
 Thanks
 
 public class MyPanel extends Panel
 {
   public MyPanel(String id, Widget myWidget)
   {
   MyForm myForm = new MyForm(myForm, new MyWidget());
   add(myForm);
   add(new AjaxButton(saveLink, myForm)
   {
   @Override
   protected void onSubmit(AjaxRequestTarget target,
 Form form)
   {
   //save stuff
   //refresh repeating view
   //now reset the form so the input fields are
 cleared and there's
   //a new backing model
   form.clearInput();  //this isn't working
   form.setDefaultModelObject(new MyWidget());
 //this seems to reset the backing model, but the inputs are still popuated
 on the page
   target.addComponent(form);
   }
   }
   }
 
   private MyForm myForm extends Form
   {
   public MyForm(String id, Widget myWidget)
   {   
   TextField textField = new
 TextFieldString(myField, new PropertyModelString(myWidget,
 myField));
   add(textField);
   ...
   }
   }
 }
 
 
 -
 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://old.nabble.com/Resetting-a-form-after-ajax-submit-tp27318108p27334057.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



Resetting a form after ajax submit

2010-01-25 Thread Flavius
 
I have a panel with a form on it.  I've attached an ajaxButton to submit
the form.  Afterward, I want the inputs to be reset with the backing model
reset.  I've done a lot of refreshing with an ajax submit, but I can't seem
to get the form's values to reset in the webpage.  The backing model seems
to be reset, but when I add the form (or it's individual children) to the
target,
they don't refresh.

I've done a variation of this where I have a repeating view up top and when 
that row is selected, it would populate the form, but I had to put the form
in a fragment and add the fragment to the target to get that to work.  Can
somebody tell me what I'm doing wrong here?

Thanks

public class MyPanel extends Panel
{
public MyPanel(String id, Widget myWidget)
{
MyForm myForm = new MyForm(myForm, new MyWidget());
add(myForm);
add(new AjaxButton(saveLink, myForm)
{
@Override
protected void onSubmit(AjaxRequestTarget target,
Form form)
{
//save stuff
//refresh repeating view
//now reset the form so the input fields are
cleared and there's
//a new backing model
form.clearInput();  //this isn't working
form.setDefaultModelObject(new MyWidget());
//this seems to reset the backing model, but the inputs are still popuated
on the page
target.addComponent(form);
}
}
}

private MyForm myForm extends Form
{
public MyForm(String id, Widget myWidget)
{   
TextField textField = new
TextFieldString(myField, new PropertyModelString(myWidget,
myField));
add(textField);
...
}
}
}


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



Re: Resetting a form after ajax submit

2010-01-25 Thread Flavius


I tried that.  It didn't work.

Actually Component#setDefaultModelObject() already calls
modelChanging();
model.setObject(object);
modelChanged();

I also looked at the ajax guestbook example.



igor.vaynberg wrote:
 
 call form.modelchanged() after setting the new model
 
 -igor
 
 On Mon, Jan 25, 2010 at 9:23 PM, Flavius flav...@silverlion.com wrote:

 I have a panel with a form on it.  I've attached an ajaxButton to submit
 the form.  Afterward, I want the inputs to be reset with the backing
 model
 reset.  I've done a lot of refreshing with an ajax submit, but I can't
 seem
 to get the form's values to reset in the webpage.  The backing model
 seems
 to be reset, but when I add the form (or it's individual children) to the
 target,
 they don't refresh.

 I've done a variation of this where I have a repeating view up top and
 when
 that row is selected, it would populate the form, but I had to put the
 form
 in a fragment and add the fragment to the target to get that to work.
  Can
 somebody tell me what I'm doing wrong here?

 Thanks

 public class MyPanel extends Panel
 {
        public MyPanel(String id, Widget myWidget)
        {
                MyForm myForm = new MyForm(myForm, new MyWidget());
                add(myForm);
                add(new AjaxButton(saveLink, myForm)
                {
                       �...@override
                        protected void onSubmit(AjaxRequestTarget target,
 Form form)
                        {
                                //save stuff
                                //refresh repeating view
                                //now reset the form so the input fields
 are
 cleared and there's
                                //a new backing model
                                form.clearInput();  //this isn't working
                                form.setDefaultModelObject(new
 MyWidget());
 //this seems to reset the backing model, but the inputs are still
 popuated
 on the page
                                target.addComponent(form);
                        }
                }
        }

        private MyForm myForm extends Form
        {
                public MyForm(String id, Widget myWidget)
                {
                        TextField textField = new
 TextFieldString(myField, new PropertyModelString(myWidget,
 myField));
                        add(textField);
                        ...
                }
        }
 }


 -
 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://old.nabble.com/Resetting-a-form-after-ajax-submit-tp27318108p27318409.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: Setup for stepping into wicket source in eclipse

2009-10-29 Thread Flavius


That's a good idea, Jim.  I've used Jadclipse before.  I just got in the
habit of linking to the wicket source and was stumped at something
basic like this not working right.  That actually may be better in that
as I move to newer wicket builds, I don't have to modify the project
and link to the new source.

Cheers!


Jim Pinkham wrote:
 
 You may also want to check out JadClipse - it lets you step into
 de-complied-on-the-fly versions of source code from the jar/class files of
 any 3rd party tool.
 
 http://jadclipse.sourceforge.net/wiki/index.php/Main_Page
 
 Not as good as the fully commented source of course, but often good for a
 quick answer to what's going on.
 
 -- Jim.
 On Thu, Oct 29, 2009 at 12:18 AM, Flavius flav...@silverlion.com wrote:
 

 Nicolas, yes my build automatically is checked.

 Pedro, that fixed it!  Thank you very much!



 Pedro H. O. dos Santos wrote:
 
  Debug Configuration  your server configuration  Source tab  remove
  older
  source codes from it if there is one
 
  On Tue, Oct 27, 2009 at 10:55 AM, Nicolas Melendez 
  nmelen...@getsense.com.ar wrote:
 
  is your build automatically checked?
 
  On Mon, Oct 26, 2009 at 1:07 AM, Flavius flav...@silverlion.com
 wrote:
 
  
   I am trying to debug an issue and am trying to step into wicket
   from my project.  However, the line numbers are not matching
   up with the source I have.  I've done this several times with other
   projects and this is indicative of having the wrong version of the
   source vs. the jar file.
  
   I am using eclipse version 3.5.0.v20090611a.  I'm also using
   jdk1.6.0_14.
  
   My project is setup as a java web project and I have a webapp/
   WEB-INF/lib dir with my jars.  These include wicket-1.4.3.jar,
   wicket-extensions-1.4.3.jar, and wicket-datetime-1.4.3.jar.  If I
   remove the wicket jar, the project can no longer identify any
   of the org.apache.wicket.* imports.  This tells me that it isn't
   getting a reference to derived classes.
  
   If I then either put the wicket jar back and set the source to the
   wicket-sources.jar or simply link to the
   apache-wicket-1.4.3\src\wicket\src\main\java, I still get the same
   result.
  
   As an example, when I CTRL-click on setDefaultModelObject(), it
   takes me to Component.class line 3022.  I can see it going to
   wicket-1.4.3.jar org.apache.wicket.Component in my Package
   Explorer.  However, when I actually run the code and step into
   that method (having attached the wicket-sources.jar), the method
   setDefaultModelObject is actually on line 3031.
  
   I've gone into the wicket src dir for wicket 1.4.3 and built the
 wicket
   jar and sources and pulled them from the target dir and still get
 the
   same results.
  
   Can anybody offer any insight into this?
  
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
 
 
  --
  Pedro Henrique Oliveira dos Santos
 
 

 --
 View this message in context:
 http://www.nabble.com/Setup-for-stepping-into-wicket-source-in-eclipse-tp26054432p26105471.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


 
 

-- 
View this message in context: 
http://old.nabble.com/Setup-for-stepping-into-wicket-source-in-eclipse-tp26054432p26124493.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: Setup for stepping into wicket source in eclipse

2009-10-28 Thread Flavius

Nicolas, yes my build automatically is checked.

Pedro, that fixed it!  Thank you very much!



Pedro H. O. dos Santos wrote:
 
 Debug Configuration  your server configuration  Source tab  remove
 older
 source codes from it if there is one
 
 On Tue, Oct 27, 2009 at 10:55 AM, Nicolas Melendez 
 nmelen...@getsense.com.ar wrote:
 
 is your build automatically checked?

 On Mon, Oct 26, 2009 at 1:07 AM, Flavius flav...@silverlion.com wrote:

 
  I am trying to debug an issue and am trying to step into wicket
  from my project.  However, the line numbers are not matching
  up with the source I have.  I've done this several times with other
  projects and this is indicative of having the wrong version of the
  source vs. the jar file.
 
  I am using eclipse version 3.5.0.v20090611a.  I'm also using
  jdk1.6.0_14.
 
  My project is setup as a java web project and I have a webapp/
  WEB-INF/lib dir with my jars.  These include wicket-1.4.3.jar,
  wicket-extensions-1.4.3.jar, and wicket-datetime-1.4.3.jar.  If I
  remove the wicket jar, the project can no longer identify any
  of the org.apache.wicket.* imports.  This tells me that it isn't
  getting a reference to derived classes.
 
  If I then either put the wicket jar back and set the source to the
  wicket-sources.jar or simply link to the
  apache-wicket-1.4.3\src\wicket\src\main\java, I still get the same
  result.
 
  As an example, when I CTRL-click on setDefaultModelObject(), it
  takes me to Component.class line 3022.  I can see it going to
  wicket-1.4.3.jar org.apache.wicket.Component in my Package
  Explorer.  However, when I actually run the code and step into
  that method (having attached the wicket-sources.jar), the method
  setDefaultModelObject is actually on line 3031.
 
  I've gone into the wicket src dir for wicket 1.4.3 and built the wicket
  jar and sources and pulled them from the target dir and still get the
  same results.
 
  Can anybody offer any insight into this?
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

 
 
 
 -- 
 Pedro Henrique Oliveira dos Santos
 
 

-- 
View this message in context: 
http://www.nabble.com/Setup-for-stepping-into-wicket-source-in-eclipse-tp26054432p26105471.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



Setup for stepping into wicket source in eclipse

2009-10-25 Thread Flavius
 
I am trying to debug an issue and am trying to step into wicket
from my project.  However, the line numbers are not matching
up with the source I have.  I've done this several times with other
projects and this is indicative of having the wrong version of the 
source vs. the jar file.

I am using eclipse version 3.5.0.v20090611a.  I'm also using
jdk1.6.0_14.

My project is setup as a java web project and I have a webapp/
WEB-INF/lib dir with my jars.  These include wicket-1.4.3.jar, 
wicket-extensions-1.4.3.jar, and wicket-datetime-1.4.3.jar.  If I
remove the wicket jar, the project can no longer identify any
of the org.apache.wicket.* imports.  This tells me that it isn't
getting a reference to derived classes.

If I then either put the wicket jar back and set the source to the
wicket-sources.jar or simply link to the 
apache-wicket-1.4.3\src\wicket\src\main\java, I still get the same
result.

As an example, when I CTRL-click on setDefaultModelObject(), it
takes me to Component.class line 3022.  I can see it going to
wicket-1.4.3.jar org.apache.wicket.Component in my Package 
Explorer.  However, when I actually run the code and step into
that method (having attached the wicket-sources.jar), the method
setDefaultModelObject is actually on line 3031.

I've gone into the wicket src dir for wicket 1.4.3 and built the wicket
jar and sources and pulled them from the target dir and still get the
same results.

Can anybody offer any insight into this?


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



Re: User name validation - how to check database to find if a name has already been taken?

2009-09-27 Thread Flavius


The AbstractValidator approach is fine, or you can do it the shorter
way the Igor showed.

Either way, when the page that has the username is submitted, you're
going to have to write that record to the database, even if you don't
have all the info.  The way you wrote the question, I presume you are
collecting info on multiple pages.  First page gets username et al, then
next  as in a wizard page.

When you check the username and it's not in use, write the record.
The table should have audit columns that include record_status and
last_mod_datetime.  Initially write the record with status I (in process)
and when the user is finished registering, update it with A (active).

If the user fills out page 1 and then closes the browser you'll have a
record there with status I.  You'll need a job that fires off periodically
(I do it once a day at 2 or 3am) that finds those records that are more
than, say, 24 hours old, and purges them.

Then, to quote a sith, there is no conflict.

-hth



Paul Huang wrote:
 
 
 
 Ryan Gravener-3 wrote:
 
 I think you are overcomplicating things.  Validate the users input, if
 two users want the same name within 1 second of each request you
 probably have bigger problems to deal with.  
 
 So you think my current solution (extending AbstractValidator) is OK?
 But I still need to catch nonunique exceptions when saving all user
 inputs. 
 
 
 
 
 Anyhow,  when submit is
 called, if you get a nonunique exception.  Catch in dao/service and
 throw an exception wicket can handle and present.
 Ryan Gravener
 http://bit.ly/no_word_docs
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 Can you be a little bit more specific? After I catch a nonuqniue
 exception,
 how should I change the page markup to present an error message? Any 
 examples/references  will be helpful.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/User-name-validation---how-to-check-database-to-find-if-a-name-has--already-been-taken--tp25614625p25638843.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: Form Processing problem on pages with Border - Wicket 1.4.1

2009-09-25 Thread Flavius


When I first posted this, I posted it multiple times thinking
that it wasn't going through.  Sorry about that.  Pedro S had
posted a reply to one of the duplicates I have since removed
and I wanted to put it here:

=

The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
border and visit it's components.  It's not obvious to me why this needs to
be done now in 1.4.

The objective is to notify form's event to generic containers...

When the form is submitted, the DropDownChoice's value is being reset.

you can implement the updateModel() of your DropDownChoice and implement the
behavior you are expecting, or you can require on JIRA that the wicket form
component stop notifying your components on generic containers.
http://issues.apache.org/jira/browse/WICKET-1853

=


I thought about this.  Here's the problem:  

When I change the value I really do need to update the backing model.
If I override updateModel (and don't call the super updateModel) my
backing model will never be updated when the dropdown is changed.  If
I don't override it, or do and call the super method, I'll get a null
value on every form submit from Form#component.

I put a QuickStart up here:
http://silverlion.com/flavius/BorderVisit.zip
If you unzip it and run mvn jetty:run this will demonstrate what's
going on.  Just go to the home page and press the submit button.



So overriding updateModel() isn't an option, as I see it.  My choices
that I see thus far are:

1.  Alter the wicket source code to remove the updates on Border, which
I really don't want to do because I haven't gone through everything
to see what I will break doing that.

2.  Move away from using a Border and lose the ability to swap out borders
based on role/group, etc

I would love a third option that I currently don't see.

As a side note, I can see the benefit of notifying all the components
in the border, but can't that be an optional thing?

In my onSubmit() method, I can always call
FormComponent.visitComponentsPostOrder(border, new
FormModelUpdateVisitor(this));  But with the way it is now, I have no way
to opt out of having my components updated.

Is anybody else who uses borders having an issue like this?
-- 
View this message in context: 
http://www.nabble.com/Form-Processing-problem-on-pages-with-Border---Wicket-1.4.1-tp25595716p25621988.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



Form Processing problem on pages with Border - Wicket 1.4.1

2009-09-24 Thread Flavius
I am migrating a project from 1.3.6 to 1.4.1.  I've run into a problem and
I'm not sure if this is a bug or not.

Most of the pages have a border and the border has a DropDownChoice in it
(as well as other components).  Technically it's in a panel in the border.

The Form objects are typically children of the border, like

add(border);
border.add(inputForm);

When the form is submitted, the DropDownChoice's value is being reset.  I've
traced through the code and it looks like the root of the cause is in
Form#internalUpdateFormComponentModels.

This is checking if there is a border and, if yes, then visiting all the
components of the border.

The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
border and visit it's components.  It's not obvious to me why this needs to
be done now in 1.4.

So ultimately FormComponent#visitComponentsPostOrderHelper is being called
for all components whether they are inside the form or not.

It's returning visitor.component(component), which calls Form#component and
that calls ((IFormModelUpdateListener)component).updateModel();

I looked through the nabble logs and noticed this entry here:
http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r
elated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849


Is there something I need to do here?  I'm not seeing any way of telling the
Form not to visit the Border's controls, and again, I'm not sure why it's
doing this.

I'd greatly appreciate any insight that can be offered.


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



Form Processing problem on pages with Border - Wicket 1.4.1

2009-09-23 Thread Flavius
I am migrating a project from 1.3.6 to 1.4.1.  I've run into a problem and
I'm not sure if this is a bug or not.

Most of the pages have a border and the border has a DropDownChoice in it
(as well as other components).  Technically it's in a panel in the border.

The Form objects are typically children of the border, like

add(border);
border.add(inputForm);

When the form is submitted, the DropDownChoice's value is being reset.  I've
traced through the code and it looks like the root of the cause is in
Form#internalUpdateFormComponentModels.

This is checking if there is a border and, if yes, then visiting all the
components of the border.

The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
border and visit it's components.  It's not obvious to me why this needs to
be done now in 1.4.

So ultimately FormComponent#visitComponentsPostOrderHelper is being called
for all components whether they are inside the form or not.

It's returning visitor.component(component), which calls Form#component and
that calls ((IFormModelUpdateListener)component).updateModel();

I looked through the nabble logs and noticed this entry here:
http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r
elated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849


Is there something I need to do here?  I'm not seeing any way of telling the
Form not to visit the Border's controls, and again, I'm not sure why it's
doing this.

I'd greatly appreciate any insight that can be offered.


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



Form Processing problem on pages with Border - Wicket 1.4.1

2009-09-22 Thread Flavius
I am migrating a project from 1.3.6 to 1.4.1.  I've run into a problem and
I'm not sure if this is a bug or not.

Most of the pages have a border and the border has a DropDownChoice in it
(as well as other components).  Technically it's in a panel in the border.

The Form objects are typically children of the border, like

add(border);
border.add(inputForm);

When the form is submitted, the DropDownChoice's value is being reset.  I've
traced through the code and it looks like the root of the cause is in
Form#internalUpdateFormComponentModels.

This is checking if there is a border and, if yes, then visiting all the
components of the border.

The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
border and visit it's components.  It's not obvious to me why this needs to
be done now in 1.4.

So ultimately FormComponent#visitComponentsPostOrderHelper is being called
for all components whether they are inside the form or not.

It's returning visitor.component(component), which calls Form#component and
that calls ((IFormModelUpdateListener)component).updateModel();

I looked through the nabble logs and noticed this entry here:
http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r
elated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849


Is there something I need to do here?  I'm not seeing any way of telling the
Form not to visit the Border's controls, and again, I'm not sure why it's
doing this.

I'd greatly appreciate any insight that can be offered.


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



Form Processing problem on pages with Border - Wicket 1.4.1

2009-09-21 Thread Flavius
I am migrating a project from 1.3.6 to 1.4.1.  I've run into a problem and
I'm not sure if this is a bug or not.

Most of the pages have a border and the border has a DropDownChoice in it
(as well as other components).  Technically it's in a panel in the border.

The Form objects are typically children of the border, like

add(border);
border.add(inputForm);

When the form is submitted, the DropDownChoice's value is being reset.  I've
traced through the code and it looks like the root of the cause is in
Form#internalUpdateFormComponentModels.

This is checking if there is a border and, if yes, then visiting all the
components of the border.

The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
border and visit it's components.  It's not obvious to me why this needs to
be done now in 1.4.

So ultimately FormComponent#visitComponentsPostOrderHelper is being called
for all components whether they are inside the form or not.

It's returning visitor.component(component), which calls Form#component and
that calls ((IFormModelUpdateListener)component).updateModel();

I looked through the nabble logs and noticed this entry here:
http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r
elated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849


Is there something I need to do here?  I'm not seeing any way of telling the
Form not to visit the Border's controls, and again, I'm not sure why it's
doing this.

I'd greatly appreciate any insight that can be offered.


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



Re: ModalWindow and IE8 question

2009-06-23 Thread Flavius


I cleared all cache and it still wasn't prompting the modal window.
What I did do was go and reset IE8 by going to tools - Internet Options
- Advanced tab and pressing the Reset button.  Apparently this
makes it just like a fresh install and that fixed it!

Don't ask me why clearing the cache didn't do it but that did, unless
clearing the cache and closing the browser really doesn't clear
the cache completely.  I did uncheck the Preserve Favorites website data
in the Delete Browsing History dialog.

Anyway, thanks Matej!  I appreciate your help.  




Matej Knopp-2 wrote:
 
 couldn't it be old javascript file in your browser cache?
 
 -Matej
 
 On Tue, Jun 23, 2009 at 8:25 PM, Per Lundholmper.lundh...@gmail.com
 wrote:
 I don't know if it helps, but it works with IE8 on XP so there is
 something nasty about Vista

 /Per

 On Tue, Jun 23, 2009 at 8:17 PM, Flaviusflav...@silverlion.com wrote:

 I'm starting to get users running Vista with IE8 (8.0.6001.18783)
 report that they can't open modal dialog boxes.

 I searched through nabble and jira.  I found issue 2207 which I
 understood to correct this:

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

 However, I'm testing with Wicket 1.3.6 (and extensions and datetime
 1.3.6 as well) and the modal dialog is not opening.

 I also tested this with 1.4-rc4 and it's not working there either.

 I put the examples up here:

 http://68.15.93.72/wicket-examples-1.3.6/ajax/modal-window
 http://68.15.93.72/wicket-examples-1.4-rc4/ajax/modal-window

 If I go here and try to open these with IE8 on Vista, they don't
 open.  It works with other browsers I've tested with (ff, safari 3/4,
 IE6/7).

 Can anybody give me any insight to this?
 Thanks very much.


 -
 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
 
 
 

-- 
View this message in context: 
http://www.nabble.com/ModalWindow-and-IE8-question-tp24171801p24173623.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: OutOfMemory on certain combinations of controls

2009-05-30 Thread Flavius


Thanks Igor.  I didn't think about the callback keeping a reference to the
calling page.

I appreciate your help.


igor.vaynberg wrote:
 
 the problem is the page inside the modal window has a reference to the
 outer page - you pass the modal window which has an anonymous close
 callback which keeps a reference to the page. so you keep serializing
 the entire page with every ajax request as part of the current page.
 
 you dont need the reference to the modalwindow, you can use
 ModalWindow.closeCurrent() to close it.
 
 -igor
 
 On Fri, May 29, 2009 at 1:45 PM, Flavius flav...@silverlion.com wrote:


 I put a quickstart build up at
 http://silverlion.com/tmp2/OutOfMemory.zip.

 Just unzip it, change to that dir and run mvn jetty:run and go to
 http://localhost:8080/OutOfMemory

 It has just one page, one modal window, one border, and one panel.
 The steps to repro this are there on the home page.

 Thanks for your help, Igor.



 igor.vaynberg wrote:

 there is too much going on in the sample you posted. if you want you
 can create a quickstart with the minimal amount of code necessary to
 reproduce this and i will take a look.

 -igor

 On Thu, May 28, 2009 at 2:12 PM, Flavius flav...@silverlion.com wrote:


 The sample I posted only has the single page with a link to the
 ModalWindow.
 The modal window keeps a reference to the ModalWindow param passed in
 to the constructor.  That's only used to close the window when the
 AjaxRequestTarget is passed from the AjaxLink.

 When the OnChangeAjaxBehavior#onUpdate fires, it's rebuilding the
 repeating view and adding the WebMarkupContainer wrapper to the
 AjaxRequestTarget.

 So it's not keeping any references that I see.



 igor.vaynberg wrote:

 make sure you dont keep page references across pages. that may be it.

 -igor



 --
 View this message in context:
 http://www.nabble.com/OutOfMemory-on-certain-combinations-of-controls-tp23750424p23770219.html
 Sent from the Wicket - User mailing list archive at Nabble.com.



 --
 View this message in context:
 http://www.nabble.com/OutOfMemory-on-certain-combinations-of-controls-tp23750424p23786803.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/OutOfMemory-on-certain-combinations-of-controls-tp23750424p23799634.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: OutOfMemory on certain combinations of controls

2009-05-29 Thread Flavius


I put a quickstart build up at http://silverlion.com/tmp2/OutOfMemory.zip.

Just unzip it, change to that dir and run mvn jetty:run and go to
http://localhost:8080/OutOfMemory

It has just one page, one modal window, one border, and one panel.
The steps to repro this are there on the home page.

Thanks for your help, Igor.



igor.vaynberg wrote:
 
 there is too much going on in the sample you posted. if you want you
 can create a quickstart with the minimal amount of code necessary to
 reproduce this and i will take a look.
 
 -igor
 
 On Thu, May 28, 2009 at 2:12 PM, Flavius flav...@silverlion.com wrote:


 The sample I posted only has the single page with a link to the
 ModalWindow.
 The modal window keeps a reference to the ModalWindow param passed in
 to the constructor.  That's only used to close the window when the
 AjaxRequestTarget is passed from the AjaxLink.

 When the OnChangeAjaxBehavior#onUpdate fires, it's rebuilding the
 repeating view and adding the WebMarkupContainer wrapper to the
 AjaxRequestTarget.

 So it's not keeping any references that I see.



 igor.vaynberg wrote:

 make sure you dont keep page references across pages. that may be it.

 -igor



 --
 View this message in context:
 http://www.nabble.com/OutOfMemory-on-certain-combinations-of-controls-tp23750424p23770219.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 

-- 
View this message in context: 
http://www.nabble.com/OutOfMemory-on-certain-combinations-of-controls-tp23750424p23786803.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: OutOfMemory on certain combinations of controls

2009-05-28 Thread Flavius


The sample I posted only has the single page with a link to the ModalWindow.
The modal window keeps a reference to the ModalWindow param passed in
to the constructor.  That's only used to close the window when the
AjaxRequestTarget is passed from the AjaxLink.

When the OnChangeAjaxBehavior#onUpdate fires, it's rebuilding the 
repeating view and adding the WebMarkupContainer wrapper to the
AjaxRequestTarget.

So it's not keeping any references that I see.



igor.vaynberg wrote:
 
 make sure you dont keep page references across pages. that may be it.
 
 -igor
 
 

-- 
View this message in context: 
http://www.nabble.com/OutOfMemory-on-certain-combinations-of-controls-tp23750424p23770219.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



OutOfMemory on certain combinations of controls

2009-05-27 Thread Flavius
 
I ran into an issue where I'm getting an OutOfMemory error using
autocomplete textbox functionality.

I haven't nailed down the root culprit, but the symptoms seem to
occur when I have a page with a border that also has controls,
such as a panel or two.

On the page, if I pop a modal dialog box (with ajax auto-complete) 
and type into the auto-complete textbox, after some 15-20 
key presses, I'll get the OutOfMemory error.

If I remove the reference to the window in the modal dialog
box, it doesn't occur.  Also, if I use inheritance and a child
page instead of a page with border, it doesn't seem to occur.

I'm testing this with JDK 1.6_07 and ran it in Tomcat 6.0.14.
I used Jconsole to watch the heap.  After some 15-20 key
presses, each subsequent keypress is increasing the heap
memory usage by several megs.

I looked at the heap dump in MAT and it's showing me 3 huge
byte[].  I just started using this tool.  If I'm reading this right,
it seems to have a lot of threads eating up the heap.

This might be hard to reproduce, so I put together a little
demo app that can be downloaded at 
http://silverlion.com/tmp2/wicket_test.zip. It's an eclipse
project I just zipped up.

I did all this with wicket 1.3.6, but also went back to 1.3.5
to test that.  I get the same results.

I wanted to post the question here before I opened an issue
in jira to see if anybody experienced this.

I tried running this with -Xmx256m -Xms256m and also 512
MB of memory.  I still get the error on my dev box running
tomcat in eclipse and also building the war and deploying
it to tomcat outside a dev env.


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



Inmethod Grid - adding / removing columns

2009-05-06 Thread Flavius

I just implemented the inmethod grid control (very cool, btw)
and I'm looking for a way to add and remove columns to the
grid using DnD.  

What I envision is a div opening above the grid with a list of
available columns.  The user can then drag the columns
onto the grid (ideally into the exact position they want
the column to be in).  In addition they could drag columns
from the grid onto this div.

It looks like the grid is using some yui functionality, so I
thought having a org.wicketstuff.yui.markup.html.sortable.SortableList
and a repeating view for the availableColumns list, or something
like that.

I don't see any exposed methods in the grid functionality to process
the drop functionality, though.

Before I go too far down this path, can somebody give me some 
insight as to how I can go about accomplishing this?

If I can just get an onDrop method to fire when moving items back
and forth, the rest should be straight forward (adding/removing the
column and refreshing the data).

Thanks very much.


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



Re: WicketStuff yui-parent yui examples war not deploying correctly

2009-03-23 Thread Flavius


Very cool.  Thanks guys.
I appreciate your help.


josh02 wrote:
 
 Hi
 
 I was updating yui examples but I run the examples using Jetty in eclipse.
 It was working for me. there was a missing dependency for slf4j in
 yui-example but I am not sure if had caused any problem for you in tomcat.
 
 regards
 josh
 
 
 
 
 
 
 
 
 2009/3/22 Flavius flav...@silverlion.com
 


 I just started looking at some of the JS framework integration a few days
 ago on WicketStuff.
 I am looking to do some drag  drop stuff and possibly looking for split
 pane functionality.  I
 am looking at YUI because a couple of people in here said the dnd stuff
 worked better than
 the scriptaculous dnd.

 I pulled the source from trunk this afternoon and ran the maven build
 under

 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/yui-parent
 .
 mvn install.  It says it built the project plus the two sub projects.

 [INFO] Wicket YUI Integration - Parent ... SUCCESS
 [49.375s]
 [INFO] Wicket YUI Integration  SUCCESS
 [2:02.235s]
 [INFO] Wicket YUI Integration - Examples . SUCCESS
 [21.328s]

 However, when I drop the yui-examples-1.4-SNAPSHOT.war into tomcat
 (6.0.14),
 I get an error on deployment.  It looks like some changes were checked in
 in
 the last day or so.  I went
 and pulled the 1.3.x version and built that and it starts up correctly. 
 Is
 anybody else
 getting this?

 This is my tomcat console output:

 INFO: Initializing Coyote HTTP/1.1 on http-80
 Mar 21, 2009 7:24:37 PM org.apache.catalina.startup.Catalina load
 INFO: Initialization processed in 675 ms
 Mar 21, 2009 7:24:37 PM org.apache.catalina.core.StandardService start
 INFO: Starting service Catalina
 Mar 21, 2009 7:24:37 PM org.apache.catalina.core.StandardEngine start
 INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
 Mar 21, 2009 7:24:37 PM org.apache.catalina.core.StandardContext start
 SEVERE: Error filterStart
 Mar 21, 2009 7:24:37 PM org.apache.catalina.core.StandardContext start
 SEVERE: Context [/yui-examples-1.4-SNAPSHOT] startup failed due to
 previous
 erro
 rs
 Mar 21, 2009 7:24:38 PM org.apache.coyote.http11.Http11Protocol start
 INFO: Starting Coyote HTTP/1.1 on http-80
 Mar 21, 2009 7:24:38 PM org.apache.jk.common.ChannelSocket init
 INFO: JK: ajp13 listening on /0.0.0.0:8009
 Mar 21, 2009 7:24:38 PM org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/62  config=null
 Mar 21, 2009 7:24:38 PM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 1164 ms

 Thanks very much.
 --
 View this message in context:
 http://www.nabble.com/WicketStuff-yui-parent-yui-examples-war-not-deploying-correctly-tp22642685p22642685.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


 
 

-- 
View this message in context: 
http://www.nabble.com/WicketStuff-yui-parent-yui-examples-war-not-deploying-correctly-tp22642685p22660571.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



WicketStuff yui-parent yui examples war not deploying correctly

2009-03-21 Thread Flavius


I just started looking at some of the JS framework integration a few days
ago on WicketStuff.
I am looking to do some drag  drop stuff and possibly looking for split
pane functionality.  I
am looking at YUI because a couple of people in here said the dnd stuff
worked better than
the scriptaculous dnd.

I pulled the source from trunk this afternoon and ran the maven build under
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/yui-parent.
mvn install.  It says it built the project plus the two sub projects.  

[INFO] Wicket YUI Integration - Parent ... SUCCESS
[49.375s]
[INFO] Wicket YUI Integration  SUCCESS
[2:02.235s]
[INFO] Wicket YUI Integration - Examples . SUCCESS
[21.328s]

However, when I drop the yui-examples-1.4-SNAPSHOT.war into tomcat (6.0.14),
I get an error on deployment.  It looks like some changes were checked in in
the last day or so.  I went
and pulled the 1.3.x version and built that and it starts up correctly.  Is
anybody else
getting this?

This is my tomcat console output:

INFO: Initializing Coyote HTTP/1.1 on http-80
Mar 21, 2009 7:24:37 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 675 ms
Mar 21, 2009 7:24:37 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 21, 2009 7:24:37 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Mar 21, 2009 7:24:37 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Mar 21, 2009 7:24:37 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/yui-examples-1.4-SNAPSHOT] startup failed due to previous
erro
rs
Mar 21, 2009 7:24:38 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Mar 21, 2009 7:24:38 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 21, 2009 7:24:38 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/62  config=null
Mar 21, 2009 7:24:38 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1164 ms

Thanks very much.
-- 
View this message in context: 
http://www.nabble.com/WicketStuff-yui-parent-yui-examples-war-not-deploying-correctly-tp22642685p22642685.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: Using urlFor

2009-02-05 Thread Flavius


That works.  I'll do that.
Thanks Igor.


igor.vaynberg wrote:
 
 you can mount the pages so you have well known urls to them and build
 them manually.
 
 -igor
 
 

-- 
View this message in context: 
http://www.nabble.com/Using-urlFor-tp21842522p21852518.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



Using urlFor

2009-02-04 Thread Flavius


We have functionality that needs to send an email of any changes
that occur in a record.  At first we were going to just send the
email when the transaction completes...but that will have issues
if the app is up and the mail server is down (or unreachable at the
moment).

So we're going to write the changes to the database and have
a job wake up and send the email.

I had a method that built the url on the page request, like this:

public String buildUrl(Class? extends _BasePage targetPageClass,
PageParameters pageParams)
{
String uri = urlFor(targetPageClass, pageParams).toString();
String url = RequestUtils.toAbsolutePath(uri);  
return url;
}

The problem is the job won't have an IRequestCycle to access, or
even Component.  Those are the two places I found urlFor() implemented.

It's about a half dozen pages that can be linked to, so I thought of
making static strings and building them at startup.  I can then append
the params when the job runs (it's only one param, so that's easy).

I don't have an IRequestCycle when WebApplication.init() fires, though.
Is there a straight forward way of doing this that I'm missing?

Worst case scenario, I could build the urls when the record is updated and
persist it.  I'd like to avoid that, if possible.

Thanks very much.




-- 
View this message in context: 
http://www.nabble.com/Using-urlFor-tp21842522p21842522.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 Session grows too big real fast

2008-11-29 Thread Flavius



Martijn Dashorst wrote:
 
 With Wicket 1.3 only one page should be stored in session. You should
 check if you don't keep references between pages - that would result
 in 1+N pages (with N being the number of pages you reference in your
 page).
 
 Other than that: using LDM's and DataView/DataProvider instead of
 ListView will help considerably.
 
 Martijn
 

May I ask what LDM is?  Is that Lightweight Data Model?

-- 
View this message in context: 
http://www.nabble.com/Wicket-Session-grows-too-big-real-fast-tp20697077p20754276.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket and hibernate

2008-10-02 Thread Flavius


You said you were using annotations.  Just read chapter 1 of the hibernate
annotations docs

http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#setup-configuration

create a class called HibernateUtil.class (or you can call it Fluffy.class,
but that's not as descriptive)
and add a static SessionFactory.

public static final SessionFactory sessionFactory;


Then add an initialize method to add your annotated classes with this:

AnnotationConfiguration cfg = new AnnotationConfiguration();
cfg.configure();
sessionFactory = cfg
.setInterceptor(new AuditInterceptor())
.addAnnotatedClass(User.class)
//others as needed
.buildSessionFactory();

The WebApplication object for your project has an init() method.
You can call the above method from there.  When wicket starts
up, it will call that init() method first, so you can do things like
setup your app.

Or just wrap the above in a static block and you don't have to worry 
about it.  The first time you access the HibernateUtil, the class loader
will run the static block.

Then in your methods you can just get a connection from the pool.

Session session = HibernateUtil.sessionFactory.openSession();

I do this a little differently than hibernate examples.  In the service, I
open the connection, get all the data I need and close the connection
at the end of the method.  The way Hibernate works is when your working
thread gets a connection, hibernate attaches that connection to the thread.
So throughout the lifecycle you can make references to related objects and
hibernate will go fetch them for you.  I don't like that technique,
personally.

HTH




-- 
View this message in context: 
http://www.nabble.com/wicket-and-hibernate-tp19767474p19791416.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket and hibernate

2008-10-01 Thread Flavius


Here's how I do it.

I have my wicket layer call a service layer, which calls a DAO.
I'm not a big fan of a lot of layers and I like to keep my projects
flat.

So, if you want a list of users on a page, for example, you can
use any of the canned wicket tables.  Those are pretty nice.
I use DefaultDataTable unless I need something special.  So in
your page class you do something like

DefaultDataTable defaultDataTable = new DefaultDataTable(table,
columnsList, new SortableUserDataProvider(userFilter), 10);

If this doesn't make sense look at the DefaultDataTable.java class in the
wicket examples.

In my SortableUserDataProvider, I pass in a filter obj depending on what the
user
is asking for.  This includes any search criteria, sort options, paging,
etc.

My SortableUserDataProvider calls my service.  That preps the hibernate
query
and calls my dao.

So for the SortableUserDataProvider you want to override the iterator()
method,
something like:

public IteratorUser iterator(int first, int count)
{
SortParam sp = getSort();

userFilter.setFirstRecord(first);
userFilter.setRecordsToReturn(count);
userFilter.setSortCol(sp.getProperty());
userFilter.setSortAsc(sp.isAscending());

return UserService.getUsers(userFilter).iterator();
}

I prep my queries in my service layer.  So something like

Criteria userCriteria = session.createCriteria(User.class)
.setFirstResult(filter.getFirstRecord())
//other filter info here as needed

ListUser userList = userCriteria.list();

Hibernate returns models and lists of models, and wicket
uses models and lists of models.  

The only catch with this is your web layer is getting hibernate
aware models, not POJOs.  So if it's a closed system where nobody
else hits your hibernate code, you're fine.  If the service layer
is an SOA type arch, you'll need to convert your hibernate models
(or the list), to equivalent pojos on select and vice-versa on saves.


The only thing I did which I regret was I defined my collections 
in hibernate as Lists instead of sets.  I did this because wicket 
takes a list as a param in a lot of places and Lists are generally 
easier to work with.

But hibernate treats Lists as bags and when you are doing eager fetches
on multiple collections, Hibernate will complain.  
It won't let you fetch multiple bags simultaneously.  It used to though.
They keep threatening to fix it.

http://opensource.atlassian.com/projects/hibernate/browse/HHH-1718

-- 
View this message in context: 
http://www.nabble.com/wicket-and-hibernate-tp19767474p19772328.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



MultiFileUploadField on a ModalWindow close issue

2008-09-22 Thread Flavius

I have a ModalWindow open and I have a MultiFileUploadField for users to
upload files.
Upload works great.  I'd like to close the ModalWindow when the form is
submitted.
So if everything is fine, it will do the uploads and close the window.  If
there's an
issue, it won't close the window and show the errors in the feedback.

The issue I'm having is I need an AjaxButton to close the modal window, so I
have
the AjaxRequestTarget to pass to the window.close() method.  But the 
MultiFileUploadField requires me to do a form post, which I do with a
standard
html submit button.  If I use an AjaxButton to submit the form, I don't get
the
uploads.

Is there a way to accomplish this?
-- 
View this message in context: 
http://www.nabble.com/MultiFileUploadField-on-a-ModalWindow-close-issue-tp19621418p19621418.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Item.getIndex() on DefaultDataTable

2008-06-05 Thread Flavius

I'm using a DefaultDataTable and I want to get the index of the selected
item.  However the index always returns 0.  Is this by design?

 new AbstractColumn(new Model(Test Label))
{
public void populateItem(Item item, String componentId, 
IModel model)
{
int selectedIndex = item.getIndex();  //this 
always returns 0;  
}
}

However, with a dataView, I do get the item index:

dataView = new DataView(dataview, dp)
{
@Override
protected void populateItem(final Item item)
{
int selectedIndex = item.getIndex();  
//increments by 1 with each
iteration.
}
}

I considered using a DataView instead of the DefaultDataTable, but the DDT
has the toolbars and such already nicely built in.  Looking at the code, it
seems like an Item in a DataView represents the entire row
whereas in the DataGridView from the DefaultDataTable, it represents a cell. 
Is this why the behavior
is different?

Thanks very much.
-- 
View this message in context: 
http://www.nabble.com/Item.getIndex%28%29-on-DefaultDataTable-tp17676006p17676006.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Passing Parameters to Bookmarkable Page

2007-09-20 Thread Flavius


If I pass the id, I have to persist the filter someplace, like
the session.  I try to avoid putting things on the session
since it inhibits performance of session replication in a clustered
environment.

If I could get to the requestCycle when the link is clicked, it seems
like I could pass it along the request.  But the BookmarkablePageLink
doesn't have an onClick() event.

Thinking out loud, it seems like if there were parameters that were
bookmarkable (e.g. included in the built url), and others
that were not (passed along, but not part of the generated url).

Maybe that's something that could be done on a custom RequestCycle.
Or maybe it's not so bad having the obj on the session.  :-)



Evan Chooly wrote:
 
 Put the Filter ID in the map.
 
 On 9/18/07, Flavius [EMAIL PROTECTED] wrote:


 I have two pages, a list page and a detail.  The list page
 can take a filter parameter, or has a default one if one
 is not passed (making it bookmarkable).  When the user
 clicks to go to the detail page, I want to pass that
 filter along, so that when an edit is complete, the
 page can redirect back to the list page with the same
 filter intact.  I also want the detail page to be bookmarkable.

 If the detail page gets the filter, it simply passes it back.  If
 not, that's fine too.

 I can accomplish this easily by creating a PageParameters:

 PageParameters parameters = new PageParameters();
 parameters.put(filter, filter);

 BookmarkablePageLink link = new BookmarkablePageLink(name,
 MyDetailPage.class, parameters);

 And this works fine.  But I don't like the way
 the URL is created like this:


 http://localhost/pages/MyDetailPage/item/20/filter/com.foo.bar.Filter%401ae6456/

 If the page is bookmarked, the Filter obj doesn't matter anyway.
 I understand why it's there, I'm just trying to figure out a prettier
 URL,
 like
 when I pass a parameter on the requestCycle, setting the response page
 and passing the parameters obj in there.

 I've thought of overriding the onClick event for BookmarkablePageLink,
 but
 it's final.  Another option was to pass it on the request or the session.
 That
 would be the last option.

 Any insight would be appreciated.


 --
 View this message in context:
 http://www.nabble.com/Passing-Parameters-to-Bookmarkable-Page-tf4478593.html#a12770252
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/Passing-Parameters-to-Bookmarkable-Page-tf4478593.html#a12802323
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Passing Parameters to Bookmarkable Page

2007-09-20 Thread Flavius


If the page is bookmarked, I don't care about retaining the filter.
I just want the id for the item they want to view.  But if they
clicked the link from the list page (that has a list based on the filter),
then when they return to the list page (save, cancel), I want
to pass the filter back.

The target page looks for the filter and simply passes it back.  if
there's nothing there, it passes nothing back.



Evan Chooly wrote:
 
 Having the link be both bookmarkable and having that object in the URL
 without persisting seems largely contradictory.  Relying on having the
 object in the session also reduces the effect of making it bookmarkable.
 The only option I see for making it really bookmarkable (stateless) is
 serializing the object to the URL string and deserializing in the page
 constructor.  And that's kinda ugly.
 
 On 9/20/07, Flavius [EMAIL PROTECTED] wrote:



 If I pass the id, I have to persist the filter someplace, like
 the session.  I try to avoid putting things on the session
 since it inhibits performance of session replication in a clustered
 environment.

 If I could get to the requestCycle when the link is clicked, it seems
 like I could pass it along the request.  But the BookmarkablePageLink
 doesn't have an onClick() event.

 Thinking out loud, it seems like if there were parameters that were
 bookmarkable (e.g. included in the built url), and others
 that were not (passed along, but not part of the generated url).

 Maybe that's something that could be done on a custom RequestCycle.
 Or maybe it's not so bad having the obj on the session.  :-)



 Evan Chooly wrote:
 
  Put the Filter ID in the map.
 
  On 9/18/07, Flavius [EMAIL PROTECTED] wrote:
 
 
  I have two pages, a list page and a detail.  The list page
  can take a filter parameter, or has a default one if one
  is not passed (making it bookmarkable).  When the user
  clicks to go to the detail page, I want to pass that
  filter along, so that when an edit is complete, the
  page can redirect back to the list page with the same
  filter intact.  I also want the detail page to be bookmarkable.
 
  If the detail page gets the filter, it simply passes it back.  If
  not, that's fine too.
 
  I can accomplish this easily by creating a PageParameters:
 
  PageParameters parameters = new PageParameters();
  parameters.put(filter, filter);
 
  BookmarkablePageLink link = new BookmarkablePageLink(name,
  MyDetailPage.class, parameters);
 
  And this works fine.  But I don't like the way
  the URL is created like this:
 
 
 
 http://localhost/pages/MyDetailPage/item/20/filter/com.foo.bar.Filter%401ae6456/
 
  If the page is bookmarked, the Filter obj doesn't matter anyway.
  I understand why it's there, I'm just trying to figure out a prettier
  URL,
  like
  when I pass a parameter on the requestCycle, setting the response page
  and passing the parameters obj in there.
 
  I've thought of overriding the onClick event for BookmarkablePageLink,
  but
  it's final.  Another option was to pass it on the request or the
 session.
  That
  would be the last option.
 
  Any insight would be appreciated.
 
 
  --
  View this message in context:
 
 http://www.nabble.com/Passing-Parameters-to-Bookmarkable-Page-tf4478593.html#a12770252
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Passing-Parameters-to-Bookmarkable-Page-tf4478593.html#a12802323
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/Passing-Parameters-to-Bookmarkable-Page-tf4478593.html#a12803086
Sent from the Wicket - User mailing list archive at Nabble.com.


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