DB lookup time-out within DataTable Iterator

2010-09-07 Thread Frank Prins
Hi guys!
 
Breaking my head on the following, hopefully someone might be able to
give me a hint?
 
In a page which serves a view on a log database with quite a lot of
rows, I am using a DataTable to show the rows. The data for the table is
being served by a SortableDataProvider which looks a bit like this:
 
...
  public SortableSystemlogDataProvider(Map searchParams) {
// creating new instance, set default sorting, Search parameters,
counting dataset
this.dao = new H2InterfaceDaoImpl();
setSort(sl_id, false);
this.searchParams = searchParams;
this.systemlogListSize = dao.countAllSystemlogRows(searchParams);
  }
 
  public Iterator iterator(int first, int count) {
SortParam sp = getSort();
if (sp.getProperty() == null) {
  setSort(sl_id, false);
  sp = getSort();
}
// return iterator on search list by params
paginatedList = dao.selectSystemlogs(this.searchParams,
sp.getProperty(), sp.isAscending(), first, count);
return paginatedList.iterator();
  }
...

The issue I am running into at this moment is this: in case of large
datasets, the db call from within the iterator gives a timeout, and
returns null. In this case I would like to give the user a warning
modalwindow and the possibility to change the search options. Of course
I am able to catch the timeout, and return an empty set, but I cannot
see how to move on from that, as I am already within the DataTable.

Anyone has an idea on this?

Thanks in advance, regards,
Frank Prins

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



Re: DB lookup time-out within DataTable Iterator

2010-09-07 Thread Ernesto Reinaldo Barreiro
Hi Frank,

Just an idea... If you do the filtering via AJAX  you could use the
same AJAX request to:

1- display a modal window in case you get the timeout error: just
place the ModalWindow on your page do
modalWindow.addOrReplace(new
MyErrorMessagePanel(modalWindow.getContentId())); and use
modalWindow.show(target) to show it.
2-Place your filters on a panel (orWebMarkupConatiner) that can be
update via AJAX, reset the filter bean you are using to populate the
filters and update this panel via AJAX.

Ernesto

On Tue, Sep 7, 2010 at 8:40 AM, Frank Prins frank.pr...@copernicus.nl wrote:
 Hi guys!

 Breaking my head on the following, hopefully someone might be able to
 give me a hint?

 In a page which serves a view on a log database with quite a lot of
 rows, I am using a DataTable to show the rows. The data for the table is
 being served by a SortableDataProvider which looks a bit like this:

 ...
  public SortableSystemlogDataProvider(Map searchParams) {
    // creating new instance, set default sorting, Search parameters,
 counting dataset
    this.dao = new H2InterfaceDaoImpl();
    setSort(sl_id, false);
    this.searchParams = searchParams;
    this.systemlogListSize = dao.countAllSystemlogRows(searchParams);
  }

  public Iterator iterator(int first, int count) {
    SortParam sp = getSort();
    if (sp.getProperty() == null) {
      setSort(sl_id, false);
      sp = getSort();
    }
    // return iterator on search list by params
    paginatedList = dao.selectSystemlogs(this.searchParams,
 sp.getProperty(), sp.isAscending(), first, count);
    return paginatedList.iterator();
  }
 ...

 The issue I am running into at this moment is this: in case of large
 datasets, the db call from within the iterator gives a timeout, and
 returns null. In this case I would like to give the user a warning
 modalwindow and the possibility to change the search options. Of course
 I am able to catch the timeout, and return an empty set, but I cannot
 see how to move on from that, as I am already within the DataTable.

 Anyone has an idea on this?

 Thanks in advance, regards,
 Frank Prins

 -
 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: checkGroup - 2 out of 5?

2010-09-07 Thread nino martinez wael
you an also do it server side... just check your model on submit etc..

2010/9/6 Zeldor pgronkiew...@gmail.com


 Oh, I hoped that it can be avoided. So anyone has AJAX example at hand?
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/checkGroup-2-out-of-5-tp2527723p2527763.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: checkGroup - 2 out of 5?

2010-09-07 Thread Xavier López
I'd do it with a component validator. That would avoid the Form's onSubmit
being called and getting the model updated with incorrect user data. Or also
with a FormValidator. If I remember correctly, you can call
getConvertedInput to get the Checkgroup's list of selected values.

Cheers,
Xavi

2010/9/7 nino martinez wael nino.martinez.w...@gmail.com

 you an also do it server side... just check your model on submit etc..

 2010/9/6 Zeldor pgronkiew...@gmail.com

 
  Oh, I hoped that it can be avoided. So anyone has AJAX example at hand?
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/checkGroup-2-out-of-5-tp2527723p2527763.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: StringResourceModel - On the Fly

2010-09-07 Thread Matthias Keller

Hi

Why not use one of the various methods on the localizer?
getLocalizer().getString(...)
Or if not in a component
Application.get().getResourceSettings().getLocalizer().getString(...)

Matt

