Re: Error search message in same page

2014-06-23 Thread K
My Java code:

String JOBNUMBER = params.get(jobnumber).toString();
list = DBUtils.retrieveJob(JOBNUMBER);

if(list.size() == 0){
*/setResponsePage(SearchError.class);/*
}else{
 final DataView dataView = new DataView(jobs, new
ListDataProvider(list)) {

@Override
protected void populateItem(final Item item) {
final MYJobBean job = (MYJobBean) 
item.getModelObject();
item.add(new Label(label1, 
job.getJobNumber()));
item.add(new Label(label2, 
job.getJobType()));
item.add(new Label(label3, 
job.getJobClass()));
}

};
dataView.setItemsPerPage(10);
add(dataView);
add(new CustomPagingNavigator(navigator, dataView));

And my mark up is :


br
wicket: extend
div wicket:id=navigator/div






p class=jobdata_p
Job Number
/p


p class=jobdata_p
Job Type
/p


p class=jobdata_p
Job Class
/p





p class=jobdata_p1

/p



p class=jobdata_p1

/p



p class=jobdata_p1

/p





div wicket:id=navigator/div
/wicket: extend

I want to replace the setResponsePage(SearchError.class); so that i 
can
get rid of extra page
Initially i tried to add extra label in if condition and mark up for 
that
but it did not work.

I am new to wicket and havent got hold of it yet
Martin Grigorov-4 wrote
 Hi,
 
 What did you try so far ?
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Sat, Jun 21, 2014 at 4:14 PM, K lt;

 kondetiudaykiran@

 gt; wrote:
 
 Hi

 I am trying to build a web application in which i have to display list of
 items on search...

 this part has been done but i have to add a errror message in the same
 page
 if the search result comes out null...

 I am using DataView for displaying the results. using condition in java
 is
 simple but for the unreachable id that i mention in condition the mark up
 is
 not being rendered if the condition is true.

 any help is well appriciated...

 Thanks

 -

 K
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Error-search-message-in-same-page-tp4666331.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: 

 users-unsubscribe@.apache

 For additional commands, e-mail: 

 users-help@.apache






-

K
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-search-message-in-same-page-tp4666331p4666354.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: how to disable the table while it is empty in wicket

2014-06-23 Thread kumar ramanathan
Hi Martin,
My Issue got resolved. I have used the empty list .

Thanks,
Kumar

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-disable-the-table-while-it-is-empty-in-wicket-tp4666308p4666355.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: Error search message in same page

2014-06-23 Thread Martin Grigorov
Hi,

You can add a FeedbackPanel to the current page and in the 'if' clause you
can use #error(), #warning(), #info() methods to send feedback messages to
the user.
E.g.
if (list.size() == 0)  {
  warning(There are no results for  + JOBNUMBER);
}

// the rest is not in the 'else' clause because you you need to add Java
component for wicket:id=jobs in both cases. If the list is empty then the
DataView will be empty too
 final DataView dataView = new DataView(jobs, new
ListDataProvider(list)) {

@Override
protected void populateItem(final Item
item) {
final MYJobBean job = (MYJobBean)
item.getModelObject();
item.add(new Label(label1,
job.getJobNumber()));
item.add(new Label(label2,
job.getJobType()));
item.add(new Label(label3,
job.getJobClass()));
}

};
dataView.setItemsPerPage(10);
add(dataView);
add(new CustomPagingNavigator(navigator,
dataView));

Martin Grigorov
Wicket Training and Consulting


On Mon, Jun 23, 2014 at 9:00 AM, K kondetiudayki...@gmail.com wrote:

 My Java code:

 String JOBNUMBER = params.get(jobnumber).toString();
 list = DBUtils.retrieveJob(JOBNUMBER);

 if(list.size() == 0){
 */setResponsePage(SearchError.class);/*
 }else{
  final DataView dataView = new DataView(jobs, new
 ListDataProvider(list)) {

 @Override
 protected void populateItem(final Item
 item) {
 final MYJobBean job = (MYJobBean)
 item.getModelObject();
 item.add(new Label(label1,
 job.getJobNumber()));
 item.add(new Label(label2,
 job.getJobType()));
 item.add(new Label(label3,
 job.getJobClass()));
 }

 };
 dataView.setItemsPerPage(10);
 add(dataView);
 add(new CustomPagingNavigator(navigator,
 dataView));

 And my mark up is :


 br
 wicket: extend
 div wicket:id=navigator/div






 p class=jobdata_p
 Job Number
 /p


 p class=jobdata_p
 Job Type
 /p


 p class=jobdata_p
 Job Class
 /p





 p class=jobdata_p1

 /p



 p class=jobdata_p1

 /p



 p class=jobdata_p1

 /p





 div wicket:id=navigator/div
 /wicket: extend

 I want to replace the setResponsePage(SearchError.class); so
 that i can
 get rid of extra page
 Initially i tried to add extra label in if condition and mark up
 for that
 but it did not work.

 I am new to wicket and havent got hold of it yet
 Martin Grigorov-4 wrote
  Hi,
 
  What did you try so far ?
 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Sat, Jun 21, 2014 at 4:14 PM, K lt;

  kondetiudaykiran@

  gt; wrote:
 
  Hi
 
  I am trying to build a web application in which i have to display list
 of
  items on search...
 
  this part has been done but i have to add a errror message in the same
  page
  if the search result comes out null...
 
  I am using DataView for displaying the results. using condition in java
  is
  simple but for the unreachable id that i mention in condition the mark
 up
  is
  not being rendered if the condition is true.
 
  any help is well appriciated...
 
  Thanks
 
  -
 
  K
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Error-search-message-in-same-page-tp4666331.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail:

  users-unsubscribe@.apache

  For additional commands, e-mail:

  users-help@.apache

 
 



 -

 K
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Error-search-message-in-same-page-tp4666331p4666354.html
 Sent from the Users forum mailing list archive at Nabble.com.

 

Re: Error search message in same page

2014-06-23 Thread K
Hi Martin Grogorov

thanks a lot for the reply.
Now i realize that its simple solution...

Thanks
 

-

K
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Error-search-message-in-same-page-tp4666331p4666357.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



wicket-jquery-ui DatePicker JS problems

2014-06-23 Thread Lucio Crusca
Hi all,

I'm trying to add a (kendo?) DatePicker to my form, in other words this one:

http://www.7thweb.net/wicket-jquery-ui/datepicker/DefaultDatePickerPage

I think I've done everything listed here, adapting things to my needs:

http://www.7thweb.net/wicket-jquery-ui/

but the javascript console is showing this error and the DatePicker doesn't 
show up:

TypeError: jQuery(...).datepicker is not a function

This makes me suspect I haven't linked all the necessary js files to my HTML 
code and, to be honest, I'm afraid it's more than a suspect: I know I haven't, 
because the instructions do not tell to do that, and I assumed that was going 
to happen automagically...

More precisely, I didn't download nor link the jquery-ui js files, nor the 
kendo ones. I only dowloaded, copied and linked the jquery-ui and kendo css 
files. Should I provide for the js files also?



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



Re: wicket-jquery-ui DatePicker JS problems

2014-06-23 Thread Sebastien
Hi Lucio,

You guessed right, JS libraries are embedded in the jar(s), and attached to
the page as soon as you use a jquery-ui/kendo component. Please check
either:
- the wicket-jquery-ui jars are well deployed.
- the js are well included in the page's head

If I remember correctly, somebody had a similar problem (I dont remember
what was the issue), please have a look in the archives...

Thanks and best regards,
Sebastien
On Jun 23, 2014 3:09 PM, Lucio Crusca lu...@sulweb.org wrote:

 Hi all,

 I'm trying to add a (kendo?) DatePicker to my form, in other words this
 one:

 http://www.7thweb.net/wicket-jquery-ui/datepicker/DefaultDatePickerPage

 I think I've done everything listed here, adapting things to my needs:

 http://www.7thweb.net/wicket-jquery-ui/

 but the javascript console is showing this error and the DatePicker doesn't
 show up:

 TypeError: jQuery(...).datepicker is not a function

 This makes me suspect I haven't linked all the necessary js files to my
 HTML
 code and, to be honest, I'm afraid it's more than a suspect: I know I
 haven't,
 because the instructions do not tell to do that, and I assumed that was
 going
 to happen automagically...

 More precisely, I didn't download nor link the jquery-ui js files, nor the
 kendo ones. I only dowloaded, copied and linked the jquery-ui and kendo css
 files. Should I provide for the js files also?



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




Re: wicket-jquery-ui DatePicker JS problems

2014-06-23 Thread Lucio Crusca
In data lunedì 23 giugno 2014 14:41:37, Sebastien ha scritto:
 Hi Lucio,
 
 You guessed right, JS libraries are embedded in the jar(s), and attached to
 the page as soon as you use a jquery-ui/kendo component. Please check
 either:
 - the wicket-jquery-ui jars are well deployed.

What should I do to check that? I've already looked at page source and the js 
links are working (see below).

 - the js are well included in the page's head

I have this right after head

script type=text/javascript 
src=../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-1.11.0-
ver-139768759.js/script
script type=text/javascript 
src=../resource/com.googlecode.wicket.jquery.core.resource.JQueryUIResourceReference/jquery-
ui-1.10.4.custom-ver-1398510244000.js/script
script type=text/javascript id=jquery-datepicker-1401590941
/*![CDATA[*/
jQuery(function() { jQuery('#datanascita3f').datepicker({  }); });
/*]]*/
/script


 If I remember correctly, somebody had a similar problem (I dont remember
 what was the issue), please have a look in the archives...

Already tried, but I haven't found anything similar, maybe it's not 
immediately obvious from the message subject that the issue is what I'm 
looking for. Google didn't help either.

However I have (another) suspect: could my custom ready() function conflict 
with jquery-ui/kendo/whatever? 

$(document).ready(function(){
  $(.euro1).next(ul).slideUp(1);
  $(.tab_schedina).slideUp(1);
  $(.tab_quotemigliori).slideUp(1);
  $(.compara_link).slideUp(1);
  
  $(.euro1).click(function(){
$(this).next(ul).slideToggle(1000);
  });
  
  $(.dic_schedina).click(function(){
$(.tab_schedina).slideToggle(600);
$(.tab_quotemigliori).slideToggle(600);
$(.compara_link).slideToggle(600);
  });

});




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



Behavior and property files

2014-06-23 Thread Christian Schröter
Hi,

I would like to build a self-contained Behavior including some translations 
(property files). 
All I can think of is doing something like this within the behavior class:

@Override
public void bind(Component c) {
c.getString(„key“);
}

Unfortunately this is anything but a self-contained behavior. Does anyone has a 
better idea to solve my problem?

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



Re: Behavior and property files

2014-06-23 Thread Martin Grigorov
Hi,

c.getString() is just a shortcut to
Application.get().getResourceSettings().getLocalizer().getString() methods.

Martin Grigorov
Wicket Training and Consulting


On Mon, Jun 23, 2014 at 5:55 PM, Christian Schröter 
christian.schroe...@1und1.de wrote:

 Hi,

 I would like to build a self-contained Behavior including some
 translations (property files).
 All I can think of is doing something like this within the behavior class:

 @Override
 public void bind(Component c) {
 c.getString(„key“);
 }

 Unfortunately this is anything but a self-contained behavior. Does anyone
 has a better idea to solve my problem?

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




Re: Behavior and property files

2014-06-23 Thread Ernesto Reinaldo Barreiro
@Martin,

He probably means there is no way to attach properties to a behavior: Like
PaneA.class and PanelA.properties? I do not think BehaviorA.class and
BehaviorA.properties will work. Or am I mistaken?

@Christian

Or do you mean something different?




On Mon, Jun 23, 2014 at 5:11 PM, Martin Grigorov mgrigo...@apache.org
wrote:

 Hi,

 c.getString() is just a shortcut to
 Application.get().getResourceSettings().getLocalizer().getString() methods.

 Martin Grigorov
 Wicket Training and Consulting


 On Mon, Jun 23, 2014 at 5:55 PM, Christian Schröter 
 christian.schroe...@1und1.de wrote:

  Hi,
 
  I would like to build a self-contained Behavior including some
  translations (property files).
  All I can think of is doing something like this within the behavior
 class:
 
  @Override
  public void bind(Component c) {
  c.getString(„key“);
  }
 
  Unfortunately this is anything but a self-contained behavior. Does anyone
  has a better idea to solve my problem?
 
  Cheers,
  Chris
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 




-- 
Regards - Ernesto Reinaldo Barreiro


Re: Behavior and property files

2014-06-23 Thread Martin Grigorov
No.
Localizer#getString() works with Component only atm.
Only components have variations.
If the passed component is null then locale and style are taken from the
Session.
Once locale, style and variation are
calculated 
org.apache.wicket.settings.IResourceSettings#getStringResourceLoaders()
is being used to do the real work.
So you can roll your own BehaviorLocalizer that does the same with Behavior
instead of component.

Martin Grigorov
Wicket Training and Consulting


On Mon, Jun 23, 2014 at 6:15 PM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:

 @Martin,

 He probably means there is no way to attach properties to a behavior: Like
 PaneA.class and PanelA.properties? I do not think BehaviorA.class and
 BehaviorA.properties will work. Or am I mistaken?

 @Christian

 Or do you mean something different?




 On Mon, Jun 23, 2014 at 5:11 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi,
 
  c.getString() is just a shortcut to
  Application.get().getResourceSettings().getLocalizer().getString()
 methods.
 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Mon, Jun 23, 2014 at 5:55 PM, Christian Schröter 
  christian.schroe...@1und1.de wrote:
 
   Hi,
  
   I would like to build a self-contained Behavior including some
   translations (property files).
   All I can think of is doing something like this within the behavior
  class:
  
   @Override
   public void bind(Component c) {
   c.getString(„key“);
   }
  
   Unfortunately this is anything but a self-contained behavior. Does
 anyone
   has a better idea to solve my problem?
  
   Cheers,
   Chris
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 



 --
 Regards - Ernesto Reinaldo Barreiro



Re: Behavior and property files

2014-06-23 Thread Christian Schröter
A BehaviorA.properties would solve perfectly my problem. Is there a way to 
register a BehaviorA.properties file?

Am 23.06.2014 um 17:15 schrieb Ernesto Reinaldo Barreiro reier...@gmail.com:

 @Martin,
 
 He probably means there is no way to attach properties to a behavior: Like
 PaneA.class and PanelA.properties? I do not think BehaviorA.class and
 BehaviorA.properties will work. Or am I mistaken?
 
 @Christian
 
 Or do you mean something different?
 
 
 
 
 On Mon, Jun 23, 2014 at 5:11 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
 Hi,
 
 c.getString() is just a shortcut to
 Application.get().getResourceSettings().getLocalizer().getString() methods.
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Mon, Jun 23, 2014 at 5:55 PM, Christian Schröter 
 christian.schroe...@1und1.de wrote:
 
 Hi,
 
 I would like to build a self-contained Behavior including some
 translations (property files).
 All I can think of is doing something like this within the behavior
 class:
 
 @Override
 public void bind(Component c) {
c.getString(„key“);
 }
 
 Unfortunately this is anything but a self-contained behavior. Does anyone
 has a better idea to solve my problem?
 
 Cheers,
 Chris
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 
 -- 
 Regards - Ernesto Reinaldo Barreiro


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