Re: Add items and then submit a form

2012-02-06 Thread Tito
Well, I solved the problem.
Just submitting the form that adds items by ajax in order to avoid the
reload of the entire page and keep fields of the other form.

Thanks!

Tito

On Tue, Jan 31, 2012 at 9:07 AM, Tito njyt...@gmail.com wrote:

 Hi, I'm working again on this. And I realized that I have a problem with
 this method.

 The problem is when I submit the form that adds items, the main form
 does't keep its state. I mean if I a complete something like 'name' then
 click 'add item' the name desapear because it is not submitted.

 Do you understand my problem?

 But if I nest forms it works but the problem are validations on main form
 when inner form is submitted.

 Thanks in advance

 Tito

 On Tue, Dec 20, 2011 at 8:38 AM, Tito njyt...@gmail.com wrote:

 Great!!
 It works ok!

 Thank you very much.

 On Tue, Dec 20, 2011 at 6:21 AM, Andrea Del Bene 
 adelb...@ciseonweb.itwrote:

 This should not be a big deal. Wicket lets you put form submitting
 button outside form itself. All you have to do to make it work is to pass
 the form to component's constructor.


 HTML code:


 form wicket:id=form1

 /form

 form wicket:id=form2
 input  type=submit value=form2 wicket:id=submit2/

 /form

 input type=submit value=form1  wicket:id=submit1/


 Java code:



 add(form1 = new Form(form1){
   @Override
protected void onSubmit() {
super.onSubmit();
System.out.println(form1);
}
   });

add(new SubmitLink(submit1, form1));

Form form2;

add(form2 =new Form(form2){
@Override
protected void onSubmit() {
super.onSubmit();
System.out.println(form2);
}
   });

form2.add(new SubmitLink(submit2));



 Button submit1 is outside its form and you have two separated form.



  I think you are right.
 Using an AjaxButton it works a litle more like I want.

 Nevertheless I still have a problem, because outer form submits inner
 form.

 In my case I think that I need two separated forms, but the problem is
 how
 to put add button y save button in the correct place. I mean, the
 layout is
 what you mentioned but the behavior is more like two separated forms.
 Thank you!

 On Mon, Dec 19, 2011 at 2:04 PM, Andrea Del Beneadelb...@ciseonweb.it
 **wrote:



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






Re: Add items and then submit a form

2012-01-31 Thread Tito
Hi, I'm working again on this. And I realized that I have a problem with
this method.

The problem is when I submit the form that adds items, the main form does't
keep its state. I mean if I a complete something like 'name' then click
'add item' the name desapear because it is not submitted.

Do you understand my problem?

But if I nest forms it works but the problem are validations on main form
when inner form is submitted.

Thanks in advance

Tito

On Tue, Dec 20, 2011 at 8:38 AM, Tito njyt...@gmail.com wrote:

 Great!!
 It works ok!

 Thank you very much.

 On Tue, Dec 20, 2011 at 6:21 AM, Andrea Del Bene adelb...@ciseonweb.itwrote:

 This should not be a big deal. Wicket lets you put form submitting button
 outside form itself. All you have to do to make it work is to pass the form
 to component's constructor.


 HTML code:


 form wicket:id=form1

 /form

 form wicket:id=form2
 input  type=submit value=form2 wicket:id=submit2/

 /form

 input type=submit value=form1  wicket:id=submit1/


 Java code:



 add(form1 = new Form(form1){
   @Override
protected void onSubmit() {
super.onSubmit();
System.out.println(form1);
}
   });

add(new SubmitLink(submit1, form1));

Form form2;

add(form2 =new Form(form2){
@Override
protected void onSubmit() {
super.onSubmit();
System.out.println(form2);
}
   });

form2.add(new SubmitLink(submit2));



 Button submit1 is outside its form and you have two separated form.



  I think you are right.
 Using an AjaxButton it works a litle more like I want.

 Nevertheless I still have a problem, because outer form submits inner
 form.

 In my case I think that I need two separated forms, but the problem is
 how
 to put add button y save button in the correct place. I mean, the layout
 is
 what you mentioned but the behavior is more like two separated forms.
 Thank you!

 On Mon, Dec 19, 2011 at 2:04 PM, Andrea Del Beneadelb...@ciseonweb.it*
 *wrote:



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





Re: Add items and then submit a form

2011-12-20 Thread Tito
Great!!
It works ok!

Thank you very much.

On Tue, Dec 20, 2011 at 6:21 AM, Andrea Del Bene adelb...@ciseonweb.itwrote:

 This should not be a big deal. Wicket lets you put form submitting button
 outside form itself. All you have to do to make it work is to pass the form
 to component's constructor.


 HTML code:


 form wicket:id=form1

 /form

 form wicket:id=form2
 input  type=submit value=form2 wicket:id=submit2/

 /form

 input type=submit value=form1  wicket:id=submit1/


 Java code:



 add(form1 = new Form(form1){
   @Override
protected void onSubmit() {
super.onSubmit();
System.out.println(form1);
}
   });

add(new SubmitLink(submit1, form1));

Form form2;

add(form2 =new Form(form2){
@Override
protected void onSubmit() {
super.onSubmit();
System.out.println(form2);
}
   });

form2.add(new SubmitLink(submit2));



 Button submit1 is outside its form and you have two separated form.



  I think you are right.
 Using an AjaxButton it works a litle more like I want.

 Nevertheless I still have a problem, because outer form submits inner
 form.

 In my case I think that I need two separated forms, but the problem is how
 to put add button y save button in the correct place. I mean, the layout
 is
 what you mentioned but the behavior is more like two separated forms.
 Thank you!

 On Mon, Dec 19, 2011 at 2:04 PM, Andrea Del Beneadelb...@ciseonweb.it**
 wrote:



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




Add items and then submit a form

2011-12-19 Thread Tito
Hi, I'm creating a page with a form.
The form asks for personal information and also for information to add some
items.

For example

General information
Name: ___
Lastname: ___

Item information
Item number: ___
Item description: __

Add item (button)

Item number | Description
1 |  something
2 |  a thing

Save (button)

I tryed with nested forms but when I click on Add item validations on
Name and LastName stop the submit. I thought on an ajax solution but i
don't know how to do it.

I mean, I need validations of general information and validations of item
information. Could you give an idea of how to do something like this?
I think it could be a standard problem.

Thanks in advance.

Tito


Re: Add items and then submit a form

2011-12-19 Thread Tito
Yes, I have this layout. Is the first I tested.

The problem with this is that when I click Add Item buttom information is
not submitted because general validations stops it. I mean, if I don't
complete name field i can't add items.

It seems like inner form submit is submitting outer form.

Thanks!

On Mon, Dec 19, 2011 at 10:16 AM, Andrea Del Bene adelb...@ciseonweb.itwrote:

 Hi,

 nested form should work fine. I mean something like this:

 _
 | main form
 | Name:..
 | Lastname:...
 |
 | 
 | | item (inner) form
 | | item number:...
 | | item number:...
 | | Add item button
 | |__
 |
 | save button
 |___

 Do you have this forms layout? 'Add item button' must be added to 'item
 form' and only to this form.

  Hi, I'm creating a page with a form.
 The form asks for personal information and also for information to add
 some
 items.

 For example

 General information
 Name: ___
 Lastname: ___

 Item information
 Item number: ___
 Item description: __

 Add item (button)

 Item number | Description
 1 |  something
 2 |  a thing

 Save (button)

 I tryed with nested forms but when I click on Add item validations on
 Name and LastName stop the submit. I thought on an ajax solution but i
 don't know how to do it.

 I mean, I need validations of general information and validations of item
 information. Could you give an idea of how to do something like this?
 I think it could be a standard problem.

 Thanks in advance.

 Tito



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




Re: Add items and then submit a form

2011-12-19 Thread Tito
Here I have something like a QuickStart.
In this reduced example I can verify this behavior. I checked that link but
it seems to work different.

In this case both submit button do the same. I'm using wicket 1.4.19.


package com.keepcon.web.administration.users;

import java.util.ArrayList;
import java.util.Collection;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.RequiredTextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;


public class NestedForms extends WebPage {

@SuppressWarnings(unused)
private String name;
 private final CollectionString values = new ArrayListString();

public NestedForms() {
 FormVoid outerForm = new FormVoid(outerForm);
PropertyModelString nameModel = new PropertyModelString(this, name);
 outerForm.add(new RequiredTextFieldString(name, nameModel));

final IModelString valueModel = new ModelString();

FormVoid innerForm = new FormVoid(innerForm) {
@Override
 protected void onSubmit() {
values.add(valueModel.getObject());
valueModel.setObject();
 }
};

innerForm.add(new RequiredTextFieldString(value, valueModel));

outerForm.add(innerForm);

outerForm.add(new Label(values, new AbstractReadOnlyModelString() {

@Override
public String getObject() {
return NestedForms.this.values.toString();
 }
}));
outerForm.add(new Label(nameSubmitted, nameModel));

add(outerForm);
add(new FeedbackPanel(feedback));
 }
}



!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html
xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd

head/head
body
div wicket:id=feedback/div
form wicket:id=outerForm
 table
tr
tdName:/td
 tdinput type=text wicket:id=name //td
/tr
 /table
form wicket:id=innerForm
table
 tr
tdValue:/td
tdinput type=text wicket:id=value //td
 /tr
tr
tdinput type=submit value=Add //td
 td/td
/tr
/table
 /form
table
tr
 tdinput type=submit value=Save //td
td/td
 /tr
tr
tdDatos subidos:/td
 td/td
/tr
tr
 tdName:/td
tdspan wicket:id=nameSubmitted/span/td
 /tr
tr
tdValues:/td
 tdspan wicket:id=values/span/td
/tr
 /table
/form
/body
/html



On Mon, Dec 19, 2011 at 11:10 AM, Andrea Del Bene adelb...@ciseonweb.itwrote:

 This is strange end should not happened: https://cwiki.apache.org/**
 WICKET/nested-forms.htmlhttps://cwiki.apache.org/WICKET/nested-forms.html.
 Maybe the problem is on code side. Can you show the initialization code for
 the two forms?

  Yes, I have this layout. Is the first I tested.

 The problem with this is that when I click Add Item buttom information is
 not submitted because general validations stops it. I mean, if I don't
 complete name field i can't add items.

 It seems like inner form submit is submitting outer form.

 Thanks!

 On Mon, Dec 19, 2011 at 10:16 AM, Andrea Del Beneadelb...@ciseonweb.it*
 *wrote:

  Hi,

 nested form should work fine. I mean something like this:

 _
 |main form
 | Name:..
 | Lastname:...
 |
 | 
 | |item (inner) form
 | | item number:...
 | | item number:...
 | |Add item button
 | |__
 |
 |save button
 |___

 Do you have this forms layout? 'Add item button' must be added to 'item
 form' and only to this form.

  Hi, I'm creating a page with a form.

 The form asks for personal information and also for information to add
 some
 items.

 For example

 General information
 Name: ___
 Lastname: ___

 Item information
 Item number: ___
 Item description: __

 Add item (button)

 Item number | Description
 1 |  something
 2 |  a thing

 Save (button)

 I tryed with nested forms but when I click on Add item validations on
 Name and LastName stop the submit. I thought on an ajax solution but i
 don't know how to do it.

 I mean, I need validations of general information and validations of
 item
 information. Could you give an idea of how to do something like this?
 I think it could be a standard problem.

 Thanks in advance.

 Tito


  --**
 --**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apa**che.orghttp://apache.org
 users-unsubscribe@**wicket.apache.orgusers-unsubscr...@wicket.apache.org
 

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




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




Re: Add items and then submit a form

2011-12-19 Thread Tito
I think you are right.
Using an AjaxButton it works a litle more like I want.

Nevertheless I still have a problem, because outer form submits inner form.

In my case I think that I need two separated forms, but the problem is how
to put add button y save button in the correct place. I mean, the layout is
what you mentioned but the behavior is more like two separated forms.

Thank you!

On Mon, Dec 19, 2011 at 2:04 PM, Andrea Del Bene adelb...@ciseonweb.itwrote:

 I think this happens because you submit your forms with a simple HTML
 submit button, not mapped to a Wicket component.  Try to explicitly add a
 submit component to the forms. I've added SubmitLink to both forms and
 forms are submitted as expected.

 HTML code:

 form wicket:id=form1
 form wicket:id=form2
 input  type=submit value=form2 wicket:id=submit2/

 /form

 input type=submit value=form1 (outer)  wicket:id=submit1/
 /form


 Java code:

  Form form1;
add(form1 = new Form(form1){
   @Override
protected void onSubmit() {
super.onSubmit();
System.out.println(form1);
}
   });

form1.add(new SubmitLink(submit1));

Form form2;
form1.add(form2 =new Form(form2){
   @Override
protected void onSubmit() {
super.onSubmit();
System.out.println(form2);
}
   });

form2.add(new SubmitLink(submit2));


  Here I have something like a QuickStart.
 In this reduced example I can verify this behavior. I checked that link
 but
 it seems to work different.

 In this case both submit button do the same. I'm using wicket 1.4.19.



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




Re: freezing applications

2011-12-19 Thread Tito
Do you have a security filter?
I think may be you have the session expired and ajax requests don't get
wicket filter.


On Mon, Dec 19, 2011 at 3:33 PM, danisevsky danisev...@gmail.com wrote:

 Hello, our application is one page and everything is done by ajax. And
 tester says that when he comes from lunch all buttons are dead.
 Nothing happen when he clicks on links or buttons. I can't reproduce
 this behavior because on my machine I always get pageExpiredException
 (what is required). Is it possible to have dead wicket ajax components
 when server is running? We are running on Wicket 1.4.18.

 Thanks

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




Re: Chained dropdowns

2011-11-22 Thread Tito
Let me use the real situation:

Client 1--* Account 1--* Context 1--* Schedule

Here is the code simplified as much I can. If you think I have to add
something else just tell me:

public class AssignationPanel extends Panel {