On 2010-09-06 19:26, msantos wrote:

Thats solve the problem. I already have a resource bundle on the application,
but i was trying to eliminate it and just use the wicket StringResourceModel
witch is more easy to maintain all the pages of the application.

If there is no way to get the string from the .properties file of the page
on that moment, a i guess i will use the Java ResourceBundle.

Thank you all
   






smime.p7s
Description: S/MIME Cryptographic Signature


Re: checkGroup - 2 out of 5?

2010-09-07 Thread nino martinez wael
yup validator's more correct

2010/9/7 Xavier López xavil...@gmail.com

 I'd do it with a component validator. That would avoid the Form's onSubmit
 being called and getting the model updated with incorrect user data. Or
 also
 with a FormValidator. If I remember correctly, you can call
 getConvertedInput to get the Checkgroup's list of selected values.

 Cheers,
 Xavi

 2010/9/7 nino martinez wael nino.martinez.w...@gmail.com

  you an also do it server side... just check your model on submit etc..
 
  2010/9/6 Zeldor pgronkiew...@gmail.com
 
  
   Oh, I hoped that it can be avoided. So anyone has AJAX example at hand?
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/checkGroup-2-out-of-5-tp2527723p2527763.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: checkGroup - 2 out of 5?

2010-09-07 Thread Xavier López
To switch the last check with the first checked in case there are two of
them checked already, you could also use an
AjaxFormComponentUpdatingBehavior to do it server-side, though that would
only be disadvantages. I remember some nasty issues with the onchange event
on checkboxes with IE, and the server-side ajax would be just doing dom
attribute manipulations. You'll be much better off doing it with JS, as Igor
stated.

Cheers,
Xavi

2010/9/7 nino martinez wael nino.martinez.w...@gmail.com

 yup validator's more correct

 2010/9/7 Xavier López xavil...@gmail.com

  I'd do it with a component validator. That would avoid the Form's
 onSubmit
  being called and getting the model updated with incorrect user data. Or
  also
  with a FormValidator. If I remember correctly, you can call
  getConvertedInput to get the Checkgroup's list of selected values.
 
  Cheers,
  Xavi
 
  2010/9/7 nino martinez wael nino.martinez.w...@gmail.com
 
   you an also do it server side... just check your model on submit etc..
  
   2010/9/6 Zeldor pgronkiew...@gmail.com
  
   
Oh, I hoped that it can be avoided. So anyone has AJAX example at
 hand?
--
View this message in context:
   
  
 
 http://apache-wicket.1842946.n4.nabble.com/checkGroup-2-out-of-5-tp2527723p2527763.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
   
   
  
 




-- 
Klein bottle for rent--inquire within.


issue using executeAjaxEvent for a test

2010-09-07 Thread Antonio Mauriello
Hi All,

I have an issue trying to test an ajax event.

I have two different wicket classes which need to talk each other.
Both classes have a TextField plus a ListMultipleChoice. When the user
types a word into the class A textField the items of the class A list
get filtered and, based on
the new class A list choices, the class B list gets filtered as well.

To achieve that I have the following on the class A textField

//Class A
new OnChangeAjaxBehavior()
{
/**
 *
 */
private static final long serialVersionUID = 1L;

@Override
protected void onUpdate(AjaxRequestTarget target)
{

[12]  
listMultipleChoice.setDefaultModelObject(getValue(txtField.getDefaultModelObjectAsString()));
ListString selectedClassAItems = getSelected();
classB.filterByClassAItems(selectedClassAItems);
target.addComponent(classB.getListMultipleChoice());
target.addComponent(listMultipleChoice);
}
};


which actually it's working fine.

To test it I have the following

textFieldString classATextField = (TextFieldString)
classAWicketTester.getComponentFromLastRenderedPage(panel:ajaxMultiChoiceform:filterBox);
classATextField.setDefaultModelObject(filtered);

classAWicketTester.executeAjaxEvent(classATextField.getPageRelativePath(),
onchange);

ListMultipleChoiceString classAItems =
(ListMultipleChoiceString)
classAWicketTester.getComponentFromLastRenderedPage(panel:ajaxMultiChoiceform:filteredList);

assertEquals([filteredItem], 
classAItems.getChoices().toString());
ListMultipleChoiceString classBItems =
(ListMultipleChoiceString)
classBWicketTester.getComponentFromLastRenderedPage(panel:ajaxMultiChoiceform:filteredList);
assertEquals([filteredClassBItem], 
classBItems.getChoices().toString());



###

Now the issue is that for some reason using the executeAjaxEvent, to
fire the onchange event, the model into
txtField.getDefaultModelObjectAsString() (line 12) is always null
hence I cannot retrieve the text value set and filter both lists.

I've checked during the debugging the ids of the component and they
are exactly the same, so I'm sure the textField called here in line 12
is the same one used to set
classATextField.setDefaultModelObject(filtered);
but for some reason even if it's the same the model is null.

