Re: Re: DataTable and FilterToolbar

2012-03-05 Thread bouroy
I am having same problem with many textfields including TextFilter on
FilterToolBar within a form.

Could you please post your solution?

Many thanks,
 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataTable-Multiple-Filter-and-OrderSubmittingLink-tp3520329p4446496.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: Re: DataTable and FilterToolbar

2011-12-05 Thread cheesus
To follow up that old post of mine, the solution is of course to add a
default button, and if we don't have one, but need one, we make it
invisible:





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataTable-Multiple-Filter-and-OrderSubmittingLink-tp3520329p4160454.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: Re: DataTable and FilterToolbar

2011-05-17 Thread Tom Eicher



there is a GoAndClearFilter which can submit the search form afair


Yes, but that ons is meant for use within a form, as you write,
but not within a FilterToolbar embedded in a DataTable.

Or how would you use it / where would you put in a FilterToolbar ?
(The FilterToolbar is below the column headers, and potentially has
a filter component (text input, dropdown, ...) per column, so there
is no room for a clear and go filter)...

Thanks, Tom.

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



Re: Re: DataTable and FilterToolbar

2011-05-17 Thread Igor Vaynberg
it is meant to go into one of the columns. usually there is an
action column and this filter is meant to go with that column. if
you do not have such, simply replicate the functionality - you have
the source.

-igor

On Tue, May 17, 2011 at 11:34 AM, Tom Eicher r...@teicher.net wrote:

 there is a GoAndClearFilter which can submit the search form afair

 Yes, but that ons is meant for use within a form, as you write,
 but not within a FilterToolbar embedded in a DataTable.

 Or how would you use it / where would you put in a FilterToolbar ?
 (The FilterToolbar is below the column headers, and potentially has
 a filter component (text input, dropdown, ...) per column, so there
 is no room for a clear and go filter)...

 Thanks, Tom.

 -
 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



DataTable and FilterToolbar

2011-05-16 Thread Tom Eicher


Hi, I guess no reply means it's not a simple FAQ ;-)

So to start it easy:

If I have a DataTable, with a FilterToolbar, and
a TextFilteredPropertyColumn, how is the
TextFilteredPropertyColumn supposed to submit, i.e.
apply it's input for filtering.

Pressing ENTER will only work if there is not other
text input on the form / on the page.

Cheers, Tom.


Tom Eicher schrieb:

Hello,

(I have been unable to locate a current and working
wicketstuff mailing list, so I am sending to
wicket mailing list instead. I searched for quite
some time. This is really confusing with the old
SF list still accepting subscribe requests etc etc)

We are using wicket, wicketstuff and a colletion of
wicket best pratices found on the net. Thus, we use
DataTable with sorting and filtering.

This works great, but I noticed a few days ago, that as
soon as you have 2 or more TextFilteredPropertyColumn
in your FilterToolbar, the browser will not submit the
form upon pressing enter.

Of course this is standard behaviour for a browser, but
there must be a solution for this situation, must it not ?

I found the Form.setDefaultButton(), but this requires an
explicit (and visible) defaultSubmittingComponent, which I
don't have or want.

I also found the GoFilter / GoAndClearFilter, but these seem
to me to be for usage within a form, but not within a DataTable
FilterToolbar. (potentially, every column is occupied by a
filter - where would I put the GoFilter ?)

To submit the filters, probably some JavaScript magic is
required, BUT - the Javascript is (already) in the
Form.appendDefaultButtonField() / .onComponentTagBody(),
at least partially, is it not ?

To make it worse, we have a SubmittingOrderByLink as found
on the net, which has another funky javascript submit
magic like