 @SpringBean
private WSServicesIF services;
 private IModelListString assignationRolsModel = new
AssignationRolsModel();

public AssignationPanel(String id, IModelAssignationBean model) {
 super(id, model);

 final FormVoid form = new FormVoid(form);

final PropertyModelClient selectedClient = new
PropertyModelClient(model, client);
 final PropertyModelAccount selectedAccount = new
PropertyModelAccount(model, account);
 final PropertyModelContentType selectedContext = new
PropertyModelContentType(model, context);

final Component clientSelector = new DropDownChoiceClient(clients,
selectedClient, new ClientsModel(services), new
ClientRenderer()).setNullValid(false);
 final Component accountSelector = new DropDownChoiceAccount(accounts,
selectedAccount, new AccountsOfClientModel(selectedClient, services), new
AccountRenderer()).setNullValid(false).setOutputMarkupId(true);
 final Component contextSelector = new
DropDownChoiceContentType(contexts, selectedContext, new
ContextsOfAccountModel(selectedAccount, services), new
ContextRenderer()).setNullValid(false).setOutputMarkupId(true);
 final Component scheduleSelector = new
DropDownChoiceSchedule(schedule, new PropertyModelSchedule(model,
schedule), new SchedulesOfContextModel(selectedContext, services), new
ScheduleRenderer()).setNullValid(false).setOutputMarkupId(true);
 clientSelector.add(new AjaxFormComponentUpdatingBehavior(onChange) {

@Override
 protected void onUpdate(AjaxRequestTarget target) {
target.addComponent(accountSelector);
 target.addComponent(contextSelector);
target.addComponent(scheduleSelector);
 }
});
 accountSelector.add(new AjaxFormComponentUpdatingBehavior(onChange) {

@Override
 protected void onUpdate(AjaxRequestTarget target) {
target.addComponent(contextSelector);
 target.addComponent(scheduleSelector);
}
 });
contextSelector.add(new AjaxFormComponentUpdatingBehavior(onChange) {

@Override
 protected void onUpdate(AjaxRequestTarget target) {
target.addComponent(scheduleSelector);
 }
});

form.add(clientSelector);
 form.add(accountSelector);
form.add(contextSelector);
 form.add(scheduleSelector, new
SimpleMessageComponentFeedbackPanel(scheduleError, scheduleSelector));

add(form);
 }
}

public class ClientsModel extends LoadableDetachableModelListClient {

private WSServicesIF services;

public ClientsModel(WSServicesIF services) {
 this.services = services;
}

@Override
 protected ListClient load() {
return new ArrayListClient(services.getClients());
 }
}

public class AccountsOfClientModel extends
LoadableDetachableModelListAccount {

 private WSServicesIF services;
private IModelClient client;

 public AccountsOfClientModel(IModelClient client, WSServicesIF services)
{
this.services = services;
 this.client = client;
}

@Override
 protected ListAccount load() {
Client object = client.getObject();
 if (object == null) {
return new ArrayListAccount();
} else {
 return services.getSortedAccounts(object.getId().toString());
}
}
}

public class ContextsOfAccountModel extends
LoadableDetachableModelListContentType {

private WSServicesIF services;
 private IModelAccount account;

public ContextsOfAccountModel(IModelAccount account, WSServicesIF
services) {
 this.account = account;
this.services = services;
}

@Override
protected ListContentType load() {
Account object = account.getObject();
 if (object == null || object.getId() == null) {
return new ArrayListContentType();
 } else {
return services.getContentTypeForAccount(object.getId().toString());
 }
}
}

public class SchedulesOfContextModel extends
LoadableDetachableModelListSchedule {

private WSServicesIF services;
private IModelContentType context;

public SchedulesOfContextModel(IModelContentType context, WSServicesIF
services) {
this.context = context;
 this.services = services;
}

@Override
 protected ListSchedule load() {
ContentType object = context.getObject();
 if (object == null) {
return new ArrayListSchedule();
} else {
 return new
ArrayListSchedule(services.getSchedulesForContext(object.getId().toString()));
}
 }
}



First is the code of a panel with dropdowns and then I pasted models of
choices to show the way I provide options. I can't see the problem, and in
a way is working, but fails following steps I mentioned in my previous mail.

Thanks for helping!


Norberto

2011/11/19 Jeremy Thomerson jer...@wickettraining.com

 show the code

 On Fri, Nov 18, 2011 at 1:36 PM, Tito njyt...@gmail.com wrote:

  Hi, I'm trying to connect three drowpdowns.
 
  For example.
 
  combo1: Country
  combo2: Province
  combo3: City
 
  I'm updating dropdowns by Ajax with
  AjaxFormComponentUpdatingBehavior(onChange) and it works ok.
  But if you choose a Country, then a Province, then a City and after that
  you change the Country, the Province changes

Re: Radio button selection

2011-11-22 Thread Tito
I think I can give you another option based on Alexander's code. I added
comments to explain how does it works. I didn't test it but If you have any
problem just tell me:

// model that indicates if I have to show the textfield
 final IModelBoolean yesNoState = new ModelBoolean();

// this is because when textfield is hidden you can't reference it by
markupid because html component doesn't exists.
 final WebMarkupContainer fieldContainer = new
WebMarkupContainer(fieldContainer);
 // this indicates wicket to create an id for tag. Necesary to update by
ajax.
 fieldContainer.setOutputMarkupId(true);

 // textfield to show with isVisible redifined based on previous model
 final TextFieldString textField = new TextFieldString(text) {

@Override
 public boolean isVisible() {
return yesNoState.getObject();
 }
};
 fieldContainer.add(textField);

 // just a component to agrupate options
RadioGroupBoolean yesNoGroup = new RadioGroupBoolean(yesNoGroup,
yesNoState);
 yesNoGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

 @Override
protected void onUpdate(AjaxRequestTarget target) {
 // this is to update container by ajax and consequently textField
visibility.
 target.addComponent(fieldContainer);
}
 });

 yesNoGroup.add(new RadioBoolean(yes, Model.of(Boolean.TRUE)), new
RadioBoolean(no, Model.of(Boolean.FALSE)));

add(fieldContainer);
 add(yesNoGroup);


I hope that helps you.

Bye

Norberto



2011/11/20 ridaa ridaa...@yahoo.com

 Hey thanx alot ...!!
 It would be really very helpful if i could get some explanation on above
 code.

 Regards.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Radio-button-selection-tp4085827p4088663.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: LoadableDetachableModel getObject not final

2011-11-21 Thread Tito
Hi Igor,

Exactly, that is the reason because I'm proposing to make getObject final.
I think it's not ok to override getObject.

What do you think?

2011/11/18 Igor Vaynberg igor.vaynb...@gmail.com

 getObject() is what defines the contract of load(). if we make it
 overridable the user can then break the load() function - for example
 by not calling it from the override.

 why would you want to override getobject()?

 -igor

 On Fri, Nov 18, 2011 at 10:39 AM, Tito njyt...@gmail.com wrote:
  Hi,
 
  I'm wondering if it is ok not to do 'final' this method.
  Correct me if I'm wrong but I think it is not normal to Override this
  method because we always have to Override load().
 
  It's just a question to know what do you think.
 
  Thanks!
 
  Norberto
 

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




Re: LoadableDetachableModel getObject not final

2011-11-21 Thread Tito
Created: https://issues.apache.org/jira/browse/WICKET-4253

Thanks you

2011/11/21 Igor Vaynberg igor.vaynb...@gmail.com

 ah, lol. I thought it was final now and you wanted to make non final... :)
 open a jira...

 -igor
 On Nov 21, 2011 11:36 AM, Tito njyt...@gmail.com wrote:

  Hi Igor,
 
  Exactly, that is the reason because I'm proposing to make getObject
 final.
  I think it's not ok to override getObject.
 
  What do you think?
 
  2011/11/18 Igor Vaynberg igor.vaynb...@gmail.com
 
   getObject() is what defines the contract of load(). if we make it
   overridable the user can then break the load() function - for example
   by not calling it from the override.
  
   why would you want to override getobject()?
  
   -igor
  
   On Fri, Nov 18, 2011 at 10:39 AM, Tito njyt...@gmail.com wrote:
Hi,
   
I'm wondering if it is ok not to do 'final' this method.
Correct me if I'm wrong but I think it is not normal to Override this
method because we always have to Override load().
   
It's just a question to know what do you think.
   
Thanks!
   
Norberto
   
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 



LoadableDetachableModel getObject not final

2011-11-18 Thread Tito
Hi,

I'm wondering if it is ok not to do 'final' this method.
Correct me if I'm wrong but I think it is not normal to Override this
method because we always have to Override load().

It's just a question to know what do you think.

Thanks!

Norberto


Re: DataView or GridView with two columns by item

2011-10-26 Thread Tito
Thank you Igor!
I forgot that. It works ok!

Tito

