[Wicket-user] Info-Message for DropDownChoice

2006-09-26 Thread MailingWicketUser
Title: Info-Message for DropDownChoice






Hello,


I'm using a DropDownChoice and I have one entry which shouldn't be selected.

I implemented a validator which captures this feature. The validator does the right thing but only when the page is submitted.

The problem is that I need an info message before submitting the form!

Here some code:


The DropDownChoice initialized in the Page-Constructor:


XXXDropDownChoice dropDownChoice = new XXXDropDownChoice(

xxx, listModel, new ChoiceRenderer(name,

  id), false);

  dropDownChoice.add(new XXXChoiceValidator());

  form.add(dropDownChoice);

  if (!dropDownChoice.isChoiceAvailable()){

   getFeedbackMessages().info(dropDownChoice ,An info text!); 

  }


The method isChoiceAvailable() in my XXXDropDownChoice is implemented using the model and the choices:


 public boolean isChoiceAvailable(){

  List baseChoicesList = super.getChoices();

  Object choiceObject = getModelObject();

  return baseChoicesList.contains(choiceObject);

 }


Thanks for Help,


Daniel



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Info-Message for DropDownChoice

2006-09-26 Thread MailingWicketUser
Title:  Info-Message for DropDownChoice






An additional problem is that the entry can be the default selection! 

So the user makes no changes in the dropdownchoice! 


Overriding the methods wantOnSelectionChangedNotifications() and onSelectionChanged() is not the right way! I just want to add an info-message! 

Today I debugged my code and the result is that the method getModelObject() in the method isChoiceAvailable() provides null! In the page I use a CompoundPropertyModel and the id xxx is a property of the page-model-object! 

Daniel



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Info-Message for DropDownChoice

2006-09-26 Thread MailingWicketUser
Title: Re: [Wicket-user] Info-Message for DropDownChoice






Hello,


I don't want to submit the page!


When I display the page the first time, an entry in the dropdownchoice is selected (due to the property). The only thing is that I need an info-Message, so that the user can change the selection.

When I submit the page my Validator adds an error-Message, so that the form-processing is halted.

But this error-message is too late! I just want to add an info-message when displaying the page initial!


Daniel



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Info-Message for DropDownChoice

2006-09-26 Thread MailingWicketUser
Title: Re: [Wicket-user] Info-Message for DropDownChoice






Hello,


the main problem is not the info-message.

When I call info(bla) in thze constructor, then the message is displayed.


I think the main problem is that the method getModelObject() (see method isChoiceAvailable())provides null, but it should not be null!

Here again my code:


The DropDownChoice initialized in the Page-Constructor: 

XXXDropDownChoice dropDownChoice = new XXXDropDownChoice(
xxx, listModel, new ChoiceRenderer(name,
id), false);
dropDownChoice.add(new XXXChoiceValidator());
form.add(dropDownChoice);
if (!dropDownChoice.isChoiceAvailable()){
getFeedbackMessages().info(dropDownChoice ,An info text!);
} 

The method isChoiceAvailable() in my XXXDropDownChoice is implemented using the model and the choices:



public boolean isChoiceAvailable(){
List baseChoicesList = super.getChoices();
Object choiceObject = getModelObject();
return baseChoicesList.contains(choiceObject);
} 


Daniel



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Info-Message for DropDownChoice

2006-09-26 Thread MailingWicketUser
Title: Re: [Wicket-user] Info-Message for DropDownChoice






Hello,


my Model-Object has Gettes and Setters, but the method getModel() in the method isChoiceAvailable() returns null!


Daniel



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Setting column-widths in DataTable

2006-04-13 Thread MailingWicketUser
Title: Setting column-widths in DataTable







Hi!


Is there an elegant way to set the column widths when using a DataTable (from wicket-extensions)? As this is a matter of design, I anticipate a solution where I can set the widths in HTML or CSS. Something like the following would be nice:

table wicket:id=table

 colgroup

 col width=100 /

 col width=100 /

 /colgroup

/table


Regards,


Timo Verhoeven





[Wicket-user] Problems with DropDownChoice in ListView

2006-04-13 Thread MailingWicketUser
Title: Problems with DropDownChoice in ListView






Hi,


I'am using a DropDownChoices in a ListView.

To select another entry in the DropDownChoice I use ImageButtons and Labels creating _javascript_.


If I use the DropDownChoice and an ImageButton outside a ListView, the manipulation performed well.

Inside the ListView the script-Label will not be updated.


If I replace the ImageButton with a simple Button the onSubmit()-method is not called ?!


In the appendix you find samples. BugTestPage.html  BugTestPage.java 


Daniel Hakenjos

__

SSZ  Softwarelösung zur SparkassenSonderZahlung
GuideCom unterstützt mit bewährtem Prozessverständnis und fun-

dierter Kenntnis der Schnittstellen zum Rechenzentrum bei der

Überführung des Fachkonzepts in eine integrierte, sichere und

auf die individuellen Anforderungen zugeschnittene Anwendung.


Weitere Informationen unter http://news.guidecom.de
__

GuideCom | Ihre Prozesse. Ihre Sprache.

Daniel Hakenjos | Software Entwickler