protected final String getTriggerJavaScript() {
if (getForm() != null) {
// find the root form - the one we are really going to submit
Form? root = getForm().getRootForm();
StringBuffer sb = new StringBuffer(100);
sb.append(var e=document.getElementById(');
sb.append(root.getHiddenFieldId());
sb.append('); e.name=\');
sb.append(getInputName());
sb.append('; e.value='x';);
sb.append(var f=document.getElementById(');
sb.append(root.getMarkupId());
sb.append('););
if (getForm() != root) {
sb.append(var ff=document.getElementById(');
sb.append(getForm().getMarkupId());
sb.append('););
} else {
sb.append(var ff=f;);
}
sb.append(if (ff.onsubmit != undefined) { if (ff.onsubmit()==false)
return false; });
sb.append(f.submit();e.value='';e.name='';return false;);
return sb.toString();
} else {
return null;
}
}

Actually, I should not add a 3rd magic submit solution to the page,
should I ? I'm not happy with all that, and very confused.
I hope you can point me in the right direction.

Thanks in advance,
Cheers, Tom.


PS: I could not find a single place of Documentation for DataTable
 related. If there were a definite correct place in the wiki, I would
add some findings and examples later...



-
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: DataTable and FilterToolbar

2011-05-16 Thread Igor Vaynberg
there is a GoAndClearFilter which can submit the search form afair

-igor

On Mon, May 16, 2011 at 12:55 PM, Tom Eicher r...@teicher.net wrote:

 Hi, I guess no reply means it's not a simple FAQ ;-)

 So to start it easy:

 If I have a DataTable, with a FilterToolbar, and
 a TextFilteredPropertyColumn, how is the
 TextFilteredPropertyColumn supposed to submit, i.e.
 apply it's input for filtering.

 Pressing ENTER will only work if there is not other
 text input on the form / on the page.

 Cheers, Tom.


 Tom Eicher schrieb:

 Hello,

 (I have been unable to locate a current and working
 wicketstuff mailing list, so I am sending to
 wicket mailing list instead. I searched for quite
 some time. This is really confusing with the old
 SF list still accepting subscribe requests etc etc)

 We are using wicket, wicketstuff and a colletion of
 wicket best pratices found on the net. Thus, we use
 DataTable with sorting and filtering.

 This works great, but I noticed a few days ago, that as
 soon as you have 2 or more TextFilteredPropertyColumn
 in your FilterToolbar, the browser will not submit the
 form upon pressing enter.

 Of course this is standard behaviour for a browser, but
 there must be a solution for this situation, must it not ?

 I found the Form.setDefaultButton(), but this requires an
 explicit (and visible) defaultSubmittingComponent, which I
 don't have or want.

 I also found the GoFilter / GoAndClearFilter, but these seem
 to me to be for usage within a form, but not within a DataTable
 FilterToolbar. (potentially, every column is occupied by a
 filter - where would I put the GoFilter ?)

 To submit the filters, probably some JavaScript magic is
 required, BUT - the Javascript is (already) in the
 Form.appendDefaultButtonField() / .onComponentTagBody(),
 at least partially, is it not ?

 To make it worse, we have a SubmittingOrderByLink as found
 on the net, which has another funky javascript submit
 magic like

 protected final String getTriggerJavaScript() {
 if (getForm() != null) {
 // find the root form - the one we are really going to submit
 Form? root = getForm().getRootForm();
 StringBuffer sb = new StringBuffer(100);
 sb.append(var e=document.getElementById(');
 sb.append(root.getHiddenFieldId());
 sb.append('); e.name=\');
 sb.append(getInputName());
 sb.append('; e.value='x';);
 sb.append(var f=document.getElementById(');
 sb.append(root.getMarkupId());
 sb.append('););
 if (getForm() != root) {
 sb.append(var ff=document.getElementById(');
 sb.append(getForm().getMarkupId());
 sb.append('););
 } else {
 sb.append(var ff=f;);
 }
 sb.append(if (ff.onsubmit != undefined) { if (ff.onsubmit()==false)
 return false; });
 sb.append(f.submit();e.value='';e.name='';return false;);
 return sb.toString();
 } else {
 return null;
 }
 }

 Actually, I should not add a 3rd magic submit solution to the page,
 should I ? I'm not happy with all that, and very confused.
 I hope you can point me in the right direction.

 Thanks in advance,
 Cheers, Tom.


 PS: I could not find a single place of Documentation for DataTable
  related. If there were a definite correct place in the wiki, I would
 add some findings and examples later...



 -
 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