Any clue? Is executeAjaxEvent enough the fire the onUpdate?


Regards
Antonio

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



Inmethod datagrid adding aggregate rows

2010-09-07 Thread pieter_degraeuwe

Hi,

I'm looking for some hints for doing the following:

I have an Inmethod datagrid, which has the columns 'amount', 'product',
'detail', 'price'.
I would like to have at the bottom of the table (just above the paging
toolbar) an extra row which shows me the sum (total) of all prices in the
list.
How I calculate these values (sum of the showed items, or sum of ALL items),
should not matter, I want to add these cell values by just giving a model.
But, the sum() column should be located under the 'prices' column.

I did try this via a custom Toolbar, where I add a div with it's own table
element. This seems to work, but I do not get the styling right. The columns
of this table should have the same width als the columns of the 'body'
table.

Digging into the code, I saw that some javascript is used for doing the
sizing.

Can anyone give me some hints what is the best approach to get the column's
size correct? (or maybe I'm doing this completely wrong?)

Thanks ! 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Inmethod-datagrid-adding-aggregate-rows-tp2529526p2529526.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



Architect

2010-09-07 Thread Amber Miller

Hello I have a position in Chicago, IL for a Java/Wicket Architect.  Take a
look at the job description and let me know if you are interested.  This is
a 6+ month gig for a client of mine.  Interviews can happen within 24 hours
of submission and phone interviews are all that is needed.  

 

Qualifications:

Hands-on experience with large-scale Enterprise Web Development using Apache
Wicket framework

Must have architected, designed enterprise web applications, led development
with Wicket

Experience with Business Process Management System, security system (such as
CA Siteminder) and Content Management Systems etc

Strong knowledge of Websphere Portal components, services and frameworks 

Must have working experience on at least three of these application
framework(such as JSF, Struts, Wicket, Stripes or Seam, Spring and Hibernate
etc) with the ability to perform analysis, design. 

Solid verbal and written communication skills are a must.  
Have developed/architected WebServices and knowledge on WebService
standards, such as WSDL, SOAP, JAX-WS 
Full development lifecycle experience from architecture through deployment. 

 

Key Responsibilities:

As a member of the project team, develop a transform strategy for
Windows GUI application to web portal. Responsible for the design/redesign,
development and implementation of technical solutions, incorporating
peripheral knowledge of other internal applications and related technologies
in the analysis and design. 

Adhere to established methodologies, standards and guidelines.

Ensuring that proposed technology encompass the end-to-end process
which helps business leaders see the value of their functional contributions
to the broader performance objectives for an enterprise process.

Understanding the business implication of process-centric IT in
striving to achieve process excellence 

 

Professional Skill Requirements:

Excellent communication skills (both written and oral)
Strong interpersonal skills 
Ability to be flexible and work analytically in a problem solving
environment. 
Attention to Details
Strong organizational  multi-tasking skills 
Strong analytical skills and thought processes

 

 

 

Thank you,

Amber Miller

Technology Software Inc

Ph: 614-442-8400 x104

Fax: 800-803-8007

www.techsof.com

Business Objects Partner

 


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.851 / Virus Database: 271.1.1/3110 - Release Date: 09/03/10
02:34:00


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



How to run some JS only once after Ajax rendering is done ?

2010-09-07 Thread Joseph Pachod

hi

I've some components which require some client side javascript which 
require one init call (for all) to be initialized. In fact, this init 
call uses selectors to get at the components to work one.


My issues is with Ajax. It happens that, during it, some new components 
required this init call are added.


As such, how could I trigger it only once per Ajax request ?

The pattern I'm targeting is for each component to initialize this way 
to have a behavior in which something would be added only in Ajax 
request cycle. For non ajax request cycle, I use jquery to do the init, 
through:

 $(document).ready(function(){
   $.initEdit();
   });

When trying to reach this goal, I tried to run the init call through an 
header contributor, but the call is then done before my content is put 
on the page, making it useless:

public abstract class AbstractEditBehavior extends AbstractBehavior
{
   public AbstractEditBehavior(final AbstractTextComponent? component)
   {
   component.add(JQueryDependency.CORE);
   component.add(new HeaderContributor(new IHeaderContributor()
   {
   public void renderHead(final IHeaderResponse response)
   {
   if ((AjaxRequestTarget.get() != null))
   {
   response.renderJavascript(jQuery.initEdit();, ID
   + response.hashCode());
   }
   }
   }));

   }
(...)

thanks in advance
best
--

Joseph Pachod
IT

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 506
F  + 49 761 3 85 59 550
E  joseph.pac...@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter https://www.thomas-daily.de/user/sign-in für die TD 
Morning News, eine kostenlose Auswahl aktueller Themen aus TD Premium, morgens 
ab 9:15 in Ihrer Mailbox.

Aktuelle Presseinformationen für die TD Morning News und TD Premium nimmt 
unsere Redaktion unter redakt...@thomas-daily.de entgegen.
Redaktionsschluss für die TD Morning News ist täglich um 8:45.

Register free of charge at https://www.thomas-daily.de/user/sign-in to have the 
TD Morning News, a selection of the latest topics from TD Premium, delivered to 
your mailbox from 9:15 every morning.

Our editorial department receives the latest press releases for the TD Morning News and TD Premium at redakt...@thomas-daily.de. The editorial deadline for the TD Morning News is 8.45am daily. 



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



Re: Inmethod datagrid adding aggregate rows

2010-09-07 Thread Branislav Kalas

Hi i also tried this.
I ended up by positioning aggregation toolbar right after column 
headers. (as  custom toolbar which extends AbstractHeaderToolbar).
I think it is not easy to have this toolbar at the bottom (specially 
when you have enabled column resizing, because you have to bind somehow 
on resizing js)

Please write here a solution if you will find out how to do it.
On 09/07/2010 01:29 PM, pieter_degraeuwe wrote:

Hi,

I'm looking for some hints for doing the following:

I have an Inmethod datagrid, which has the columns 'amount', 'product',
'detail', 'price'.
I would like to have at the bottom of the table (just above the paging
toolbar) an extra row which shows me the sum (total) of all prices in the
list.
How I calculate these values (sum of the showed items, or sum of ALL items),
should not matter, I want to add these cell values by just giving a model.
But, the sum() column should be located under the 'prices' column.

I did try this via a custom Toolbar, where I add a div with it's owntable
element. This seems to work, but I do not get the styling right. The columns
of this table should have the same width als the columns of the 'body'
table.

Digging into the code, I saw that some javascript is used for doing the
sizing.

Can anyone give me some hints what is the best approach to get the column's
size correct? (or maybe I'm doing this completely wrong?)

Thanks !
   



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



Re: Inmethod datagrid adding aggregate rows

2010-09-07 Thread Charles Deal
My team solved the problem the same way, by using a custom Header Toolbar
under the header labels.  Couldn't find a clean way to create a footer
toolbar that matched the columns.

On Tue, Sep 7, 2010 at 9:49 AM, Branislav Kalas bka...@gmail.com wrote:

 Hi i also tried this.
 I ended up by positioning aggregation toolbar right after column headers.
 (as  custom toolbar which extends AbstractHeaderToolbar).
 I think it is not easy to have this toolbar at the bottom (specially when
 you have enabled column resizing, because you have to bind somehow on
 resizing js)
 Please write here a solution if you will find out how to do it.

 On 09/07/2010 01:29 PM, pieter_degraeuwe wrote:

 Hi,

 I'm looking for some hints for doing the following:

 I have an Inmethod datagrid, which has the columns 'amount', 'product',
 'detail', 'price'.
 I would like to have at the bottom of the table (just above the paging
 toolbar) an extra row which shows me the sum (total) of all prices in the
 list.
 How I calculate these values (sum of the showed items, or sum of ALL
 items),
 should not matter, I want to add these cell values by just giving a model.
 But, the sum() column should be located under the 'prices' column.

 I did try this via a custom Toolbar, where I add a div with it's
 owntable
 element. This seems to work, but I do not get the styling right. The
 columns
 of this table should have the same width als the columns of the 'body'
 table.

 Digging into the code, I saw that some javascript is used for doing the
 sizing.

 Can anyone give me some hints what is the best approach to get the
 column's
 size correct? (or maybe I'm doing this completely wrong?)

 Thanks !




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




Re: How to run some JS only once after Ajax rendering is done ?

2010-09-07 Thread Fabrice BUQUET
Maybe you can try IHeaderResponse.renderOnDomReadyJavascript

2010/9/7 Joseph Pachod j...@thomas-daily.de

 hi

 I've some components which require some client side javascript which
 require one init call (for all) to be initialized. In fact, this init call
 uses selectors to get at the components to work one.

 My issues is with Ajax. It happens that, during it, some new components
 required this init call are added.

 As such, how could I trigger it only once per Ajax request ?

 The pattern I'm targeting is for each component to initialize this way to
 have a behavior in which something would be added only in Ajax request
 cycle. For non ajax request cycle, I use jquery to do the init, through:
  $(document).ready(function(){
   $.initEdit();
   });

 When trying to reach this goal, I tried to run the init call through an
 header contributor, but the call is then done before my content is put on
 the page, making it useless:
 public abstract class AbstractEditBehavior extends AbstractBehavior
 {
   public AbstractEditBehavior(final AbstractTextComponent? component)
   {
   component.add(JQueryDependency.CORE);
   component.add(new HeaderContributor(new IHeaderContributor()
   {
   public void renderHead(final IHeaderResponse response)
   {
   if ((AjaxRequestTarget.get() != null))
   {
   response.renderJavascript(jQuery.initEdit();, ID
   + response.hashCode());
   }
   }
   }));

   }
 (...)

 thanks in advance
 best
 --

 Joseph Pachod
 IT

 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 506
 F  + 49 761 3 85 59 550
 E  joseph.pac...@thomas-daily.de
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947

 Registrieren Sie sich unter https://www.thomas-daily.de/user/sign-in für
 die TD Morning News, eine kostenlose Auswahl aktueller Themen aus TD
 Premium, morgens ab 9:15 in Ihrer Mailbox.

 Aktuelle Presseinformationen für die TD Morning News und TD Premium nimmt
 unsere Redaktion unter redakt...@thomas-daily.de entgegen.
 Redaktionsschluss für die TD Morning News ist täglich um 8:45.

 Register free of charge at https://www.thomas-daily.de/user/sign-in to
 have the TD Morning News, a selection of the latest topics from TD Premium,
 delivered to your mailbox from 9:15 every morning.

 Our editorial department receives the latest press releases for the TD
 Morning News and TD Premium at redakt...@thomas-daily.de. The editorial
 deadline for the TD Morning News is 8.45am daily.

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




-- 
BUQUET Fabrice


DiskPageStore with Terracotta

2010-09-07 Thread Jeremy Levy
When using Terracotta WebSessions 3.3.0 with Wicket 1.4.9 on JBoss 4.2 /
Tomcat6 the DiskPageStore grows infinitely.

After a few days our
jboss/server/myserver/work/jboss.web/localhost/[context]/[filtername]-filestore
is filled with gigabytes of data.

The terracotta folks say that they aren't doing anything specifically with
the pagestore.  I was hoping some of the wicket folks had an idea.

How does cleanup normally work, and any ideas on how I should debug it?
Should I try setting an explicit limit on the disk page store size?

JL


Re: How to run some JS only once after Ajax rendering is done ?

2010-09-07 Thread Andrea Del Bene
Joseph Pachod jp at thomas-daily.de writes:

 When trying to reach this goal, I tried to run the init call through an 
 header contributor, but the call is then done before my content is put 
 on the page, making it useless:
 public abstract class AbstractEditBehavior extends AbstractBehavior
 {
 public AbstractEditBehavior(final AbstractTextComponent? component)
 {
 component.add(JQueryDependency.CORE);
 component.add(new HeaderContributor(new IHeaderContributor()
 {
 public void renderHead(final IHeaderResponse response)
 {
 if ((AjaxRequestTarget.get() != null))
 {
 response.renderJavascript(jQuery.initEdit();, ID
 + response.hashCode());
 }
 }
 }));
 
 }
 (...)

Hi Joseph,

have you tried invoking AjaxRequestTarget's method appendJavascript? Inside if
statement try to write 
AjaxRequestTarget.get().appendJavascript(jQuery.initEdit(););

I had a similar problem some weeks ago and it worked.  
   



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



Re: Radio buttons in modal window in IE6

2010-09-07 Thread Andrea Del Bene
Grafas martynas.jurkus at gmail.com writes:

 
 
... 
 But every time I submit that form model object is NAME and in browser radio
 button jumps from whatever I checked to the first one although I never
 relaod the radio button part. Only search result container is added to a
 target to display search results.
 

Hi,

I've tried your code but it seems to work. Have you checked security
configuration of IE6? Maybe is blocking AJAX requests...
Can you check if AJAX works properly using that browser? 




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



Re: Radio buttons in modal window in IE6

2010-09-07 Thread Grafas

Strange... Yes, AJAX work perfectly - we are using AJAX in many places...
Also we use other modal windows with forms and text fields, text areas and
dropdowns in it and they work just fine... 
This modal window is the only with radio buttons

Andrea, are you using Wicket 1.3.5 for your tests?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Radio-buttons-in-modal-window-in-IE6-tp2403103p2530144.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: DiskPageStore with Terracotta

2010-09-07 Thread Igor Vaynberg
i believe the cleanup happens on session timeout. so if terractotta is
preserving sessions forever then wicket will not cleanup the
filestore. this is without me actually checking the code. you can
force a size of each file, but that file is per session, so if you
have unlimited sessions i dont think thats going to help.

-igor

On Tue, Sep 7, 2010 at 8:22 AM, Jeremy Levy jel...@gmail.com wrote:
 When using Terracotta WebSessions 3.3.0 with Wicket 1.4.9 on JBoss 4.2 /
 Tomcat6 the DiskPageStore grows infinitely.

 After a few days our
 jboss/server/myserver/work/jboss.web/localhost/[context]/[filtername]-filestore
 is filled with gigabytes of data.

 The terracotta folks say that they aren't doing anything specifically with
 the pagestore.  I was hoping some of the wicket folks had an idea.

 How does cleanup normally work, and any ideas on how I should debug it?
 Should I try setting an explicit limit on the disk page store size?

 JL


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



Error in FormTester with 1.4 but not with 1.5

2010-09-07 Thread Andrea Selva
Hi list
with the following test
public void testFormAndLinkAreSubmitted()
{
WicketTester tester = new WicketTester();
tester.startPage(FormPage.class);

FormPage page = (FormPage)tester.getLastRenderedPage();

Assert.assertFalse(page.isSubmitLinkSubmitted());
Assert.assertFalse(page.isFormSubmitted());

FormTester formTester = tester.newFormTester(form);
formTester.setValue(field, 2);//added
formTester.submitLink(link, true);

page = (FormPage)tester.getLastRenderedPage();

Assert.assertTrue(page.isFormSubmitted());
Assert.assertTrue(page.isSubmitLinkSubmitted());
tester.assertModelValue(form:field, 2);//added
}

extracted from FormPageTest present in the wicket code base i get a test
file on the line  tester.assertModelValue(form:field, 2); (the model has
value 1 (the default) instead of 2), this acts like the FormTester miss to
process something. The same test executed with wikcet 1.5-M1 (the trunk)
terminate successfully, while with official release 1.4.10 fails.
I can't imagine why  with 1.4 fail.
Is it a plan to back port on the 1.4 branch the changes that fixed this test
on the trunk?
 Best regards, thanks in advance
  Andrea


Re: DB lookup time-out within DataTable Iterator

2010-09-07 Thread Michael O'Cleirigh

 Hi Frank ,

Are you sure that your dao is setting max results on the underlying 
query?  The provider.iterator(...) should only be returning the current 
page values and typically the page size would be small like 25 to 100.


Also it depends on your backend database since I know that some (older 
version of PostgreSQL) have issues with doing a SELECT ... ORDER BY X 
LIMIT Y without looking at all of the values in the unlimited select.


If the total number of rows is reasonable (say several 1000) then just 
return the full list into Java and then use a Comparator to sort the 
loaded data according to the sort property.


In terms of handling this issue in your interface you can just have 
another component render based on the value from the provider.  If you 
can cache the results of the provider like the loadable detachable model 
does then there will only be 1 hit on the db and then you can show zero 
rows in the table and an error message label.


Regards,

Mike




Breaking my head on the following, hopefully someone might be able to
give me a hint?

In a page which serves a view on a log database with quite a lot of
rows, I am using a DataTable to show the rows. The data for the table is
being served by a SortableDataProvider which looks a bit like this:

...
   public SortableSystemlogDataProvider(Map searchParams) {
 // creating new instance, set default sorting, Search parameters,
counting dataset
 this.dao = new H2InterfaceDaoImpl();
 setSort(sl_id, false);
 this.searchParams = searchParams;
 this.systemlogListSize = dao.countAllSystemlogRows(searchParams);
   }

   public Iterator iterator(int first, int count) {
 SortParam sp = getSort();
 if (sp.getProperty() == null) {
   setSort(sl_id, false);
   sp = getSort();
 }
 // return iterator on search list by params
 paginatedList = dao.selectSystemlogs(this.searchParams,
sp.getProperty(), sp.isAscending(), first, count);
 return paginatedList.iterator();
   }
...

The issue I am running into at this moment is this: in case of large
datasets, the db call from within the iterator gives a timeout, and
returns null. In this case I would like to give the user a warning
modalwindow and the possibility to change the search options. Of course
I am able to catch the timeout, and return an empty set, but I cannot
see how to move on from that, as I am already within the DataTable.

Anyone has an idea on this?

Thanks in advance, regards,
Frank Prins

-
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: DB lookup time-out within DataTable Iterator

2010-09-07 Thread James Carman
It could be returning only 25 rows, but the criteria itself is what
makes the query slow.  In that case, I'd recommend looking at your
indexes.  Sometimes indexing doesn't help very much, though.

On Tue, Sep 7, 2010 at 2:43 PM, Michael O'Cleirigh
michael.ocleir...@rivulet.ca wrote:
  Hi Frank ,

 Are you sure that your dao is setting max results on the underlying query?
  The provider.iterator(...) should only be returning the current page values
 and typically the page size would be small like 25 to 100.

 Also it depends on your backend database since I know that some (older
 version of PostgreSQL) have issues with doing a SELECT ... ORDER BY X LIMIT
 Y without looking at all of the values in the unlimited select.

 If the total number of rows is reasonable (say several 1000) then just
 return the full list into Java and then use a Comparator to sort the loaded
 data according to the sort property.

 In terms of handling this issue in your interface you can just have another
 component render based on the value from the provider.  If you can cache the
 results of the provider like the loadable detachable model does then there
 will only be 1 hit on the db and then you can show zero rows in the table
 and an error message label.

 Regards,

 Mike



 Breaking my head on the following, hopefully someone might be able to
 give me a hint?

 In a page which serves a view on a log database with quite a lot of
 rows, I am using a DataTable to show the rows. The data for the table is
 being served by a SortableDataProvider which looks a bit like this:

 ...
   public SortableSystemlogDataProvider(Map searchParams) {
     // creating new instance, set default sorting, Search parameters,
 counting dataset
     this.dao = new H2InterfaceDaoImpl();
     setSort(sl_id, false);
     this.searchParams = searchParams;
     this.systemlogListSize = dao.countAllSystemlogRows(searchParams);
   }

   public Iterator iterator(int first, int count) {
     SortParam sp = getSort();
     if (sp.getProperty() == null) {
       setSort(sl_id, false);
       sp = getSort();
     }
     // return iterator on search list by params
     paginatedList = dao.selectSystemlogs(this.searchParams,
 sp.getProperty(), sp.isAscending(), first, count);
     return paginatedList.iterator();
   }
 ...

 The issue I am running into at this moment is this: in case of large
 datasets, the db call from within the iterator gives a timeout, and
 returns null. In this case I would like to give the user a warning
 modalwindow and the possibility to change the search options. Of course
 I am able to catch the timeout, and return an empty set, but I cannot
 see how to move on from that, as I am already within the DataTable.

 Anyone has an idea on this?

 Thanks in advance, regards,
 Frank Prins

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



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



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



Re: rendering a page for an email: org.hibernate.HibernateException: createCriteria is not valid without active transaction

2010-09-07 Thread Jeremy Thomerson
On Fri, Sep 3, 2010 at 12:10 PM, Fernando Wermus
fernando.wer...@gmail.comwrote:

 Hi all,
 I have coded the following to render a mail,


 Application app;
 try{
 app=MyApplication.get();
 }catch(Exception e){
 app=new WicketTester().getApplication();
 }
 final Application app2=app;
 final ExecutorService service = new ScheduledThreadPoolExecutor(1) {
 @Override
 protected void beforeExecute(final Thread t, final Runnable r) {
 Application.set(app2);
 };
 @Override
 protected void afterExecute(final Runnable r, final Throwable t) {
 Application.unset();
 }
 };
 service.submit(new ThreadMail(destinatarios, clazz, p));

 But, I got a org.hibernate.HibernateException: createCriteria is not valid
 without active transaction
 when I tried to load an entity in a model to be used in the PageMail.

 How can I attach the Transaction to the thread to get this working?

 thanks in advance

 --
 Fernando Wermus.

 www.linkedin.com/in/fernandowermus



This has nothing in particular to do with Wicket, and would be hard to
answer without knowing the details of what you are doing for transaction
management.

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


Re: Error in FormTester with 1.4 but not with 1.5

2010-09-07 Thread Igor Vaynberg
wicket tester in trunk and in 1.4.10 have diverged a lot due to
changes in trunk. there may not even be anything to backport, this bug
may have been fixed as part of making wickettester work with changes
in trunk.

-igor

On Tue, Sep 7, 2010 at 11:46 AM, Andrea Selva selva.an...@gmail.com wrote:
 Hi list
 with the following test
 public void testFormAndLinkAreSubmitted()
    {
        WicketTester tester = new WicketTester();
        tester.startPage(FormPage.class);

        FormPage page = (FormPage)tester.getLastRenderedPage();

        Assert.assertFalse(page.isSubmitLinkSubmitted());
        Assert.assertFalse(page.isFormSubmitted());

        FormTester formTester = tester.newFormTester(form);
                formTester.setValue(field, 2);//added
        formTester.submitLink(link, true);

        page = (FormPage)tester.getLastRenderedPage();

        Assert.assertTrue(page.isFormSubmitted());
        Assert.assertTrue(page.isSubmitLinkSubmitted());
                tester.assertModelValue(form:field, 2);//added
    }

 extracted from FormPageTest present in the wicket code base i get a test
 file on the line  tester.assertModelValue(form:field, 2); (the model has
 value 1 (the default) instead of 2), this acts like the FormTester miss to
 process something. The same test executed with wikcet 1.5-M1 (the trunk)
 terminate successfully, while with official release 1.4.10 fails.
 I can't imagine why  with 1.4 fail.
 Is it a plan to back port on the 1.4 branch the changes that fixed this test
 on the trunk?
  Best regards, thanks in advance
  Andrea


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



Re: Replicating tinyMCE

2010-09-07 Thread David Hendrix

05.09.2010 13:49, Bas Gooren:

Hi Bas,

thanks a lot! This looks like the missing part. As soon as I got this 
working, I'll come back to you with the results (it's a weekend project 
so I didn't try this right now).


David


David,

You can see an example (plus javascript code required to remove the
editor in the page source) of removing TinyMCE on the following page:
http://tinymce.moxiecode.com/examples/example_01.php

Try prepending the necessary javascript code to the AJAX request to fix
your problem.

Bas

- Original Message - From: David Hendrix
wicket-us...@unbewaff.net
To: users@wicket.apache.org
Sent: Sunday, September 05, 2010 1:43 PM
Subject: Re: Replicating tinyMCE





Hi,


I tried to add tinyMCE to my application, which seems easy enough using
the wicketstuff project. The point where I got stuck (for some hours
now) is where I start adding the component carrying the TinyMceBehavior
to any Ajax-Targets.
What I'm trying to do is to populate the textarea based on selections
from several DropDownChoices. But whenever an onChange-Event is called
that adds the textarea to it's target, another editor appears right
above the existing one containing the new content while the other editor
gets moved down, still displaying the old values.
Unfortunately I can't figure out what I'm doing wrong here...

Any ideas would be greatly appreciated

thanks
David


Nobody? It's not that strange (at least that's what I think). So it
has to be done before. Anything that I didn't provide?

David

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





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



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



Re: Radio buttons in modal window in IE6

2010-09-07 Thread andrea del bene

On 09/07/2010 07:42 PM, Grafas wrote:

Strange... Yes, AJAX work perfectly - we are using AJAX in many places...
Also we use other modal windows with forms and text fields, text areas and
dropdowns in it and they work just fine...
This modal window is the only with radio buttons

Andrea, are you using Wicket 1.3.5 for your tests?
   
Mmm...nope :), I'm using Wicket 1.4.7 for tests. Con you upgrade your 
version or are you forced to use 1.3.x release?


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



wicketstuff repo down again

2010-09-07 Thread Steve Swinsburg
Hi all,

The wicketstuff repo is down again. Is there any chance the tagged artifacts 
from the wicketstuff repo can be synced to a more reliable Maven repo (central 
even)? I have the ones I need in my own remote repo but this doesn't work for 
others that build my project.

Thanks,
Steve

smime.p7s
Description: S/MIME cryptographic signature


Re: wicketstuff repo down again

2010-09-07 Thread Michael O'Cleirigh

Hi Steve,

Wicketstuff-core artifacts have been released through the 
oss.sonatype.org repository and into central since version 1.4.7.  (with 
the latest being 1.4.10.1)


See: http://repo2.maven.org/maven2/org/wicketstuff/

Snapshots are here:  
https://oss.sonatype.org/content/repositories/snapshots/org/wicketstuff/


This is only the wicketstuff-core artifacts. If you are using non core 
artifacts then more work is going to be involved.


Regards,

Mike



Hi all,

The wicketstuff repo is down again. Is there any chance the tagged artifacts 
from the wicketstuff repo can be synced to a more reliable Maven repo (central 
even)? I have the ones I need in my own remote repo but this doesn't work for 
others that build my project.

Thanks,
Steve



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



Prompt on file upload

2010-09-07 Thread Alec Swan
Hello,

I would like to have an upload form
(org.apache.wicket.markup.html.form.Form) to prompt the user to
confirm their upload decision. I tried attaching a new
AjaxEventBehavior(onsubmit) to the form, but it does not get called.

How can I prompt the user when they initiate the upload?

Thanks,

Alec

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



Re: Prompt on file upload

2010-09-07 Thread Jeremy Thomerson
On Tue, Sep 7, 2010 at 11:35 PM, Alec Swan alecs...@gmail.com wrote:

 Hello,

 I would like to have an upload form
 (org.apache.wicket.markup.html.form.Form) to prompt the user to
 confirm their upload decision. I tried attaching a new
 AjaxEventBehavior(onsubmit) to the form, but it does not get called.

 How can I prompt the user when they initiate the upload?

 Thanks,

 Alec

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


regular old javascript?

form onsubmit=confirm('foo') wicket:id=form

/form

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


Re: How to run some JS only once after Ajax rendering is done ?

2010-09-07 Thread Bernhard Schauer
I think you could do it as follows. The js function 'bindYourEvent()' is 
called after the the components that are added to the AjaxRequestTarget 
are 're-painted'.


   form.add(new AjaxButton(set) {
   @Override
   protected void onSubmit(final AjaxRequestTarget target, 
final Form? form) {

   target.appendJavascript(bindYourEvent(););
   }

   });

mfg Bernhard

Joseph Pachod schrieb:

hi

I've some components which require some client side javascript which 
require one init call (for all) to be initialized. In fact, this init 
call uses selectors to get at the components to work one.


My issues is with Ajax. It happens that, during it, some new 
components required this init call are added.


As such, how could I trigger it only once per Ajax request ?

The pattern I'm targeting is for each component to initialize this way 
to have a behavior in which something would be added only in Ajax 
request cycle. For non ajax request cycle, I use jquery to do the 
init, through:

 $(document).ready(function(){
   $.initEdit();
   });

When trying to reach this goal, I tried to run the init call through 
an header contributor, but the call is then done before my content is 
put on the page, making it useless:

public abstract class AbstractEditBehavior extends AbstractBehavior
{
   public AbstractEditBehavior(final AbstractTextComponent? component)
   {
   component.add(JQueryDependency.CORE);
   component.add(new HeaderContributor(new IHeaderContributor()
   {
   public void renderHead(final IHeaderResponse response)
   {
   if ((AjaxRequestTarget.get() != null))
   {
   response.renderJavascript(jQuery.initEdit();, ID
   + response.hashCode());
   }
   }
   }));

   }
(...)

thanks in advance
best



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