GuideCom GmbH | Hafenweg 14 | 48155 Münster
Fon +49 (251) 91 59 190
Fax +49 (251) 91 59 100
www.guidecom.de
__ 








	BugTest

	
	
		
		
			
			 
 
			 
			
			
			
			
		
		
	
	
			 
 
			 
			
			
	




BugTestPage.java
Description: BugTestPage.java


AW: [Wicket-user] Setting column-widths in DataTable

2006-04-13 Thread MailingWicketUser

Thank's for you feedback! 

Skimming thru the javadocs of the DataTable classes I overlooked the 
newCellItem method in DataTable. Overwriting this I can now add css-class 
attributes to the td tags using the following code:

DataTable dataTable = new DataTable(table, columns, dataProvider, 
rowsPerPage) {
protected Item newCellItem(String id, int index, IModel model) {
Item item = new Item(id, index, model);
item.add(new SimpleAttributeModifier(class, col + index));
return item;
}
};

Regards,

Timo Verhoeven

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Juergen 
Donnerstag
Bereitgestellt: Donnerstag, 13. April 2006 11:58
Bereitgestellt in: User
Unterhaltung: [Wicket-user] Setting column-widths in DataTable
Betreff: Re: [Wicket-user] Setting column-widths in DataTable


I guess there are plenty of HTML and CSS ref and tutorial pages out there:
http://www.selfhtml.org/
http://www.w3schools.com/html/
http://www.w3schools.com/css/default.asp

Juergen

On 4/13/06, MailingWicketUser [EMAIL PROTECTED] wrote:



 Hi!

 Is there an elegant way to set the column widths when using a 
 DataTable (from wicket-extensions)? As this is a matter of design, I 
 anticipate a solution where I can set the widths in HTML or CSS. 
 Something like the following would be nice:

 table wicket:id=table
   colgroup
 col width=100 /
 col width=100 /
   /colgroup
 /table

 Regards,

 Timo Verhoeven


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language 
that extends applications into web and mobile media. Attend the live webcast 
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=kkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


AW: [Wicket-user] Setting column-widths in DataTable

2006-04-13 Thread MailingWicketUser
 
For the records: My first approach worked well until the DataTable hit an empty 
list. In that case, newCellItem is never called as there is no data to be 
displayed. Hence the still visible table headers had wrong widths. I had to 
create a copy of HeadersToolbar and add the line

header.add(new SimpleAttributeModifier(class, col + i));

Now I can apply the css width settings to the th tags.


-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von 
MailingWicketUser
Bereitgestellt: Donnerstag, 13. April 2006 13:30
Bereitgestellt in: User
Unterhaltung: [Wicket-user] Setting column-widths in DataTable
Betreff: AW: [Wicket-user] Setting column-widths in DataTable



Thank's for you feedback! 

Skimming thru the javadocs of the DataTable classes I overlooked the 
newCellItem method in DataTable. Overwriting this I can now add css-class 
attributes to the td tags using the following code:

DataTable dataTable = new DataTable(table, columns, dataProvider, 
rowsPerPage) {
protected Item newCellItem(String id, int index, IModel model) {
Item item = new Item(id, index, model);
item.add(new SimpleAttributeModifier(class, col + index));
return item;
}
};

Regards,

Timo Verhoeven

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Juergen 
Donnerstag
Bereitgestellt: Donnerstag, 13. April 2006 11:58 Bereitgestellt in: User
Unterhaltung: [Wicket-user] Setting column-widths in DataTable
Betreff: Re: [Wicket-user] Setting column-widths in DataTable


I guess there are plenty of HTML and CSS ref and tutorial pages out there:
http://www.selfhtml.org/
http://www.w3schools.com/html/
http://www.w3schools.com/css/default.asp

Juergen

On 4/13/06, MailingWicketUser [EMAIL PROTECTED] wrote:



 Hi!

 Is there an elegant way to set the column widths when using a 
 DataTable (from wicket-extensions)? As this is a matter of design, I 
 anticipate a solution where I can set the widths in HTML or CSS.
 Something like the following would be nice:

 table wicket:id=table
   colgroup
 col width=100 /
 col width=100 /
   /colgroup
 /table

 Regards,

 Timo Verhoeven


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language 
that extends applications into web and mobile media. Attend the live webcast 
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=kkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language 
that extends applications into web and mobile media. Attend the live webcast 
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=kkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Emulating User Input in a Form

2006-04-08 Thread MailingWicketUser
Title: Emulating User Input in a Form







Hi!


I have a use-case I'd like to solve. Unfortunately I see no way to realize it with Wicket. I searched the lists for a similar question but found nothing.

I have a Form containing various FormComponents, one of it is a DropDownChoice. Because the list of choices is very long, I'd like to allow the User to click on a button which takes him to a separate page where he can select a choice from a list, which he can sort and filter. Upon selecting a choice he should be taken back to the page with the DropDownChoice and the DropDownChoice should show the choice he just picked from the list. 

Unfortunately, I see no way of setting the value of the DropDownChoice in the way it would have happened if the user selected a value using only the DropDownChoice itself. Basically I want to emulate the user operating the DropDownChoice using the method described above. I.e. it is not an option the change the underlying model. Everything has to happen before/without validation. I cannot touch/update the model until the user clicks the save (submit) button due to persistency constraints.

Can anyone think of a way I could implement this use-case with Wicket?


Regards,


Timo Verhoeven