2011/10/25 Igor Vaynberg igor.vaynb...@gmail.com

 you never say item.add(contentRow, detailsRow);

 and you dont need to override newItem() at all

 -igor

 On Tue, Oct 25, 2011 at 8:30 AM, Tito njyt...@gmail.com wrote:
  I thought that I had to create Items on newItem method.
  Anyway, I tried this but it doesn't work. Perhaps I'm doing something
 wrong,
  this is my test:
 
  @Override
   protected void populateItem(ItemDedication item) {
  DateFormat formatter = new SimpleDateFormat(hh:mm);
   final Dedication dedication = item.getModelObject();
  ItemDedication contentRow = new OddEvenItemDedication(content,
  item.getIndex(), item.getModel());
   ItemDedication detailsRow = new OddEvenItemDedication(details,
  item.getIndex(), item.getModel());
  contentRow.add(new Label(timeFrom,
   formatter.format(dedication.getTimeFrom(;
   contentRow.add(new Label(timeTo,
   formatter.format(dedication.getTimeTo(;
  contentRow.add(new Label(hours, dedication.getHours().toString()));
   contentRow.add(new Label(task, dedication.getTask().getName()));
  contentRow.add(new Label(accounts, getAccounts(dedication)));
   detailsRow.add(new TextAreaString(serviceStatus, new
  PropertyModelString(item.getModel(), serviceStatus)));
   }
 
  @Override
  protected ItemDedication newItem(String id, int index,
 IModelDedication
  model) {
   return new ItemDedication(id, index, model);
  }
 
  And html:
 
  wicket:container wicket:id=dedications
  tr wicket:id=content
   tdspan wicket:id=hours[horas]/span/td
  tdspan wicket:id=timeFrom[hora desde]/span]/td
   tdspan wicket:id=timeTo[hora hasta]/span]/td
  tdspan wicket:id=task[tarea]/span/td
   tdspan wicket:id=accounts[cuentas]/span/td
  /tr
   tr wicket:id=details
  td colspan=5
   input wicket:id=serviceStatus /
  /td
  /tr
   /wicket:container
 
 
  2011/10/25 Igor Vaynberg igor.vaynb...@gmail.com
 
  populateitem(item) {
   OddEvenItem tr1=new OddEvenItem(tr1, item.getindex(),
 item.getmodel());
   OddEvenItem tr2=new OddEvenItem(tr1, item.getindex(),
 item.getmodel());
   item.add(tr1, tr2);
 
   tr1.add(...);
   tr2.add(...);
  }
 
  -igor
 
 
  On Tue, Oct 25, 2011 at 7:37 AM, Tito njyt...@gmail.com wrote:
   Yes I tried but the problem is I can't get MarkupContainer to add the
   AttributeModifierBehavior.
   I don't know how to get a container that represents tr tag.
  
   2011/10/25 Josh Kamau joshnet2...@gmail.com
  
   Have you tried using attributeModifiers or attributeAppenders to add
 or
   modify a css class?
  
   Josh
  
  
   On Tue, Oct 25, 2011 at 4:21 PM, Tito njyt...@gmail.com wrote:
  
Yes, but I think this is not the problem.
I have not problems with wicket:container, my problem is that I
 can't
modify
class attribute of tr to add Odd or Even.
   
Tito
   
2011/10/25 Josh Kamau joshnet2...@gmail.com
   
 You can always use component#renderBodyOnly(true) method to
 ensure
  that
the
 containers markup is not rendered.

 Josh.

 On Tue, Oct 25, 2011 at 2:33 PM, Tito njyt...@gmail.com wrote:

  Hi,
 
  Wicket container works ok!
  But making trs webmarkupcontainers doesn't allow me to populate
  items
of
  the
  table because it change hierarchy of components, and I can't
 get
  WebMarkupContainers from Item.
 
  I mean, before I had:
 
  wicket:container wicket:id=dedications
  tr
   tdspan wicket:id=hours[horas]/span/td
  tdspan wicket:id=timeFrom[hora desde]/span]/td
   tdspan wicket:id=timeTo[hora hasta]/span]/td
  tdspan wicket:id=task[tarea]/span/td
   tdspan wicket:id=accounts[cuentas]/span/td
  /tr
   tr
  td colspan=5
  input wicket:id=serviceStatus /
   /td
  /tr
  /wicket:container
 
  And I populated items in this way:
 
  @Override
  protected void populateItem(ItemDedication item) {
   DateFormat formatter = new SimpleDateFormat(hh:mm);
  final Dedication dedication = item.getModelObject();
   item.add(new Label(timeFrom,
   formatter.format(dedication.getTimeFrom(;
  item.add(new Label(timeTo,
 formatter.format(dedication.getTimeTo(;
   item.add(new Label(hours,
 dedication.getHours().toString()));
  item.add(new Label(task, dedication.getTask().getName()));
   item.add(new Label(accounts, getAccounts(dedication)));
  item.add(new TextAreaString(serviceStatus, new
  PropertyModelString(item.getModel(), serviceStatus)));
   }
 
 
  But now if I do this in order to add Odd, Even classes:
 
  wicket:container wicket:id=dedications
   tr wicket:id=content
  tdspan wicket:id=hours[horas]/span/td
   tdspan wicket:id=timeFrom[hora desde]/span]/td
  tdspan wicket:id=timeTo[hora hasta]/span]/td
   tdspan wicket:id=task[tarea]/span/td
  tdspan wicket:id=accounts[cuentas]/span/td
   /tr
  tr wicket:id=details

Re: DataView or GridView with two columns by item

2011-10-25 Thread Tito
Hi,

Wicket container works ok!
But making trs webmarkupcontainers doesn't allow me to populate items of the
table because it change hierarchy of components, and I can't get
WebMarkupContainers from Item.

I mean, before I had:

wicket:container wicket:id=dedications
tr
 tdspan wicket:id=hours[horas]/span/td
tdspan wicket:id=timeFrom[hora desde]/span]/td
 tdspan wicket:id=timeTo[hora hasta]/span]/td
tdspan wicket:id=task[tarea]/span/td
 tdspan wicket:id=accounts[cuentas]/span/td
/tr
 tr
td colspan=5
input wicket:id=serviceStatus /
 /td
/tr
/wicket:container

And I populated items in this way:

@Override
protected void populateItem(ItemDedication item) {
 DateFormat formatter = new SimpleDateFormat(hh:mm);
final Dedication dedication = item.getModelObject();
 item.add(new Label(timeFrom,
 formatter.format(dedication.getTimeFrom(;
item.add(new Label(timeTo,  formatter.format(dedication.getTimeTo(;
 item.add(new Label(hours, dedication.getHours().toString()));
item.add(new Label(task, dedication.getTask().getName()));
 item.add(new Label(accounts, getAccounts(dedication)));
item.add(new TextAreaString(serviceStatus, new
PropertyModelString(item.getModel(), serviceStatus)));
 }


But now if I do this in order to add Odd, Even classes:

wicket:container wicket:id=dedications
 tr wicket:id=content
tdspan wicket:id=hours[horas]/span/td
 tdspan wicket:id=timeFrom[hora desde]/span]/td
tdspan wicket:id=timeTo[hora hasta]/span]/td
 tdspan wicket:id=task[tarea]/span/td
tdspan wicket:id=accounts[cuentas]/span/td
 /tr
tr wicket:id=details
td colspan=5
 input wicket:id=serviceStatus /
/td
/tr
 /wicket:container

I don't know how to populate items.

Thanks for helping!

Tito

2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com

 On Mon, Oct 24, 2011 at 9:31 AM, Tito njyt...@gmail.com wrote:
  I'm sorry, you are right!
  I said columns but I meant Rows!
 
  What is the java component for wicket container?

 no need for a java component, wicket:container is an auto tag like
 wicket:message

  How do you suggest to add Odd, Even classes?

 you can make trs webmarkupcontainers that add the correct class

 -igor

 
  Thank you!
 
  2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com
 
  ahhh.
 
  so you want two *rows* not two *columns* per item, attach the repeater
  to a wicket:container tag like so:
 
  wicket:container wicket:id=repeater
  trtd.../tr
  trtd/tr
  /wicket:container
 
  you will have to rig up odd/even yourself
 
  -igor
 
  On Mon, Oct 24, 2011 at 9:10 AM, Tito njyt...@gmail.com wrote:
   Hi Igor this is what i'm doing:
  
   .java
  
   public DedicationsReportPanel(String id, IModelUsers user, final
   IModelDate dayOfReport) {
   super(id);
  
   add(new DataViewDedication(dedications, new
   DedicationDataProvider(dedicationService,
  user.getObject().getUserName())) {
  
   @Override
   protected void populateItem(ItemDedication item) {
DateFormat formatter = new SimpleDateFormat(hh:mm);
   final Dedication dedication = item.getModelObject();
item.add(new Label(timeFrom,
formatter.format(dedication.getTimeFrom(;
   item.add(new Label(timeTo,
  formatter.format(dedication.getTimeTo(;
item.add(new Label(hours, dedication.getHours().toString()));
   item.add(new Label(task, dedication.getTask().getName()));
item.add(new Label(accounts, getAccounts(dedication)));
   item.add(new TextAreaString(serviceStatus, new
   PropertyModelString(item.getModel(), serviceStatus)));
}
  
   @Override
   protected ItemDedication newItem(String id, int index,
  IModelDedication
   model) {
OddEvenItemDedication item = new OddEvenItemDedication(id, index,
   model);
   return item;
}
   });
   }
  
   .html
  
   html
   xmlns:wicket=
  http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd
   
   head/head
   body
   wicket:panel
   table cellspacing=0 class=listado
tr
   thFecha/th
   thHoras/th
thTarea/th
   thServicios/th
   thAcciones/th
/tr
   div wicket:id=dedications
   tr
tdspan wicket:id=hours[horas]/span/td
   tdspan wicket:id=timeFrom[hora desde]/span]/td
tdspan wicket:id=timeTo[hora hasta]/span]/td
   tdspan wicket:id=task[tarea]/span/td
tdspan wicket:id=accounts[cuentas]/span/td
   /tr
tr
   td colspan=5
   input wicket:id=serviceStatus /
/td
   /tr
   /div
/table
   /wicket:panel
   /body
   /html
  
   I'm using a div to group two columns. The problem is that this not a
  valid
   html, and I can't get Odd, Even class in rows. I think it is because
 div
  is
   repeated instead of tr.
  
   What i'm expecting in the final html is something like this:
  
   table cellspacing=0 class=listado
tr
   thFecha/th
   thHoras/th
thTarea/th
   thServicios/th
   thAcciones/th
/tr
   tr class=Even
   tdspanhours 1/span/td
tdspantime from 1/span]/td
   tdspantime to 1/span]/td
tdspantask 1/span/td
   tdspanaccounts 1/span/td
/tr
   tr class=Even
   td colspan=5
input wicket:id=serviceStatus

Re: DataView or GridView with two columns by item

2011-10-25 Thread Tito
Yes, but I think this is not the problem.
I have not problems with wicket:container, my problem is that I can't modify
class attribute of tr to add Odd or Even.

Tito

2011/10/25 Josh Kamau joshnet2...@gmail.com

 You can always use component#renderBodyOnly(true) method to ensure that the
 containers markup is not rendered.

 Josh.

 On Tue, Oct 25, 2011 at 2:33 PM, Tito njyt...@gmail.com wrote:

  Hi,
 
  Wicket container works ok!
  But making trs webmarkupcontainers doesn't allow me to populate items of
  the
  table because it change hierarchy of components, and I can't get
  WebMarkupContainers from Item.
 
  I mean, before I had:
 
  wicket:container wicket:id=dedications
  tr
   tdspan wicket:id=hours[horas]/span/td
  tdspan wicket:id=timeFrom[hora desde]/span]/td
   tdspan wicket:id=timeTo[hora hasta]/span]/td
  tdspan wicket:id=task[tarea]/span/td
   tdspan wicket:id=accounts[cuentas]/span/td
  /tr
   tr
  td colspan=5
  input wicket:id=serviceStatus /
   /td
  /tr
  /wicket:container
 
  And I populated items in this way:
 
  @Override
  protected void populateItem(ItemDedication item) {
   DateFormat formatter = new SimpleDateFormat(hh:mm);
  final Dedication dedication = item.getModelObject();
   item.add(new Label(timeFrom,
   formatter.format(dedication.getTimeFrom(;
  item.add(new Label(timeTo,  formatter.format(dedication.getTimeTo(;
   item.add(new Label(hours, dedication.getHours().toString()));
  item.add(new Label(task, dedication.getTask().getName()));
   item.add(new Label(accounts, getAccounts(dedication)));
  item.add(new TextAreaString(serviceStatus, new
  PropertyModelString(item.getModel(), serviceStatus)));
   }
 
 
  But now if I do this in order to add Odd, Even classes:
 
  wicket:container wicket:id=dedications
   tr wicket:id=content
  tdspan wicket:id=hours[horas]/span/td
   tdspan wicket:id=timeFrom[hora desde]/span]/td
  tdspan wicket:id=timeTo[hora hasta]/span]/td
   tdspan wicket:id=task[tarea]/span/td
  tdspan wicket:id=accounts[cuentas]/span/td
   /tr
  tr wicket:id=details
  td colspan=5
   input wicket:id=serviceStatus /
  /td
  /tr
   /wicket:container
 
  I don't know how to populate items.
 
  Thanks for helping!
 
  Tito
 
  2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com
 
   On Mon, Oct 24, 2011 at 9:31 AM, Tito njyt...@gmail.com wrote:
I'm sorry, you are right!
I said columns but I meant Rows!
   
What is the java component for wicket container?
  
   no need for a java component, wicket:container is an auto tag like
   wicket:message
  
How do you suggest to add Odd, Even classes?
  
   you can make trs webmarkupcontainers that add the correct class
  
   -igor
  
   
Thank you!
   
2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com
   
ahhh.
   
so you want two *rows* not two *columns* per item, attach the
 repeater
to a wicket:container tag like so:
   
wicket:container wicket:id=repeater
trtd.../tr
trtd/tr
/wicket:container
   
you will have to rig up odd/even yourself
   
-igor
   
On Mon, Oct 24, 2011 at 9:10 AM, Tito njyt...@gmail.com wrote:
 Hi Igor this is what i'm doing:

 .java

 public DedicationsReportPanel(String id, IModelUsers user, final
 IModelDate dayOfReport) {
 super(id);

 add(new DataViewDedication(dedications, new
 DedicationDataProvider(dedicationService,
user.getObject().getUserName())) {

 @Override
 protected void populateItem(ItemDedication item) {
  DateFormat formatter = new SimpleDateFormat(hh:mm);
 final Dedication dedication = item.getModelObject();
  item.add(new Label(timeFrom,
  formatter.format(dedication.getTimeFrom(;
 item.add(new Label(timeTo,
formatter.format(dedication.getTimeTo(;
  item.add(new Label(hours, dedication.getHours().toString()));
 item.add(new Label(task, dedication.getTask().getName()));
  item.add(new Label(accounts, getAccounts(dedication)));
 item.add(new TextAreaString(serviceStatus, new
 PropertyModelString(item.getModel(), serviceStatus)));
  }

 @Override
 protected ItemDedication newItem(String id, int index,
IModelDedication
 model) {
  OddEvenItemDedication item = new OddEvenItemDedication(id,
  index,
 model);
 return item;
  }
 });
 }

 .html

 html
 xmlns:wicket=
http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd
 
 head/head
 body
 wicket:panel
 table cellspacing=0 class=listado
  tr
 thFecha/th
 thHoras/th
  thTarea/th
 thServicios/th
 thAcciones/th
  /tr
 div wicket:id=dedications
 tr
  tdspan wicket:id=hours[horas]/span/td
 tdspan wicket:id=timeFrom[hora desde]/span]/td
  tdspan wicket:id=timeTo[hora hasta]/span]/td
 tdspan wicket:id=task[tarea]/span/td
  tdspan wicket:id=accounts[cuentas]/span/td
 /tr
  tr
 td colspan=5

Re: DataView or GridView with two columns by item

2011-10-25 Thread Tito
Yes I tried but the problem is I can't get MarkupContainer to add the
AttributeModifierBehavior.
I don't know how to get a container that represents tr tag.

2011/10/25 Josh Kamau joshnet2...@gmail.com

 Have you tried using attributeModifiers or attributeAppenders to add or
 modify a css class?

 Josh


 On Tue, Oct 25, 2011 at 4:21 PM, Tito njyt...@gmail.com wrote:

  Yes, but I think this is not the problem.
  I have not problems with wicket:container, my problem is that I can't
  modify
  class attribute of tr to add Odd or Even.
 
  Tito
 
  2011/10/25 Josh Kamau joshnet2...@gmail.com
 
   You can always use component#renderBodyOnly(true) method to ensure that
  the
   containers markup is not rendered.
  
   Josh.
  
   On Tue, Oct 25, 2011 at 2:33 PM, Tito njyt...@gmail.com wrote:
  
Hi,
   
Wicket container works ok!
But making trs webmarkupcontainers doesn't allow me to populate items
  of
the
table because it change hierarchy of components, and I can't get
WebMarkupContainers from Item.
   
I mean, before I had:
   
wicket:container wicket:id=dedications
tr
 tdspan wicket:id=hours[horas]/span/td
tdspan wicket:id=timeFrom[hora desde]/span]/td
 tdspan wicket:id=timeTo[hora hasta]/span]/td
tdspan wicket:id=task[tarea]/span/td
 tdspan wicket:id=accounts[cuentas]/span/td
/tr
 tr
td colspan=5
input wicket:id=serviceStatus /
 /td
/tr
/wicket:container
   
And I populated items in this way:
   
@Override
protected void populateItem(ItemDedication item) {
 DateFormat formatter = new SimpleDateFormat(hh:mm);
final Dedication dedication = item.getModelObject();
 item.add(new Label(timeFrom,
 formatter.format(dedication.getTimeFrom(;
item.add(new Label(timeTo,
   formatter.format(dedication.getTimeTo(;
 item.add(new Label(hours, dedication.getHours().toString()));
item.add(new Label(task, dedication.getTask().getName()));
 item.add(new Label(accounts, getAccounts(dedication)));
item.add(new TextAreaString(serviceStatus, new
PropertyModelString(item.getModel(), serviceStatus)));
 }
   
   
But now if I do this in order to add Odd, Even classes:
   
wicket:container wicket:id=dedications
 tr wicket:id=content
tdspan wicket:id=hours[horas]/span/td
 tdspan wicket:id=timeFrom[hora desde]/span]/td
tdspan wicket:id=timeTo[hora hasta]/span]/td
 tdspan wicket:id=task[tarea]/span/td
tdspan wicket:id=accounts[cuentas]/span/td
 /tr
tr wicket:id=details
td colspan=5
 input wicket:id=serviceStatus /
/td
/tr
 /wicket:container
   
I don't know how to populate items.
   
Thanks for helping!
   
Tito
   
2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com
   
 On Mon, Oct 24, 2011 at 9:31 AM, Tito njyt...@gmail.com wrote:
  I'm sorry, you are right!
  I said columns but I meant Rows!
 
  What is the java component for wicket container?

 no need for a java component, wicket:container is an auto tag like
 wicket:message

  How do you suggest to add Odd, Even classes?

 you can make trs webmarkupcontainers that add the correct class

 -igor

 
  Thank you!
 
  2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com
 
  ahhh.
 
  so you want two *rows* not two *columns* per item, attach the
   repeater
  to a wicket:container tag like so:
 
  wicket:container wicket:id=repeater
  trtd.../tr
  trtd/tr
  /wicket:container
 
  you will have to rig up odd/even yourself
 
  -igor
 
  On Mon, Oct 24, 2011 at 9:10 AM, Tito njyt...@gmail.com
 wrote:
   Hi Igor this is what i'm doing:
  
   .java
  
   public DedicationsReportPanel(String id, IModelUsers user,
  final
   IModelDate dayOfReport) {
   super(id);
  
   add(new DataViewDedication(dedications, new
   DedicationDataProvider(dedicationService,
  user.getObject().getUserName())) {
  
   @Override
   protected void populateItem(ItemDedication item) {
DateFormat formatter = new SimpleDateFormat(hh:mm);
   final Dedication dedication = item.getModelObject();
item.add(new Label(timeFrom,
formatter.format(dedication.getTimeFrom(;
   item.add(new Label(timeTo,
  formatter.format(dedication.getTimeTo(;
item.add(new Label(hours,
 dedication.getHours().toString()));
   item.add(new Label(task, dedication.getTask().getName()));
item.add(new Label(accounts, getAccounts(dedication)));
   item.add(new TextAreaString(serviceStatus, new
   PropertyModelString(item.getModel(), serviceStatus)));
}
  
   @Override
   protected ItemDedication newItem(String id, int index,
  IModelDedication
   model) {
OddEvenItemDedication item = new
 OddEvenItemDedication(id,
index

Re: DataView or GridView with two columns by item

2011-10-25 Thread Tito
I thought that I had to create Items on newItem method.
Anyway, I tried this but it doesn't work. Perhaps I'm doing something wrong,
this is my test:

@Override
 protected void populateItem(ItemDedication item) {
DateFormat formatter = new SimpleDateFormat(hh:mm);
 final Dedication dedication = item.getModelObject();
ItemDedication contentRow = new OddEvenItemDedication(content,
item.getIndex(), item.getModel());
 ItemDedication detailsRow = new OddEvenItemDedication(details,
item.getIndex(), item.getModel());
contentRow.add(new Label(timeFrom,
 formatter.format(dedication.getTimeFrom(;
 contentRow.add(new Label(timeTo,
 formatter.format(dedication.getTimeTo(;
contentRow.add(new Label(hours, dedication.getHours().toString()));
 contentRow.add(new Label(task, dedication.getTask().getName()));
contentRow.add(new Label(accounts, getAccounts(dedication)));
 detailsRow.add(new TextAreaString(serviceStatus, new
PropertyModelString(item.getModel(), serviceStatus)));
 }

@Override
protected ItemDedication newItem(String id, int index, IModelDedication
model) {
 return new ItemDedication(id, index, model);
}

And html:

wicket:container wicket:id=dedications
tr wicket:id=content
 tdspan wicket:id=hours[horas]/span/td
tdspan wicket:id=timeFrom[hora desde]/span]/td
 tdspan wicket:id=timeTo[hora hasta]/span]/td
tdspan wicket:id=task[tarea]/span/td
 tdspan wicket:id=accounts[cuentas]/span/td
/tr
 tr wicket:id=details
td colspan=5
 input wicket:id=serviceStatus /
/td
/tr
 /wicket:container


2011/10/25 Igor Vaynberg igor.vaynb...@gmail.com

 populateitem(item) {
  OddEvenItem tr1=new OddEvenItem(tr1, item.getindex(), item.getmodel());
  OddEvenItem tr2=new OddEvenItem(tr1, item.getindex(), item.getmodel());
  item.add(tr1, tr2);

  tr1.add(...);
  tr2.add(...);
 }

 -igor


 On Tue, Oct 25, 2011 at 7:37 AM, Tito njyt...@gmail.com wrote:
  Yes I tried but the problem is I can't get MarkupContainer to add the
  AttributeModifierBehavior.
  I don't know how to get a container that represents tr tag.
 
  2011/10/25 Josh Kamau joshnet2...@gmail.com
 
  Have you tried using attributeModifiers or attributeAppenders to add or
  modify a css class?
 
  Josh
 
 
  On Tue, Oct 25, 2011 at 4:21 PM, Tito njyt...@gmail.com wrote:
 
   Yes, but I think this is not the problem.
   I have not problems with wicket:container, my problem is that I can't
   modify
   class attribute of tr to add Odd or Even.
  
   Tito
  
   2011/10/25 Josh Kamau joshnet2...@gmail.com
  
You can always use component#renderBodyOnly(true) method to ensure
 that
   the
containers markup is not rendered.
   
Josh.
   
On Tue, Oct 25, 2011 at 2:33 PM, Tito njyt...@gmail.com wrote:
   
 Hi,

 Wicket container works ok!
 But making trs webmarkupcontainers doesn't allow me to populate
 items
   of
 the
 table because it change hierarchy of components, and I can't get
 WebMarkupContainers from Item.

 I mean, before I had:

 wicket:container wicket:id=dedications
 tr
  tdspan wicket:id=hours[horas]/span/td
 tdspan wicket:id=timeFrom[hora desde]/span]/td
  tdspan wicket:id=timeTo[hora hasta]/span]/td
 tdspan wicket:id=task[tarea]/span/td
  tdspan wicket:id=accounts[cuentas]/span/td
 /tr
  tr
 td colspan=5
 input wicket:id=serviceStatus /
  /td
 /tr
 /wicket:container

 And I populated items in this way:

 @Override
 protected void populateItem(ItemDedication item) {
  DateFormat formatter = new SimpleDateFormat(hh:mm);
 final Dedication dedication = item.getModelObject();
  item.add(new Label(timeFrom,
  formatter.format(dedication.getTimeFrom(;
 item.add(new Label(timeTo,
formatter.format(dedication.getTimeTo(;
  item.add(new Label(hours, dedication.getHours().toString()));
 item.add(new Label(task, dedication.getTask().getName()));
  item.add(new Label(accounts, getAccounts(dedication)));
 item.add(new TextAreaString(serviceStatus, new
 PropertyModelString(item.getModel(), serviceStatus)));
  }


 But now if I do this in order to add Odd, Even classes:

 wicket:container wicket:id=dedications
  tr wicket:id=content
 tdspan wicket:id=hours[horas]/span/td
  tdspan wicket:id=timeFrom[hora desde]/span]/td
 tdspan wicket:id=timeTo[hora hasta]/span]/td
  tdspan wicket:id=task[tarea]/span/td
 tdspan wicket:id=accounts[cuentas]/span/td
  /tr
 tr wicket:id=details
 td colspan=5
  input wicket:id=serviceStatus /
 /td
 /tr
  /wicket:container

 I don't know how to populate items.

 Thanks for helping!

 Tito

 2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com

  On Mon, Oct 24, 2011 at 9:31 AM, Tito njyt...@gmail.com
 wrote:
   I'm sorry, you are right!
   I said columns but I meant Rows!
  
   What is the java component for wicket container

DataView or GridView with two columns by item

2011-10-24 Thread Tito
Hi,

I'm trying to make a table with two columns by item. I mean, my item have to
generate two columns.
The first have attributes of the object, the second have another attribute
with details.

I can't do this. I made tests with DataView and GridView. I don't know what
is the best component. Could you give me an idea of how to do something like
this?

Thanks in advance.

Tito


Re: DataView or GridView with two columns by item

2011-10-24 Thread Tito
Hi Igor this is what i'm doing:

.java

public DedicationsReportPanel(String id, IModelUsers user, final
IModelDate dayOfReport) {
super(id);

add(new DataViewDedication(dedications, new
DedicationDataProvider(dedicationService, user.getObject().getUserName())) {

@Override
protected void populateItem(ItemDedication item) {
 DateFormat formatter = new SimpleDateFormat(hh:mm);
final Dedication dedication = item.getModelObject();
 item.add(new Label(timeFrom,
 formatter.format(dedication.getTimeFrom(;
item.add(new Label(timeTo,  formatter.format(dedication.getTimeTo(;
 item.add(new Label(hours, dedication.getHours().toString()));
item.add(new Label(task, dedication.getTask().getName()));
 item.add(new Label(accounts, getAccounts(dedication)));
item.add(new TextAreaString(serviceStatus, new
PropertyModelString(item.getModel(), serviceStatus)));
 }

@Override
protected ItemDedication newItem(String id, int index, IModelDedication
model) {
 OddEvenItemDedication item = new OddEvenItemDedication(id, index,
model);
return item;
 }
});
}

.html

html
xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd

head/head
body
wicket:panel
table cellspacing=0 class=listado
 tr
thFecha/th
thHoras/th
 thTarea/th
thServicios/th
thAcciones/th
 /tr
div wicket:id=dedications
tr
 tdspan wicket:id=hours[horas]/span/td
tdspan wicket:id=timeFrom[hora desde]/span]/td
 tdspan wicket:id=timeTo[hora hasta]/span]/td
tdspan wicket:id=task[tarea]/span/td
 tdspan wicket:id=accounts[cuentas]/span/td
/tr
 tr
td colspan=5
input wicket:id=serviceStatus /
 /td
/tr
/div
 /table
/wicket:panel
/body
/html

I'm using a div to group two columns. The problem is that this not a valid
html, and I can't get Odd, Even class in rows. I think it is because div is
repeated instead of tr.

What i'm expecting in the final html is something like this:

table cellspacing=0 class=listado
 tr
thFecha/th
thHoras/th
 thTarea/th
thServicios/th
thAcciones/th
 /tr
tr class=Even
tdspanhours 1/span/td
 tdspantime from 1/span]/td
tdspantime to 1/span]/td
 tdspantask 1/span/td
tdspanaccounts 1/span/td
 /tr
tr class=Even
td colspan=5
 input wicket:id=serviceStatus /
/td
/tr
 tr class=Odd
tdspanhours 2/span/td
 tdspantime from 2/span]/td
tdspantime to 2/span]/td
 tdspantask 2/span/td
tdspanaccounts 2/span/td
 /tr
tr class=Odd
td colspan=5
 input wicket:id=serviceStatus /
/td
/tr
 /table


Thanks!


2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com

 dataview/listview/datatable should all work just fine, post your code.

 -igor

 On Mon, Oct 24, 2011 at 5:06 AM, Tito njyt...@gmail.com wrote:
  Hi,
 
  I'm trying to make a table with two columns by item. I mean, my item have
 to
  generate two columns.
  The first have attributes of the object, the second have another
 attribute
  with details.
 
  I can't do this. I made tests with DataView and GridView. I don't know
 what
  is the best component. Could you give me an idea of how to do something
 like
  this?
 
  Thanks in advance.
 
  Tito
 

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




Re: DataView or GridView with two columns by item

2011-10-24 Thread Tito
I'm sorry, you are right!
I said columns but I meant Rows!

What is the java component for wicket container?
How do you suggest to add Odd, Even classes?

Thank you!

2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com

 ahhh.

 so you want two *rows* not two *columns* per item, attach the repeater
 to a wicket:container tag like so:

 wicket:container wicket:id=repeater
 trtd.../tr
 trtd/tr
 /wicket:container

 you will have to rig up odd/even yourself

 -igor

 On Mon, Oct 24, 2011 at 9:10 AM, Tito njyt...@gmail.com wrote:
  Hi Igor this is what i'm doing:
 
  .java
 
  public DedicationsReportPanel(String id, IModelUsers user, final
  IModelDate dayOfReport) {
  super(id);
 
  add(new DataViewDedication(dedications, new
  DedicationDataProvider(dedicationService,
 user.getObject().getUserName())) {
 
  @Override
  protected void populateItem(ItemDedication item) {
   DateFormat formatter = new SimpleDateFormat(hh:mm);
  final Dedication dedication = item.getModelObject();
   item.add(new Label(timeFrom,
   formatter.format(dedication.getTimeFrom(;
  item.add(new Label(timeTo,  formatter.format(dedication.getTimeTo(;
   item.add(new Label(hours, dedication.getHours().toString()));
  item.add(new Label(task, dedication.getTask().getName()));
   item.add(new Label(accounts, getAccounts(dedication)));
  item.add(new TextAreaString(serviceStatus, new
  PropertyModelString(item.getModel(), serviceStatus)));
   }
 
  @Override
  protected ItemDedication newItem(String id, int index,
 IModelDedication
  model) {
   OddEvenItemDedication item = new OddEvenItemDedication(id, index,
  model);
  return item;
   }
  });
  }
 
  .html
 
  html
  xmlns:wicket=
 http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd
  
  head/head
  body
  wicket:panel
  table cellspacing=0 class=listado
   tr
  thFecha/th
  thHoras/th
   thTarea/th
  thServicios/th
  thAcciones/th
   /tr
  div wicket:id=dedications
  tr
   tdspan wicket:id=hours[horas]/span/td
  tdspan wicket:id=timeFrom[hora desde]/span]/td
   tdspan wicket:id=timeTo[hora hasta]/span]/td
  tdspan wicket:id=task[tarea]/span/td
   tdspan wicket:id=accounts[cuentas]/span/td
  /tr
   tr
  td colspan=5
  input wicket:id=serviceStatus /
   /td
  /tr
  /div
   /table
  /wicket:panel
  /body
  /html
 
  I'm using a div to group two columns. The problem is that this not a
 valid
  html, and I can't get Odd, Even class in rows. I think it is because div
 is
  repeated instead of tr.
 
  What i'm expecting in the final html is something like this:
 
  table cellspacing=0 class=listado
   tr
  thFecha/th
  thHoras/th
   thTarea/th
  thServicios/th
  thAcciones/th
   /tr
  tr class=Even
  tdspanhours 1/span/td
   tdspantime from 1/span]/td
  tdspantime to 1/span]/td
   tdspantask 1/span/td
  tdspanaccounts 1/span/td
   /tr
  tr class=Even
  td colspan=5
   input wicket:id=serviceStatus /
  /td
  /tr
   tr class=Odd
  tdspanhours 2/span/td
   tdspantime from 2/span]/td
  tdspantime to 2/span]/td
   tdspantask 2/span/td
  tdspanaccounts 2/span/td
   /tr
  tr class=Odd
  td colspan=5
   input wicket:id=serviceStatus /
  /td
  /tr
   /table
 
 
  Thanks!
 
 
  2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com
 
  dataview/listview/datatable should all work just fine, post your code.
 
  -igor
 
  On Mon, Oct 24, 2011 at 5:06 AM, Tito njyt...@gmail.com wrote:
   Hi,
  
   I'm trying to make a table with two columns by item. I mean, my item
 have
  to
   generate two columns.
   The first have attributes of the object, the second have another
  attribute
   with details.
  
   I can't do this. I made tests with DataView and GridView. I don't know
  what
   is the best component. Could you give me an idea of how to do
 something
  like
   this?
  
   Thanks in advance.
  
   Tito
  
 
  -
  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: Markup of type 'html' not found. Not usual error...

2011-08-03 Thread Tito
Hi everybody. This time Im  writing to tell you that I solved my problem.
Perhaps this will be useful for someone.

It was a stupid error but it was hard to realize what the problem was. It
was a locale error.
I created html pages with _es.html suffix and I didn't create .html for
default use. When the user browsed with his browser that was configured in
portuguese it failed.
Well thanks for helping me.
Bye
Tito

2011/7/5 Tito njyt...@gmail.com

 Noup. I'm running on a single server.
 And the Unit Test is also failing on server sometimes.


 2011/7/5 Bruno Borges bruno.bor...@gmail.com

 Are you running on a cluster? Maybe sessions are being serialized between
 instances and not working properly.


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



 On Tue, Jul 5, 2011 at 12:37 PM, Tito njyt...@gmail.com wrote:

  Mmm I remembered something.
  I made a RenderTest for this page and It works, but again, sometimes it
  doesn't.
 
  When it fails, in an specific machine, I have the same error. In that
 case
  I
  think It's not a session problem, don't you think? I mean, servlet
  shouldn't
  catch any request in that case.
 
  But a session problem sound logic, because it happens with specific
 users
  on
  specific machines. I don't know what to think.
 
 
  2011/7/5 Bruno Borges bruno.bor...@gmail.com
 
   I don't know. I'm just guessing. You may not be writing any wicket
   attribute, but you may be removing them.
  
   *Bruno Borges*
   www.brunoborges.com.br
   +55 21 76727099
  
  
  
   On Tue, Jul 5, 2011 at 12:14 PM, Tito njyt...@gmail.com wrote:
  
Yes I am, by a servlet that manage the session.
   
But I don't get your point. why you mean It could be the problem?
I think I'm not writing wicket attributes of session.
   
I can't use wicket session because struts can't access to it. So I
 have
   to
access direct to HttpSession.
   
   
2011/7/5 Bruno Borges bruno.bor...@gmail.com
   
 Are you manipulating the HttpSession somehow?

 I would guess there's something messing with attributes in session
  and
 making Wicket loose it's references of cache or something.

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



 On Tue, Jul 5, 2011 at 11:23 AM, Tito njyt...@gmail.com wrote:

  I'm still running on wicket 1.4. I'm using 1.4.17 version.
 
  Here is the stack trace. Thank you!
 
  2011-05-16 10:07:42,870 [http-80-12] ERROR keepcon23
  org.apache.wicket.RequestCycle
  - Markup of type 'html' for component
  'com.keepcon.web.timetracking.EmployeeDedicationLoad' not found.
   Enable
  debug messages for org.apache.wicket.util.resource to get a list
 of
   all
  filenames tried.: [Page class =
  com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0,
  version
   =
  0]***
  *
 
  org.apache.wicket.markup.MarkupNotFoundException: Markup of type
   'html'
 for
  component 'com.keepcon.web.timetracking.EmployeeDedicationLoad'
 not
 found.
  Enable debug messages for org.apache.wicket.util.resource to get
 a
   list
 of
  all filenames tried.: [Page class =
  com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0,
  version
   =
  0]***
  *
 
 at org.apache.wicket
  .markup.MarkupCache.getMarkupStream(MarkupCache.java:227)
 
 at org.apache.wicket
 
   
  .MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
 
 at org.apache.wicket.Page.onRender(Page.java:1587)
 
 at
  org.apache.wicket.Component.render(Component.java:2521)
 
 at org.apache.wicket.Page.renderPage(Page.java:932)
 
 at org.apache.wicket
 
 

   
  
 
 .request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
  
 
 at org.apache.wicket
 
 

   
  
 
 .request.target.coding.HybridUrlCodingStrategy$HybridBookmarkablePageRequestTarget.respond(HybridUrlCodingStrategy.java:987)
  
 
 at org.apache.wicket
 
 

   
  
 
 .request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
  
 
 at org.apache.wicket
 
 .RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
 
 at
org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
 
 at
 org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
 
 at
 org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 
 at org.apache.wicket
  .protocol.http.WicketFilter.doGet(WicketFilter.java:486)
 
 at org.apache.wicket
  .protocol.http.WicketFilter.doFilter(WicketFilter.java:319

Markup of type 'html' not found. Not usual error...

2011-07-05 Thread Tito
Hi I'm having this error for several days now.
But the strange thing is that it doesn't happen all the time. It's more like
a random error.

I know this error usually means that the html file is missing, but html is
there and working. I have this error in production and only in a few cases.
This happens with some users who log in my system from their machines. I
can't reproduce this error, it just happens.

I know it's not enough information but perhaps someone had this problem
before. I can post stacktrace if somone considers it useful.

Thanks in advanced.

Tito


Re: Markup of type 'html' not found. Not usual error...

2011-07-05 Thread Tito
 is running on Struts and I'm migrating
gradually to wicket.


I telling you this because wicket doesn't manage sessions here.


Tito

2011/7/5 Martijn Dashorst martijn.dasho...@gmail.com

 This sounds like something we fixed in 1.5-rc5.1. please make sure you
 are on the latest 1.5 release candidate (unless you are running 1.4 or
 1.3).

 Martijn

 On Tue, Jul 5, 2011 at 3:05 PM, Tito njyt...@gmail.com wrote:
  Hi I'm having this error for several days now.
  But the strange thing is that it doesn't happen all the time. It's more
 like
  a random error.
 
  I know this error usually means that the html file is missing, but html
 is
  there and working. I have this error in production and only in a few
 cases.
  This happens with some users who log in my system from their machines. I
  can't reproduce this error, it just happens.
 
  I know it's not enough information but perhaps someone had this problem
  before. I can post stacktrace if somone considers it useful.
 
  Thanks in advanced.
 
  Tito
 



 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com

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




Re: Markup of type 'html' not found. Not usual error...

2011-07-05 Thread Tito
Yes I am, by a servlet that manage the session.

But I don't get your point. why you mean It could be the problem?
I think I'm not writing wicket attributes of session.

I can't use wicket session because struts can't access to it. So I have to
access direct to HttpSession.


2011/7/5 Bruno Borges bruno.bor...@gmail.com

 Are you manipulating the HttpSession somehow?

 I would guess there's something messing with attributes in session and
 making Wicket loose it's references of cache or something.

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



 On Tue, Jul 5, 2011 at 11:23 AM, Tito njyt...@gmail.com wrote:

  I'm still running on wicket 1.4. I'm using 1.4.17 version.
 
  Here is the stack trace. Thank you!
 
  2011-05-16 10:07:42,870 [http-80-12] ERROR keepcon23
  org.apache.wicket.RequestCycle
  - Markup of type 'html' for component
  'com.keepcon.web.timetracking.EmployeeDedicationLoad' not found. Enable
  debug messages for org.apache.wicket.util.resource to get a list of all
  filenames tried.: [Page class =
  com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0, version =
  0]***
  *
 
  org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html'
 for
  component 'com.keepcon.web.timetracking.EmployeeDedicationLoad' not
 found.
  Enable debug messages for org.apache.wicket.util.resource to get a list
 of
  all filenames tried.: [Page class =
  com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0, version =
  0]***
  *
 
 at org.apache.wicket
  .markup.MarkupCache.getMarkupStream(MarkupCache.java:227)
 
 at org.apache.wicket
  .MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
 
 at org.apache.wicket.Page.onRender(Page.java:1587)
 
 at org.apache.wicket.Component.render(Component.java:2521)
 
 at org.apache.wicket.Page.renderPage(Page.java:932)
 
 at org.apache.wicket
 
 
 .request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
  
 
 at org.apache.wicket
 
 
 .request.target.coding.HybridUrlCodingStrategy$HybridBookmarkablePageRequestTarget.respond(HybridUrlCodingStrategy.java:987)
  
 
 at org.apache.wicket
 
 
 .request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
  
 
 at org.apache.wicket
  .RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
 
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
 
 at
 org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
 
 at
 org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 
 at org.apache.wicket
  .protocol.http.WicketFilter.doGet(WicketFilter.java:486)
 
 at org.apache.wicket
  .protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  
 
 at
 
 com.keepcon.web.filter.EncodingFilter.doFilter(EncodingFilter.java:20)
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  
 
 at
 
 com.keepcon.web.filter.SecurityFilter.doFilter(SecurityFilter.java:67)
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  
 
 at
 
 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
  
 
 at
 
 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  
 
 at
 
 
 net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:157)
 
 at
 
 
 net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:131)
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  
 
 at
 
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  
 
 at
 
 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  
 
 at
 
 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191

Re: Markup of type 'html' not found. Not usual error...

2011-07-05 Thread Tito
Mmm I remembered something.
I made a RenderTest for this page and It works, but again, sometimes it
doesn't.

When it fails, in an specific machine, I have the same error. In that case I
think It's not a session problem, don't you think? I mean, servlet shouldn't
catch any request in that case.

But a session problem sound logic, because it happens with specific users on
specific machines. I don't know what to think.


2011/7/5 Bruno Borges bruno.bor...@gmail.com

 I don't know. I'm just guessing. You may not be writing any wicket
 attribute, but you may be removing them.

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



 On Tue, Jul 5, 2011 at 12:14 PM, Tito njyt...@gmail.com wrote:

  Yes I am, by a servlet that manage the session.
 
  But I don't get your point. why you mean It could be the problem?
  I think I'm not writing wicket attributes of session.
 
  I can't use wicket session because struts can't access to it. So I have
 to
  access direct to HttpSession.
 
 
  2011/7/5 Bruno Borges bruno.bor...@gmail.com
 
   Are you manipulating the HttpSession somehow?
  
   I would guess there's something messing with attributes in session and
   making Wicket loose it's references of cache or something.
  
   *Bruno Borges*
   www.brunoborges.com.br
   +55 21 76727099
  
  
  
   On Tue, Jul 5, 2011 at 11:23 AM, Tito njyt...@gmail.com wrote:
  
I'm still running on wicket 1.4. I'm using 1.4.17 version.
   
Here is the stack trace. Thank you!
   
2011-05-16 10:07:42,870 [http-80-12] ERROR keepcon23
org.apache.wicket.RequestCycle
- Markup of type 'html' for component
'com.keepcon.web.timetracking.EmployeeDedicationLoad' not found.
 Enable
debug messages for org.apache.wicket.util.resource to get a list of
 all
filenames tried.: [Page class =
com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0, version
 =
0]***
*
   
org.apache.wicket.markup.MarkupNotFoundException: Markup of type
 'html'
   for
component 'com.keepcon.web.timetracking.EmployeeDedicationLoad' not
   found.
Enable debug messages for org.apache.wicket.util.resource to get a
 list
   of
all filenames tried.: [Page class =
com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0, version
 =
0]***
*
   
   at org.apache.wicket
.markup.MarkupCache.getMarkupStream(MarkupCache.java:227)
   
   at org.apache.wicket
   
  .MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
   
   at org.apache.wicket.Page.onRender(Page.java:1587)
   
   at org.apache.wicket.Component.render(Component.java:2521)
   
   at org.apache.wicket.Page.renderPage(Page.java:932)
   
   at org.apache.wicket
   
   
  
 
 .request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)

   
   at org.apache.wicket
   
   
  
 
 .request.target.coding.HybridUrlCodingStrategy$HybridBookmarkablePageRequestTarget.respond(HybridUrlCodingStrategy.java:987)

   
   at org.apache.wicket
   
   
  
 
 .request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)

   
   at org.apache.wicket
.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
   
   at
  org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
   
   at
   org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
   
   at
   org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
   
   at org.apache.wicket
.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
   
   at org.apache.wicket
.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
   
   at
   
   
  
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

   
   at
   
   
  
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

   
   at
   
  
 
 com.keepcon.web.filter.EncodingFilter.doFilter(EncodingFilter.java:20)
   
   at
   
   
  
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

   
   at
   
   
  
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

   
   at
   
  
 
 com.keepcon.web.filter.SecurityFilter.doFilter(SecurityFilter.java:67)
   
   at
   
   
  
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

   
   at
   
   
  
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

   
   at
   
   
  
 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198

Re: Markup of type 'html' not found. Not usual error...

2011-07-05 Thread Tito
Noup. I'm running on a single server.
And the Unit Test is also failing on server sometimes.

2011/7/5 Bruno Borges bruno.bor...@gmail.com

 Are you running on a cluster? Maybe sessions are being serialized between
 instances and not working properly.


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



 On Tue, Jul 5, 2011 at 12:37 PM, Tito njyt...@gmail.com wrote:

  Mmm I remembered something.
  I made a RenderTest for this page and It works, but again, sometimes it
  doesn't.
 
  When it fails, in an specific machine, I have the same error. In that
 case
  I
  think It's not a session problem, don't you think? I mean, servlet
  shouldn't
  catch any request in that case.
 
  But a session problem sound logic, because it happens with specific users
  on
  specific machines. I don't know what to think.
 
 
  2011/7/5 Bruno Borges bruno.bor...@gmail.com
 
   I don't know. I'm just guessing. You may not be writing any wicket
   attribute, but you may be removing them.
  
   *Bruno Borges*
   www.brunoborges.com.br
   +55 21 76727099
  
  
  
   On Tue, Jul 5, 2011 at 12:14 PM, Tito njyt...@gmail.com wrote:
  
Yes I am, by a servlet that manage the session.
   
But I don't get your point. why you mean It could be the problem?
I think I'm not writing wicket attributes of session.
   
I can't use wicket session because struts can't access to it. So I
 have
   to
access direct to HttpSession.
   
   
2011/7/5 Bruno Borges bruno.bor...@gmail.com
   
 Are you manipulating the HttpSession somehow?

 I would guess there's something messing with attributes in session
  and
 making Wicket loose it's references of cache or something.

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



 On Tue, Jul 5, 2011 at 11:23 AM, Tito njyt...@gmail.com wrote:

  I'm still running on wicket 1.4. I'm using 1.4.17 version.
 
  Here is the stack trace. Thank you!
 
  2011-05-16 10:07:42,870 [http-80-12] ERROR keepcon23
  org.apache.wicket.RequestCycle
  - Markup of type 'html' for component
  'com.keepcon.web.timetracking.EmployeeDedicationLoad' not found.
   Enable
  debug messages for org.apache.wicket.util.resource to get a list
 of
   all
  filenames tried.: [Page class =
  com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0,
  version
   =
  0]***
  *
 
  org.apache.wicket.markup.MarkupNotFoundException: Markup of type
   'html'
 for
  component 'com.keepcon.web.timetracking.EmployeeDedicationLoad'
 not
 found.
  Enable debug messages for org.apache.wicket.util.resource to get
 a
   list
 of
  all filenames tried.: [Page class =
  com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0,
  version
   =
  0]***
  *
 
 at org.apache.wicket
  .markup.MarkupCache.getMarkupStream(MarkupCache.java:227)
 
 at org.apache.wicket
 
   
  .MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
 
 at org.apache.wicket.Page.onRender(Page.java:1587)
 
 at
  org.apache.wicket.Component.render(Component.java:2521)
 
 at org.apache.wicket.Page.renderPage(Page.java:932)
 
 at org.apache.wicket
 
 

   
  
 
 .request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
  
 
 at org.apache.wicket
 
 

   
  
 
 .request.target.coding.HybridUrlCodingStrategy$HybridBookmarkablePageRequestTarget.respond(HybridUrlCodingStrategy.java:987)
  
 
 at org.apache.wicket
 
 

   
  
 
 .request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
  
 
 at org.apache.wicket
  .RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
 
 at
org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
 
 at
 org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
 
 at
 org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 
 at org.apache.wicket
  .protocol.http.WicketFilter.doGet(WicketFilter.java:486)
 
 at org.apache.wicket
  .protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
 
 at
 
 

   
  
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  
 
 at
 
 

   
  
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  
 
 at
 

   
  
 
 com.keepcon.web.filter.EncodingFilter.doFilter(EncodingFilter.java:20

Re: Model detached before Validate of FormValidator

2011-06-06 Thread Tito
Wow, you tryed hard to do this.
I had no more ideas, I'll try with this.

Thank you very much.

Tito

2011/6/5 Per Newgro per.new...@gmx.ch

 Hi Tito,

 i hope i got a valid solution for you. Please check it:

 a) You need to use a bean. I've tried it with simple strings like
 (1,2,7,24)
 and it wasn't working. I think because the renderer is called only with
 index 0.
 I don't know if this is a palette bug or a needed feature.
 b) you have to add the validator to the recorder component. This gets the
 list
 of ids selected in component. (Debug from here
 String[] ids = getIdsOfSelectedChoices(validatable);)

 hth
 Per

 code

 package ch.newgro.validpalette;

 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;

 import org.apache.wicket.extensions.markup.html.form.palette.Palette;
 import
 org.apache.wicket.extensions.markup.html.form.palette.component.Recorder;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.form.ChoiceRenderer;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.IChoiceRenderer;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.model.util.ListModel;
 import org.apache.wicket.validation.IValidatable;
 import org.apache.wicket.validation.validator.AbstractValidator;

 /**
  * Homepage
  */
 public class HomePage extends WebPage {

class Bean implements Serializable {

public final int id;
public final String name;

public Bean(int id, String name) {
this.id = id;
this.name = name;
}

@Override
public String toString() {
return super.toString().concat(;
 id:).concat(String.valueOf(id)).concat(; name: ).concat(name);
}
}

private final ListBean beans = new ArrayListBean(beans());

public HomePage() {
FormVoid form;
add(form = new FormVoid(form));
IModelListBean model = new ListModelBean(beans);
PaletteBean palette = new PaletteBean(palette, model,
 choicesModel(), choiceRenderer(), 10, false) {
@Override
protected RecorderBean newRecorderComponent() {
final RecorderBean result = super.newRecorderComponent();
result.add(new AbstractValidatorObject() {
@Override
protected void onValidate(IValidatableObject
 validatable) {
String[] ids = getIdsOfSelectedChoices(validatable);
printSelectedChoicesOf(result, ids);
}

private String[]
 getIdsOfSelectedChoices(IValidatableObject validatable) {
return ((String) validatable.getValue()).split(,);
}

private void printSelectedChoicesOf(final RecorderBean
 recorder, String[] idsOfSelectedChocies) {
IChoiceRendererBean renderer =
 recorder.getPalette().getChoiceRenderer();
if (idsOfSelectedChocies.length  0) {
for (String id : idsOfSelectedChocies) {
Collection? extends Bean choices =
 recorder.getPalette().getChoices();
for (Bean choice : choices) {
if (renderer.getIdValue(choice,
 0).equals(id)) {
System.out.println(choice);
}
}
}
}
}
});
return result;
}
};
form.add(palette);
}

private ListBean beans() {
return Collections.emptyList(); // Arrays.asList(new Bean(0, 1),
 new Bean(4, 11), new Bean(8, 21));
}

private IModelList? extends Bean choicesModel() {
return Model.ofList(allNames());
}

private List? extends Bean allNames() {
ArrayListBean result = new ArrayListBean();
result.add(bean(0, 1));
result.add(bean(1, 2));
result.add(bean(2, 3));
result.add(bean(3, 4));
result.add(bean(4, 11));
result.add(bean(5, 12));
result.add(bean(6, 13));
result.add(bean(7, 14));
result.add(bean(8, 21));
result.add(bean(9, 22));
result.add(bean(10, 23));
result.add(bean(11, 24));
return result;
}

private Bean bean(int id, String name) {
return new Bean(id, name);
}

private IChoiceRendererBean choiceRenderer() {
return new ChoiceRendererBean(name, id);
}

 }

 /code


  No problem, thanks for your answer.
 We always try to find a solution which is fine for me.

 When I call getSelectedChoices in Validation method it give us an empty
 List
 back. It is like the list

Re: Model detached before Validate of FormValidator

2011-06-03 Thread Tito
Does it means that Model of form is populated before Validate?
I didn't know that. In that way I also can use palette model in form and it
would have to work too.

Thanks for the solution!

Tito

2011/6/3 Per Newgro per.new...@gmx.ch

 Sorry, i missed to say that you have to connect bunsinessModel and selected
 list of palette.
 PaletteTask  palette = new PaletteTask(..., new
 PropertyModelListTask(model, tasks), ...);

 Per

  PaletteTask  palette = new PaletteTask(.);
 form.add(palette);

 form.add(new IFormValidator() {

 @Override
 public void Validate(Form?  form) {
   // how to get a list of selected tasks???
 }
 });

 You have to set the model to the form by assigning the list or wrap it in
 a business model.
 Then you can do a form.getModelObject() in validate method and cast it to
 the assigned
 list or business model.

 Like this

 public class MyBusinessModel {
  public ListTask getTasks() {
...
  }
 }

 public class MyComponent extends Panel {
  public MyComponent(String id, IModelMyBusinessModel model) {
super(id, model);
FormMyBusinessModel form = new Form(form, model);

  PaletteTask  palette = new PaletteTask(.);
  form.add(palette);

  form.add(new IFormValidator() {

 @Override
 public void Validate(Form?  form) {
  MyBusinessModel model = (MyBusinessModel) form.getModelObject();
   // how to get a list of selected tasks???
  ListTask  selectedTasks = model.getTasks();
 }
  });

  }
 }


 Hth
 Per

 I read that is a normal behavior. It's because validation occurs before
 model population.
 In that way when validation fails model won't be populated.

 So I would have to do something like textField.getInput() but I had a
 problem to get a model Object from a Palette.
 For example:

 PaletteTask  palette = new PaletteTask(.);
 form.add(palette);

 form.add(new IFormValidator() {

  @Override
  public void Validate(Form?  form) {
// how to get a list of selected tasks???
  }
 });

 So I made validation on onSubmit method of form. Now I'm fighting with
 localized message to finish.

 Thanks!
 Tito

 2011/5/31 Per Newgroper.new...@gmx.ch

  Am 31.05.2011 15:10, schrieb Tito:

  Is this ok?

 I have to validate model object but it's detached when validate of form
 validator is called. How can I make this validation?

 Thanks

  Provide some code describing the problem please.

 Cheers
 Per

 -
 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: Model detached before Validate of FormValidator

2011-06-03 Thread Tito
No problem, thanks for your answer.
We always try to find a solution which is fine for me.

When I call getSelectedChoices in Validation method it give us an empty List
back. It is like the list it is not uploaded before entering the validation
method.

Thanks for helping me.

Regards
Tito

2011/6/3 Per Newgro per.new...@gmx.ch

 Afaik no. Your right. I missed the alidator part of the interface
 IFormValidator. My explanation was related
 the FromVisitor. Sorry for that.

 But you could make palette final and access it inside the validate method.
 Then you could do a palette.|getRecorderComponent().getSelectedChoices().
 This method is accessing
 the component values instead of the model values.

 Hth (and sorry for my blindness)
 Per

 |

 Does it means that Model of form is populated before Validate?
 I didn't know that. In that way I also can use palette model in form and
 it
 would have to work too.

 Thanks for the solution!

 Tito

 2011/6/3 Per Newgroper.new...@gmx.ch

  Sorry, i missed to say that you have to connect bunsinessModel and
 selected
 list of palette.
 PaletteTask   palette = new PaletteTask(..., new
 PropertyModelListTask(model, tasks), ...);

 Per

  PaletteTask   palette = new PaletteTask(.);

 form.add(palette);

 form.add(new IFormValidator() {

 @Override
 public void Validate(Form?   form) {
   // how to get a list of selected tasks???
 }
 });

 You have to set the model to the form by assigning the list or wrap it
 in
 a business model.
 Then you can do a form.getModelObject() in validate method and cast it
 to
 the assigned
 list or business model.

 Like this

 public class MyBusinessModel {
  public ListTask  getTasks() {
...
  }
 }

 public class MyComponent extends Panel {
  public MyComponent(String id, IModelMyBusinessModel  model) {
super(id, model);
FormMyBusinessModel  form = new Form(form, model);

  PaletteTask   palette = new PaletteTask(.);
  form.add(palette);

  form.add(new IFormValidator() {

 @Override
 public void Validate(Form?   form) {
  MyBusinessModel model = (MyBusinessModel) form.getModelObject();
   // how to get a list of selected tasks???
  ListTask   selectedTasks = model.getTasks();
 }
  });

  }
 }


 Hth
 Per

  I read that is a normal behavior. It's because validation occurs before
 model population.
 In that way when validation fails model won't be populated.

 So I would have to do something like textField.getInput() but I had a
 problem to get a model Object from a Palette.
 For example:

 PaletteTask   palette = new PaletteTask(.);
 form.add(palette);

 form.add(new IFormValidator() {

  @Override
  public void Validate(Form?   form) {
// how to get a list of selected tasks???
  }
 });

 So I made validation on onSubmit method of form. Now I'm fighting
 with
 localized message to finish.

 Thanks!
 Tito

 2011/5/31 Per Newgroper.new...@gmx.ch

  Am 31.05.2011 15:10, schrieb Tito:

  Is this ok?

  I have to validate model object but it's detached when validate of
 form
 validator is called. How can I make this validation?

 Thanks

  Provide some code describing the problem please.

  Cheers
 Per

 -
 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: Model detached before Validate of FormValidator

2011-06-01 Thread Tito
I read that is a normal behavior. It's because validation occurs before
model population.
In that way when validation fails model won't be populated.

So I would have to do something like textField.getInput() but I had a
problem to get a model Object from a Palette.
For example:

PaletteTask palette = new PaletteTask(.);
form.add(palette);

form.add(new IFormValidator() {

 @Override
 public void Validate(Form? form) {
   // how to get a list of selected tasks???
 }
});

So I made validation on onSubmit method of form. Now I'm fighting with
localized message to finish.

Thanks!
Tito

2011/5/31 Per Newgro per.new...@gmx.ch

 Am 31.05.2011 15:10, schrieb Tito:

  Is this ok?

 I have to validate model object but it's detached when validate of form
 validator is called. How can I make this validation?

 Thanks

  Provide some code describing the problem please.

 Cheers
 Per

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




Model detached before Validate of FormValidator

2011-05-31 Thread Tito
Is this ok?

I have to validate model object but it's detached when validate of form
validator is called. How can I make this validation?

Thanks


Specific Paletter Validator

2011-05-30 Thread Tito
Hi, I'm trying to add a Validator to a Palette.
The Idea is to check something related to List of selected Items.

I tryied to make something like this:

PaletteAccount palete = new PaletteAccount(..);
palette.getRecorderComponent().add(new myValidator());

I hoped that RecorderAccount expected a IValidatorListAccount on add
method, but it receives an IValidatorObject. How can I make some
validations over selected items of palette? What can I expect when I
getValue() of validatable param?

Regards

Tito


Re: MarkupNotFoundException strange behavior

2011-05-17 Thread Tito
Yes Clint. In fact extends from BasePage wich extends from WebPage. But the
point is, it's working except for one user y one computer.

Andrea, It's so weird. I asked user to remove Cookies, to try with anothers
navigators, and to refresh page. Not to clean cache, but while I'm having
this problem in my server (I checked it on log) I think it shouldn't be user
machine. Isn't it?

Thanks!
Tito

2011/5/16 andrea del bene andrea.on@libero.it

 Do you mean that on another computer with the same user you don't get the
 error?
 That sounds weird. Have you tried cleaning cache and temporary files on pc
 that gives error?

  Hi, I'm having this error:

org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html'
 for component 'com.keepcon.web.timetracking.EmployeeDedicationLoad' not
 found. Enable debug messages for org.apache.wicket.util.resource to get a
 list of all filenames tried.: [Page class =
 com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0, version = 0]
 Usually It's because html doesn't exist. But my application is deployed
 and
 working. Only with one user, and only in his computer (at least for the
 moment) I get this error.

 Does anyone know what could be causing this selective error?

 Thanks in advance

 Tito



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




Re: MarkupNotFoundException strange behavior

2011-05-17 Thread Tito
I don't know, I'm gonna ask him. But I have not access to user machine.
For now, I will still trying to get a more specific information about error.

2011/5/17 Andrea Del Bene adelb...@ciseonweb.it

 Is there any software on the infamous machine that could interfere with
 the tcp/ip connection (firewall, antivirus, security suite, etc...) ?

  Yes Clint. In fact extends from BasePage wich extends from WebPage. But
 the
 point is, it's working except for one user y one computer.

 Andrea, It's so weird. I asked user to remove Cookies, to try with
 anothers
 navigators, and to refresh page. Not to clean cache, but while I'm having
 this problem in my server (I checked it on log) I think it shouldn't be
 user
 machine. Isn't it?

 Thanks!
 Tito

 2011/5/16 andrea del beneandrea.on@libero.it

  Do you mean that on another computer with the same user you don't get the
 error?
 That sounds weird. Have you tried cleaning cache and temporary files on
 pc
 that gives error?

  Hi, I'm having this error:

org.apache.wicket.markup.MarkupNotFoundException: Markup of type
 'html'
 for component 'com.keepcon.web.timetracking.EmployeeDedicationLoad' not
 found. Enable debug messages for org.apache.wicket.util.resource to get
 a
 list of all filenames tried.: [Page class =
 com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0, version =
 0]
 Usually It's because html doesn't exist. But my application is deployed
 and
 working. Only with one user, and only in his computer (at least for the
 moment) I get this error.

 Does anyone know what could be causing this selective error?

 Thanks in advance

 Tito


  -
 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




MarkupNotFoundException strange behavior

2011-05-16 Thread Tito
Hi, I'm having this error:

   org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html'
for component 'com.keepcon.web.timetracking.EmployeeDedicationLoad' not
found. Enable debug messages for org.apache.wicket.util.resource to get a
list of all filenames tried.: [Page class =
com.keepcon.web.timetracking.EmployeeDedicationLoad, id = 0, version = 0]
Usually It's because html doesn't exist. But my application is deployed and
working. Only with one user, and only in his computer (at least for the
moment) I get this error.

Does anyone know what could be causing this selective error?

Thanks in advance

Tito


Re: Nested forms quick question

2011-05-06 Thread Tito
Are these necessarily nested forms?

2011/5/5 Alexandru Artimon aarti...@developmentgateway.org

 Hey guys,

 When I submit the main form can I prevent the submit of the inner forms?

 I have some small forms to add items to the main form. The fields in the
 inner forms have setRequired(true), so when I submit the main form I get
 errors that those fields are empty. Any ideas?

 Thanks,
 Alexandru

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




Css url unexpected change

2011-04-14 Thread Tito
I have a page with an external css file wich is linked from html file. I
mean, path is relative but hard.
I guess wicket rewrite urls but here is the strange thing:

I have a form with standar validation like a required field. I submit
without adding information and all work, then again I click submit and
unexpectedly my css path changed.

Originally was rsrc/screen.css and later ../rsrc/screen.css where obviously
the file is not and consequently my page lost all design.

Thanks

Tito


Re: Css url unexpected change

2011-04-14 Thread Tito
Yes, I know that wicket do that. But in my case wicket breaks it. Is it
posible?

2011/4/14 Martin Grigorov mgrigo...@apache.org

 Either use absolute url, or context relative or use ResourceReference to
 setup it.
 Otherwise Wicket will try to fix it for you.

 On Thu, Apr 14, 2011 at 1:19 PM, Tito njyt...@gmail.com wrote:

  I have a page with an external css file wich is linked from html file. I
  mean, path is relative but hard.
  I guess wicket rewrite urls but here is the strange thing:
 
  I have a form with standar validation like a required field. I submit
  without adding information and all work, then again I click submit and
  unexpectedly my css path changed.
 
  Originally was rsrc/screen.css and later ../rsrc/screen.css where
 obviously
  the file is not and consequently my page lost all design.
 
  Thanks
 
  Tito
 



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



Re: Css url unexpected change

2011-04-14 Thread Tito
Sorry, I understood your expression. But, I mean if it is my mistake or
could be a wicket bug... Because I can't see anything rare in the code.

2011/4/14 Martin Grigorov mgrigo...@apache.org

 Yes. By fix I meant that it will break it.
 Wicket tries to fix all relative urls. Since you don't use absolute
 (http://)
 or context relative one (/css/my.css) Wicket touches your resource url as
 well.

 On Thu, Apr 14, 2011 at 1:45 PM, Tito njyt...@gmail.com wrote:

  Yes, I know that wicket do that. But in my case wicket breaks it. Is it
  posible?
 
  2011/4/14 Martin Grigorov mgrigo...@apache.org
 
   Either use absolute url, or context relative or use ResourceReference
 to
   setup it.
   Otherwise Wicket will try to fix it for you.
  
   On Thu, Apr 14, 2011 at 1:19 PM, Tito njyt...@gmail.com wrote:
  
I have a page with an external css file wich is linked from html
 file.
  I
mean, path is relative but hard.
I guess wicket rewrite urls but here is the strange thing:
   
I have a form with standar validation like a required field. I submit
without adding information and all work, then again I click submit
 and
unexpectedly my css path changed.
   
Originally was rsrc/screen.css and later ../rsrc/screen.css where
   obviously
the file is not and consequently my page lost all design.
   
Thanks
   
Tito
   
  
  
  
   --
   Martin Grigorov
   jWeekend
   Training, Consulting, Development
   http://jWeekend.com http://jweekend.com/
  
 



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



Re: Css url unexpected change

2011-04-14 Thread Tito
Thanks!
I solved it using another url mounting strategy.

2011/4/14 Martin Grigorov mgrigo...@apache.org

 This is how Wicket works.
 You need to pick one of the options I enumerated in my first mail.

 On Thu, Apr 14, 2011 at 2:41 PM, Tito njyt...@gmail.com wrote:

  Sorry, I understood your expression. But, I mean if it is my mistake or
  could be a wicket bug... Because I can't see anything rare in the code.
 
  2011/4/14 Martin Grigorov mgrigo...@apache.org
 
   Yes. By fix I meant that it will break it.
   Wicket tries to fix all relative urls. Since you don't use absolute
   (http://)
   or context relative one (/css/my.css) Wicket touches your resource url
 as
   well.
  
   On Thu, Apr 14, 2011 at 1:45 PM, Tito njyt...@gmail.com wrote:
  
Yes, I know that wicket do that. But in my case wicket breaks it. Is
 it
posible?
   
2011/4/14 Martin Grigorov mgrigo...@apache.org
   
 Either use absolute url, or context relative or use
 ResourceReference
   to
 setup it.
 Otherwise Wicket will try to fix it for you.

 On Thu, Apr 14, 2011 at 1:19 PM, Tito njyt...@gmail.com wrote:

  I have a page with an external css file wich is linked from html
   file.
I
  mean, path is relative but hard.
  I guess wicket rewrite urls but here is the strange thing:
 
  I have a form with standar validation like a required field. I
  submit
  without adding information and all work, then again I click
 submit
   and
  unexpectedly my css path changed.
 
  Originally was rsrc/screen.css and later ../rsrc/screen.css where
 obviously
  the file is not and consequently my page lost all design.
 
  Thanks
 
  Tito
 



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

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



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



Custom head title on subpage

2011-04-12 Thread Tito
Hi I don't know the best way to make title of page depends on subpage.

I have a BasePage with a header, footer, etc. My concrete pages extends from
BasePage. Then I want to have different title on each page.

What do you recomend?

Thanks


Re: Custom head title on subpage

2011-04-12 Thread Tito
I like this Idea but, how do you solve language issue?
I mean, how can i do in concrete class to provide a different title
depending on language.

Now i'm working with a properties file with wicket:message key=page.title
/
Defining a properties file for every page it seems to work but it is not so
confortable.

Thanks for the answer!


2011/4/12 Michael O'Cleirigh michael.ocleir...@rivulet.ca

 You can normally use wicket in the head or wicket:head sections.

 I use this approach to set my page favicon (which is the link tag).

 It should also work for the title tag.

 e.g. put a wicket:id into the title tag in the head section of the base
 page:

 html
 head
 title wicket:id=title/title
 /head
 body
 wicket:child/
 /body
 /html

 And then in your BasePage:

 onInitialize() {

add (new Label(title, provideTitleModel());

 }

 /**
  * Let the concrete child classes provide the content for the title.
  */
 protected abstract IModelStringprovideTitleModel();

 Regards,

 Mike

  Hi I don't know the best way to make title of page depends on subpage.

 I have a BasePage with a header, footer, etc. My concrete pages extends
 from
 BasePage. Then I want to have different title on each page.

 What do you recomend?

 Thanks



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




Re: Custom head title on subpage

2011-04-12 Thread Tito
Thank you everybody.

I think it could be solve with .properties hierarchy in that case. I don't
have to use java code and just redifining page.title property for every page
it should work.

I thought perhaps wicket had something like a page template that i could
override in html concrete page.

Tito

2011/4/12 sonxurxo sonxu...@gmail.com

 What about using Page#getString(String key) method? If you have your
 .properties files with language suffixes (e.g. MyPage_en.properties,
 MyPage_es.properties, MyPage_fr.properties) Wicket will automatically
 retrieve the String resource from the properties file of the session
 language.

 -
 http://blog.sonxurxo.com
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Custom-head-title-on-subpage-tp381p3444664.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: Custom head title on subpage

2011-04-12 Thread Tito
Thank you Igor, I'm reading this now.

Tito

2011/4/12 Igor Vaynberg igor.vaynb...@gmail.com

 My book had a recipe for a flexible solution for managing the page
 title, and as luck would have it its in the chapter that was made
 available for free:
 http://www.packtpub.com/sites/default/files/downloads/1605_Chapter12.pdf

 -igor


 On Tue, Apr 12, 2011 at 7:40 AM, Tito njyt...@gmail.com wrote:
  Thank you everybody.
 
  I think it could be solve with .properties hierarchy in that case. I
 don't
  have to use java code and just redifining page.title property for every
 page
  it should work.
 
  I thought perhaps wicket had something like a page template that i could
  override in html concrete page.
 
  Tito
 
  2011/4/12 sonxurxo sonxu...@gmail.com
 
  What about using Page#getString(String key) method? If you have your
  .properties files with language suffixes (e.g. MyPage_en.properties,
  MyPage_es.properties, MyPage_fr.properties) Wicket will automatically
  retrieve the String resource from the properties file of the session
  language.
 
  -
  http://blog.sonxurxo.com
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Custom-head-title-on-subpage-tp381p3444664.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: Feedback panel on modal window

2010-12-02 Thread Tito
Good I fixed it. Thanks.
I added feedback panel to target. But I redined onError to do that, because
feedback is for errors in my case.

Thanks for the answer.

Bye
Tito

2010/12/2 Andrea Del Bene adelb...@ciseonweb.it

 Hi Tito,

 how do you send form inside modal window? I guess you are sending it by
 AJAX. I've written a similar modal window few weeks ago. Be sure to add your
 feedback panel to thw AjaxRequestTarget object of submitting component.

 Bye.

  Hi, I have one model window with a panel atached.
 I added a validator to one form in model window. But when I try to submit
 I
 can't show errors.
 Whatching the console I found it: WARN  - WebSession -
 Component-targetted feedback message was left unrendered. This could be
 because you are missing a FeedbackPanel on the page.
 I have a feedback panel on page, however I would like to have another one
 on
 modal window.
 But now I'm not getting any kind of message.

 Thanks
 Tito





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




Feedback panel on modal window

2010-12-01 Thread Tito
Hi, I have one model window with a panel atached.
I added a validator to one form in model window. But when I try to submit I
can't show errors.
Whatching the console I found it: WARN  - WebSession -
Component-targetted feedback message was left unrendered. This could be
because you are missing a FeedbackPanel on the page.
I have a feedback panel on page, however I would like to have another one on
modal window.
But now I'm not getting any kind of message.

Thanks
Tito


HeaderContributor wicket 1.5 dissapeared?

2010-10-22 Thread Tito
Hello!

I have a short question. Does IHeaderContributor interface dissapeared in
wicket 1.5 version? Or only dissapeared HeaderContributor class?
I'm ussing headerContributor to add javascript code in header and if it's
true I don't know how to migrate. I use it for GoogleMaps javascript code.

Thanks!

Bye


Re: HeaderContributor wicket 1.5 dissapeared?

2010-10-22 Thread Tito
Thank you!
It is easyer that I'm hoped!

2010/10/22 Martin Grigorov mgrigo...@apache.org


 https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-ComponentandIBehaviorimplementIHeaderContributor

 On Fri, Oct 22, 2010 at 4:53 PM, Tito njyt...@gmail.com wrote:

  Hello!
 
  I have a short question. Does IHeaderContributor interface dissapeared in
  wicket 1.5 version? Or only dissapeared HeaderContributor class?
  I'm ussing headerContributor to add javascript code in header and if it's
  true I don't know how to migrate. I use it for GoogleMaps javascript
 code.
 
  Thanks!
 
  Bye
 



Button submit and onclick event right way

2010-10-18 Thread Tito
Hello everybody!
This is a question of what is the right way to do this.

The idea is, I'm submiting information with a submit button from a form. But
at the same time I want to send another information (generated by
javascript) by ajax. Is clear what I'm trying to do?

Well at this time I have made a behavior that I'm atatching to my webpage,
that process one call made by ajax with wicketAjaxGet function in witch part
of information travel. And at the same time process the rest of information
by onSubmit method after form submitting.

I hope I explained well. I just wanna now what is the correct way to do
this.

Thanks a lot.

Bye
Tito


Re: Button submit and onclick event right way

2010-10-18 Thread Tito
mmm good question...

In fact I wanted to do that. But I couldn't found the way to send all
information in one request. I don't know how to send that information that I
get with javascript.

2010/10/18 jcgarciam jcgarc...@gmail.com


 Just by curiosity why not sending all information in one request (on form
 submit), rather than two separate http request?

 You can leave the onclick of your button to submit your form via javascript
 which also previously massage the additional data you need.


 On Mon, Oct 18, 2010 at 8:46 PM, Tito [via Apache Wicket] 
 ml-node+3001276-352039908-65...@n4.nabble.comml-node%2b3001276-352039908-65...@n4.nabble.com
 ml-node%2b3001276-352039908-65...@n4.nabble.comml-node%252b3001276-352039908-65...@n4.nabble.com
 
  wrote:

  Hello everybody!
  This is a question of what is the right way to do this.
 
  The idea is, I'm submiting information with a submit button from a form.
  But
  at the same time I want to send another information (generated by
  javascript) by ajax. Is clear what I'm trying to do?
 
  Well at this time I have made a behavior that I'm atatching to my
 webpage,
  that process one call made by ajax with wicketAjaxGet function in witch
  part
  of information travel. And at the same time process the rest of
 information
 
  by onSubmit method after form submitting.
 
  I hope I explained well. I just wanna now what is the correct way to do
  this.
 
  Thanks a lot.
 
  Bye
  Tito
 
 
  --
   View message @
 
 http://apache-wicket.1842946.n4.nabble.com/Button-submit-and-onclick-event-right-way-tp3001276p3001276.html
  To start a new topic under Apache Wicket, email
  ml-node+1842946-398011874-65...@n4.nabble.comml-node%2b1842946-398011874-65...@n4.nabble.com
 ml-node%2b1842946-398011874-65...@n4.nabble.comml-node%252b1842946-398011874-65...@n4.nabble.com
 
  To unsubscribe from Apache Wicket, click here
 http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=
 .
 
 
 


 --
 Sincerely,
 JC (http://www.linkedin.com/in/jcgarciam)
 Work smarter, not harder!.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Button-submit-and-onclick-event-right-way-tp3001276p3001327.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: Button submit and onclick event right way

2010-10-18 Thread Tito
So, you say that I could put information in some hidden fields?

In that case I suppose doesn't matter if I submit by ajax or a simple http
request.
I think I could use Hidden Fields, but I didn't realize before.

Thanks!

2010/10/18 jcgarciam jcgarc...@gmail.com


 Well without knowing much detail of your implementation i could say, you
 need to use one of the function wicketAjaxGet or wicketAjaxPost to actually
 post the content of your form to wicket. In the server side depending on
 how
 you have setup your Model or set your hidden fields in the html form you
 can
 retrieve later your field by using:

 Not a very orthodoxy way:
 WebRequest.get().getRequestParameter(yourHiddendFieldName)

 On Mon, Oct 18, 2010 at 10:55 PM, Tito [via Apache Wicket] 
 ml-node+3001345-678496819-65...@n4.nabble.comml-node%2b3001345-678496819-65...@n4.nabble.com
 ml-node%2b3001345-678496819-65...@n4.nabble.comml-node%252b3001345-678496819-65...@n4.nabble.com
 
  wrote:

  mmm good question...
 
  In fact I wanted to do that. But I couldn't found the way to send all
  information in one request. I don't know how to send that information
 that
  I
  get with javascript.
 
  2010/10/18 jcgarciam [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3001345i=0
 
 
  
   Just by curiosity why not sending all information in one request (on
 form
 
   submit), rather than two separate http request?
  
   You can leave the onclick of your button to submit your form via
  javascript
   which also previously massage the additional data you need.
  
  
   On Mon, Oct 18, 2010 at 8:46 PM, Tito [via Apache Wicket] 
   [hidden email] http://user/SendEmail.jtp?type=nodenode=3001345i=1
 [hidden
  email] http://user/SendEmail.jtp?type=nodenode=3001345i=2
   [hidden email] http://user/SendEmail.jtp?type=nodenode=3001345i=3
 [hidden
  email] http://user/SendEmail.jtp?type=nodenode=3001345i=4
   
wrote:
  
Hello everybody!
This is a question of what is the right way to do this.
   
The idea is, I'm submiting information with a submit button from a
  form.
But
at the same time I want to send another information (generated by
javascript) by ajax. Is clear what I'm trying to do?
   
Well at this time I have made a behavior that I'm atatching to my
   webpage,
that process one call made by ajax with wicketAjaxGet function in
 witch
 
part
of information travel. And at the same time process the rest of
   information
   
by onSubmit method after form submitting.
   
I hope I explained well. I just wanna now what is the correct way to
 do
 
this.
   
Thanks a lot.
   
Bye
Tito
   
   
--
 View message @
   
  
 
 http://apache-wicket.1842946.n4.nabble.com/Button-submit-and-onclick-event-right-way-tp3001276p3001276.html
 
 http://apache-wicket.1842946.n4.nabble.com/Button-submit-and-onclick-event-right-way-tp3001276p3001276.html?by-user=t
 
To start a new topic under Apache Wicket, email
[hidden email] http://user/SendEmail.jtp?type=nodenode=3001345i=5
 [hidden
  email] http://user/SendEmail.jtp?type=nodenode=3001345i=6
   [hidden email] http://user/SendEmail.jtp?type=nodenode=3001345i=7
 [hidden
  email] http://user/SendEmail.jtp?type=nodenode=3001345i=8
   
To unsubscribe from Apache Wicket, click here
  
 
 http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=
 
 http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842946code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=by-user=t
 
   .
   
   
   
  
  
   --
   Sincerely,
   JC (http://www.linkedin.com/in/jcgarciam)
   Work smarter, not harder!.
  
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/Button-submit-and-onclick-event-right-way-tp3001276p3001327.html
 
 http://apache-wicket.1842946.n4.nabble.com/Button-submit-and-onclick-event-right-way-tp3001276p3001327.html?by-user=t
 
   Sent from the Users forum mailing list archive at Nabble.com.
  
   -
   To unsubscribe, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3001345i=9
   For additional commands, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=3001345i=10
  
  
 
 
  --
   View message @
 
 http://apache-wicket.1842946.n4.nabble.com/Button-submit-and-onclick-event-right-way-tp3001276p3001345.html
  To start a new topic under Apache Wicket, email
  ml-node+1842946-398011874-65...@n4.nabble.comml-node%2b1842946-398011874-65...@n4.nabble.com
 ml-node%2b1842946-398011874-65...@n4.nabble.comml-node%252b1842946-398011874-65...@n4.nabble.com
 
  To unsubscribe from Apache Wicket, click here
 http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=1842946code

Re: Forms ajax doesn't update components models

2010-10-07 Thread Tito
I made a quickstart and it works.

Now I'm looking for the bug in my application.

Thanks

Tito

2010/10/6 Tito njyt...@gmail.com

 Well thank you!!

 I'm going to see this. If I see another details or if I can solve I will
 tell you.

 Thank you very much for helping!

 Bye


 2010/10/6 vov vov...@mail.ru


 Sorry, but I'm not see the problems.
 Try to debug your isVisible method after submitting the form and find the
 place in which this code return false. I think that isVisibleInHierarchy()
 for your RequiredTextFieldString(patente) will have a problem
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.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: Forms ajax doesn't update components models

2010-10-07 Thread Tito
It was a Wicket 1.5-M1 bug!

I made a quickstart accidentally in wicket 1.5-M2.1 and it worked.

The problem is that wicket 1.5-M2 don't have HeaderContributor anymore haha.

Well thanks for every body, I wanted to warn.
Bye

Tito

2010/10/7 Tito njyt...@gmail.com

 I made a quickstart and it works.

 Now I'm looking for the bug in my application.

 Thanks

 Tito

 2010/10/6 Tito njyt...@gmail.com

 Well thank you!!

 I'm going to see this. If I see another details or if I can solve I will
 tell you.

 Thank you very much for helping!

 Bye


 2010/10/6 vov vov...@mail.ru


 Sorry, but I'm not see the problems.
 Try to debug your isVisible method after submitting the form and find the
 place in which this code return false. I think that
 isVisibleInHierarchy()
 for your RequiredTextFieldString(patente) will have a problem
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.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: Forms ajax doesn't update components models

2010-10-06 Thread Tito
Well thank you!!

I'm going to see this. If I see another details or if I can solve I will
tell you.

Thank you very much for helping!

Bye


2010/10/6 vov vov...@mail.ru


 Sorry, but I'm not see the problems.
 Try to debug your isVisible method after submitting the form and find the
 place in which this code return false. I think that isVisibleInHierarchy()
 for your RequiredTextFieldString(patente) will have a problem
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2964459.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: Forms ajax doesn't update components models

2010-10-05 Thread Tito
Sorry feedback panel error was part of my coding prune to post.

I can see submit method is called but data never appear. However other data
of form that is not in auto_info_panel appears in model.

In your tests data of map was setting to model??

The curious case is that when I change isVisible method of Auto_Info_Panel
to

   contenedorInfo.add(new AutoInfoPanel(auto_info_panel, model) {

@Override
public boolean isVisible() {
return
model.getObject().getTipo().equals(TipoDispositivo.AUTO) || true;
}
});

Form start to work. Model is full filled.

Could be a wicket 1.5 problem?? did you test in wicket 1.4?

Thank you!

Norberto

2010/10/5 vov vov...@mail.ru


 Funny:) Your code is correct and in my tests all data was setting to
 model:)
 In your sample code you forgot to include feedback panel, but it was added
 to html.
 May be in your tests you forget to input some required data - in this case
 your model never updates but you also never been in your onSubmit method.

 Problem can be in any validation problem or in visibility of component or
 your component can be disabled
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2955537.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: Forms ajax doesn't update components models

2010-10-04 Thread Tito
mmm... you think is my model?
Could be, but debugging wicket I found never was called setObject method of
my model.
I'm using wicket 1.5 I know this doesn't matter but I never mentioned.

Here is my AutoInfoPanel. The idea is to update a Map that contains data.
There are three maps in my auto_info_panel but I reduced this for
simplicity. Three are the same.

Java:

public class AutoInfoPanel extends Panel {

public AutoInfoPanel(String id, final IModelDispositivoDTO model) {
 super(id, model);

add(new RequiredTextFieldString(patente, new IModelString() {

@Override
public void detach() {
}

@Override
public String getObject() {
return model.getObject().getInfo().get(patente);
 }

@Override
public void setObject(String object) {
 model.getObject().getInfo().put(patente, object);
}

 }));
}
}

And HTML:

wicket:panel
 fieldset
 legendInformación del Automóvil:/legend
 ol
 li
labelPatente:*/label
input wicket:id=patente type=text /
 /li
 /ol
 /fieldset
 /wicket:panel


Thanks for following this thread!!

Tito

2010/10/4 vov vov...@mail.ru


 Your code looks correct.
 You said 'when you click Registrar button, data from auto_info_panel
 don't appear in DispositivoDTO model'.

 I tried to create AutoInfoPanel like this:

 public AutoInfoPanel(String id, IModelDispositivoDTO model)
  {
super(id);
add(new TextFieldString(lastName, new PropertyModelString(model,
 lastName)));
  }
 ..and HTML:
 wicket:panel
LastNameinput type=text wicket:id=lastName
 /wicket:panel

 ..and in your onSubmit(IModelDispositivoDTO model) method i take the last
 name from bean model wich I input in the form.

 Can your share your AutoInfoPanel code for better understanding the
 problem?
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2953949.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: Forms ajax doesn't update components models

2010-10-01 Thread Tito
I have to submit only info of selected combo option. But i can't show entire 
form when combo changes because part of form is fixed.

If i select auto, only info of auto_info_panel matters. The same way to persona.

I don't know if you were asking that. I hope i answered correctly.

Thanks!

--Mensaje original--
De: vov
Para: users@wicket.apache.org
Responder a: users@wicket.apache.org
Asunto: Re: Forms ajax doesn't update components models
Enviado: 1 oct, 2010 04:19


How it currently must work?
Example:
Your open the page - change your Combo to 'AUTO' - input data to
AutoInfoPanel and press 'Registrar'
OR
Your open the page - change your Combo to 'AUTO' - input data to
AutoInfoPanel - change your Combo to 'PERSONA' - input data to
PersonaInfoPanel and press 'Registrar'.


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Forms-ajax-doesn-t-update-components-models-tp2730857p2854298.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



Tito

Forms ajax doesn't update components models

2010-09-30 Thread Tito
Hello,

I'm doing a form that adds textfields when I choose an option in a ComboBox.
When Combo changes one panel become visible and other invisible.
The problem is when that panel appears and I click submit button the model
of it does't update.
I have seen that browser submit the info, but wicket doesn't process it. I
don't know if i'm doing anything wrong or is a known problem.

Thank you.
Excuse me for my bad English. I'm from Argentina.

Norberto


301 redirect

2010-02-18 Thread Matías G. Tito
Hi friends, I need to do an 301 redirect in place of 302. I try, but 
still I get 302:


   RedirectRequestTarget target = new RedirectRequestTarget(url) {
   @Override
   public void respond(RequestCycle requestCycle) {
   WebResponse response = (WebResponse) requestCycle
   .getResponse();
   response.reset();
   response.getHttpServletResponse().setStatus(
   HttpServletResponse.SC_MOVED_PERMANENTLY);
   response.redirect(url);
   }
   };
   getRequestCycle().setRequestTarget(target);



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



Re: 301 redirect

2010-02-18 Thread Matías G. Tito

Yes, I test it and works but I feel that is not a real 301 :p

Martin Makundi wrote:

http://old.nabble.com/301-Redirect-td27030778.html

2010/2/18 Matías G. Tito mt...@zauber.com.ar:
  

Hi friends, I need to do an 301 redirect in place of 302. I try, but still I
get 302:

  RedirectRequestTarget target = new RedirectRequestTarget(url) {
  @Override
  public void respond(RequestCycle requestCycle) {
  WebResponse response = (WebResponse) requestCycle
  .getResponse();
  response.reset();
  response.getHttpServletResponse().setStatus(
  HttpServletResponse.SC_MOVED_PERMANENTLY);
  response.redirect(url);
  }
  };
  getRequestCycle().setRequestTarget(target);



-
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



Create Wikcet Filter

2010-02-18 Thread Matías G. Tito

I'm loking for creatting a basic wicket filter for /

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



original target during a session expired

2009-08-14 Thread Matías Gonzalo Tito


I am hoping for some advice on this.  Is there a way to obtain the original
target during a *session* *expired* scenario?  I know you can register a 
Page

class as a handler of this event, but I would like to know which Page the
originating request was destined for.

Thanks!

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



TinyMceBehavior alternative

2009-06-25 Thread Matí­as Tito

Hi, somebody known a TinyMceBehavior alternative (?)

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



ModalWindow Position

2009-04-21 Thread Matías Tito
Hi, I have the following problem.
I add a ModalWindow in a Page. I want to change the initial top-position
of that. I try adding an AtributteModifier but it doesn't work. 

Thanks!


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



getAllSession method?

2009-04-15 Thread Matías Tito
Hi, I was trying but I couldn't find a method in my Wicket Aplication
like geAllSession. How can I do that?


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



Diference between model's

2009-03-20 Thread Matías Tito
I'm starting on wicket and I don't underdestand diferences between
LoadableDetachableModel and DetachableModel.


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



bookmarkable links

2009-02-19 Thread Matías Tito
Hi, I am beginnig on Wicket. Well, my questions is:

Diferences beetwen bookmarkablelink and links


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



Nested Label Components

2009-02-12 Thread Matías Tito
How can I nested label components?

WicketMessage: Expected close tag for 'li
wicket:id=groupDescription' Possible attempt to embed component(s)
'span wicket:id=qtyMembers' in the body of this component which
discards its body

html xmlns:wicket
wicket:panel

h3 wicket:id=usernamejphernandez/h3

div class=loginCnt
div class=nav
   a href=#Mi perfil/anbsp;|nbsp;
   a wicket:id=logout href=#Salir/a
/div
div class=datos floatFix
wicket:link
img src=resources/icons/avatar_side.gif alt=/
/wicket:link
b#/b Notas / b#/bDebatesbr/
# puntos en este torneobr/
# es mi posición en elbr/
ranking de este torneo/div
div class=adicional
a wicket:id=groupsListPage href=#strongMis Grupos y 
Foros/strong/a
ul wicket:id=groupList
li wicket:id=groupDescriptionGRUPO
span wicket:id=qtyMembers( # Participantes)/span
/li
/ul
br /
span wicket:id=navigator/span
/div  
/div
/wicket:panel
/html



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



Re: Nested Label Components

2009-02-12 Thread Matías Tito
I need to use span tag inside a li tag, both has a label componente.
Then I get Expected close tag for 'li.
ul wicket:id=groupList
li wicket:id=groupDescriptionGRUPO
span wicket:id=qtyMembers( #
 Participantes)/span
/li
/ul

On Thu, 2009-02-12 at 18:22 +0100, Thomas Mäder wrote:
 You cannot nest components inside labels. What are you trying to achieve?
 
 Thomas
 
 On Thu, Feb 12, 2009 at 5:02 PM, Matías Tito mt...@zauber.com.ar wrote:
 
  How can I nested label components?
 
  WicketMessage: Expected close tag for 'li
  wicket:id=groupDescription' Possible attempt to embed component(s)
  'span wicket:id=qtyMembers' in the body of this component which
  discards its body
 
  html xmlns:wicket
  wicket:panel
 
 h3 wicket:id=usernamejphernandez/h3
 
 div class=loginCnt
 div class=nav
a href=#Mi perfil/anbsp;|nbsp;
a wicket:id=logout href=#Salir/a
 /div
 div class=datos floatFix
 wicket:link
 img src=resources/icons/avatar_side.gif alt=/
 /wicket:link
 b#/b Notas / b#/bDebatesbr/
 # puntos en este torneobr/
 # es mi posición en elbr/
 ranking de este torneo/div
 div class=adicional
 a wicket:id=groupsListPage href=#strongMis Grupos y
  Foros/strong/a
 ul wicket:id=groupList
 li wicket:id=groupDescriptionGRUPO
 span wicket:id=qtyMembers( #
  Participantes)/span
 /li
 /ul
 br /
 span wicket:id=navigator/span
 /div
 /div
  /wicket:panel
  /html
 
 
 
  -
  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