Re: How to resolve this java.util.ConcurrentModificationException

2013-07-17 Thread Francois Meillet
LRUMap is not synchronized and is not thread-safe, you must use appropriate 
synchronization.

see 
http://commons.apache.org/proper/commons-collections//javadocs/api-3.2.1/org/apache/commons/collections/map/LRUMap.html


François Meillet
Formation Wicket - Développement Wicket





Le 17 juil. 2013 à 00:35, Dan Retzlaff dretzl...@gmail.com a écrit :

 Wicket serializes access to each page instance, but provides no further
 synchronization. Non-transient references to application data must be
 synchronized by you.
 
 
 On Tue, Jul 16, 2013 at 2:39 PM, saty satya...@gmail.com wrote:
 
 Thanks, but could you please explain how wicket handles serialization of
 objects that could throw this error.
 I could be wrong but it appears to me wicket is iterating the data
 structure
 for its serialization efforts when its being modified by other threads as
 well and the iteration results in ConcurrentModificationException being
 thrown by data structure iterator.
 
 
 
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/How-to-resolve-this-java-util-ConcurrentModificationException-tp4660273p4660296.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
 
 



Table with a lot of ajax links

2013-07-17 Thread DaveS
Hi guys,
I am making table of some items. Table component is default wicket
DataTable. Table page size is 100 items per page and data have several
pagings. So that is easy.

Now I would like to add 5 ajax links related to row item. That is also no
problem and easy and everythings works fine.

But when I exploring page rendered HTML source, I see a lot of ajax event
bindings. (exactly 500 = 100 * 5)

Wicket.Ajax.ajax({u:./links?2-1.IBehaviorListener.0-c1~link,e:click,c:id4});;
Wicket.Ajax.ajax({u:./links?2-1.IBehaviorListener.0-c2~link,e:click,c:id5});;


I understand how it works, but I would like to ask if you know some solution
how reduce large amounts of events binding, because I am affraid about page
loading performance with this huge count of bindings.

Thanks for your advice.

Dave



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Table-with-a-lot-of-ajax-links-tp4660303.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: Table with a lot of ajax links

2013-07-17 Thread Cedric Gatay
Hi,you can have a look at what Martin Grigorov is doing onhttps://issues.apache.org/jira/browse/WICKET-5267. It's exactly what you are talking about.Regards, On 17 juillet 2013 at 09:17:52, DaveS (david.sku...@gmail.com) wrote: Hi guys,
I am making table of some items. Table component is default wicket
DataTable. Table page size is 100 items per page and data have several
pagings. So that is easy.

Now I would like to add 5 ajax links related to row item. That is also no
problem and easy and everythings works fine.

But when I exploring page rendered HTML source, I see a lot of ajax event
bindings. (exactly 500 = 100 * 5)

Wicket.Ajax.ajax({"u":"./links?2-1.IBehaviorListener.0-c1~link","e":"click","c":"id4"});;
Wicket.Ajax.ajax({"u":"./links?2-1.IBehaviorListener.0-c2~link","e":"click","c":"id5"});;


I understand how it works, but I would like to ask if you know some solution
how reduce large amounts of events binding, because I am affraid about page
loading performance with this huge count of bindings.

Thanks for your advice.

Dave



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Table-with-a-lot-of-ajax-links-tp4660303.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

 __Cedric Gatay (@Cedric_Gatay)http://code-troopers.com|http://www.bloggure.info|http://cedric.gatay.fr
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Re: Table with a lot of ajax links

2013-07-17 Thread Ernesto Reinaldo Barreiro
Hi,

For some application with very big tables with lots of links and AJAXy
things I have done the following.

1- Place a an AbstarctAjaxBehavior at table level.
2- Create special link components that all what they do I submit info about
their ID to this unique AbstarctAjaxBehavior.
3- On server side you can use a visitor, on unique AJAX behavior,  to
locate the instance of the special link and deliver the event to it.

This reduced a lot the amount of java script to stream to the client and
made component very responsible.




On Wed, Jul 17, 2013 at 11:16 AM, DaveS david.sku...@gmail.com wrote:

 Hi guys,
 I am making table of some items. Table component is default wicket
 DataTable. Table page size is 100 items per page and data have several
 pagings. So that is easy.

 Now I would like to add 5 ajax links related to row item. That is also no
 problem and easy and everythings works fine.

 But when I exploring page rendered HTML source, I see a lot of ajax event
 bindings. (exactly 500 = 100 * 5)


 Wicket.Ajax.ajax({u:./links?2-1.IBehaviorListener.0-c1~link,e:click,c:id4});;

 Wicket.Ajax.ajax({u:./links?2-1.IBehaviorListener.0-c2~link,e:click,c:id5});;
 

 I understand how it works, but I would like to ask if you know some
 solution
 how reduce large amounts of events binding, because I am affraid about page
 loading performance with this huge count of bindings.

 Thanks for your advice.

 Dave



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Table-with-a-lot-of-ajax-links-tp4660303.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




-- 
Regards - Ernesto Reinaldo Barreiro


Re: Table with a lot of ajax links

2013-07-17 Thread Ernesto Reinaldo Barreiro
The same approach was used for things like dragging cells around... and
many other dirty tricks... If you do this in an organized manner you could
still have something that is not 100% the wicekt way but still have some
nice componentization.

As Cedric said martin is working to deliver something generic.


On Wed, Jul 17, 2013 at 11:25 AM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:

 Hi,

 For some application with very big tables with lots of links and AJAXy
 things I have done the following.

 1- Place a an AbstarctAjaxBehavior at table level.
 2- Create special link components that all what they do I submit info
 about their ID to this unique AbstarctAjaxBehavior.
 3- On server side you can use a visitor, on unique AJAX behavior,  to
 locate the instance of the special link and deliver the event to it.

 This reduced a lot the amount of java script to stream to the client and
 made component very responsible.




 On Wed, Jul 17, 2013 at 11:16 AM, DaveS david.sku...@gmail.com wrote:

 Hi guys,
 I am making table of some items. Table component is default wicket
 DataTable. Table page size is 100 items per page and data have several
 pagings. So that is easy.

 Now I would like to add 5 ajax links related to row item. That is also no
 problem and easy and everythings works fine.

 But when I exploring page rendered HTML source, I see a lot of ajax event
 bindings. (exactly 500 = 100 * 5)


 Wicket.Ajax.ajax({u:./links?2-1.IBehaviorListener.0-c1~link,e:click,c:id4});;

 Wicket.Ajax.ajax({u:./links?2-1.IBehaviorListener.0-c2~link,e:click,c:id5});;
 

 I understand how it works, but I would like to ask if you know some
 solution
 how reduce large amounts of events binding, because I am affraid about
 page
 loading performance with this huge count of bindings.

 Thanks for your advice.

 Dave



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Table-with-a-lot-of-ajax-links-tp4660303.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




 --
 Regards - Ernesto Reinaldo Barreiro




-- 
Regards - Ernesto Reinaldo Barreiro


Re: Wicket plugin architecture

2013-07-17 Thread Decebal Suiu
Hi

If anybody is interested,  Wicket Plugin
https://github.com/decebals/wicket-plugin   is now available on github.

Best regards,
Decebal



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-plugin-architecture-tp4652305p4660307.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: Table with a lot of ajax links

2013-07-17 Thread DaveS
Thanks guys, that's exactly what I am looking for.

Dave



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Table-with-a-lot-of-ajax-links-tp4660303p4660308.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



Gmap3 custom Icon

2013-07-17 Thread tomatconvien
Hi to all,

I am trying to customize the default marker.png by defining GIcon with a
custom xxx.png but it just doesn´t want to show up in my map. 
The default marker.png is shown without problems. I am getting no errors.
Can someone help me out on this one? I am using wicket 6.8.0 with
wicketstuff-gmap3 6.8.0.

My code is:

gmap = new ExtendedGmap(gmap);
add(gmap);

gmap.setOutputMarkupId(true);
gmap.setPanControlEnabled(true);
gmap.setMapType(GMapType.ROADMAP);
gmap.setDraggingEnabled(true);
gmap.setMapTypeControlEnabled(true);
gmap.setStreetViewControlEnabled(true);
gmap.setScaleControlEnabled(true);
gmap.setScrollWheelZoomEnabled(true);

GIcon hotelIcon = new GIcon(Hotel.png);
GLatLng centerLatLng = new
GLatLng(offerModel.getObject().getHotel().getLatitude(),
offerModel.getObject().getHotel().getLongitude());
GMarkerOptions centerOptions = new GMarkerOptions(gmap, centerLatLng,
Hotel, hotelIcon, null);
GMarker centerMarker = new GMarker(centerOptions);
gmap.addOverlay(centerMarker);  
gmap.setCenter(centerLatLng);

Thanks for your advice.

Tom 





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Gmap3-custom-Icon-tp4660309.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



how to set width for DataTable (column) header.

2013-07-17 Thread wicket_user_100
Hi All,

I'm trying to set a width for a DataTable column:


ListIColumnlt;Corpus, String ret = Lists.newArrayList();
ret.add(new AbstractColumnCorpus, String(new Model()) {
@Override
public void populateItem(ItemICellPopulatorlt;Corpus
cellItem, String componentId,
 IModelCorpus rowModel) {
CheckBoxPanel checkBoxPanel = new
CheckBoxPanel(componentId);
cellItem.add(checkBoxPanel);
cellItem.add(new AttributeModifier(style, new
ModelString(width:20px;)));
selected.put(checkBoxPanel.getField(),
rowModel.getObject());
}

@Override
public Component getHeader(String componentId) {
Component header = super.getHeader(componentId);
header.setRenderBodyOnly(true);
header.add(new AttributeModifier(style, new
ModelString(width:20px;)));
return header;
}
});

It doesn't work. I can see in result code:





My cell title







div wicket:id=cell
wicket:panel 
xmlns:wicket=http://wicket.apache.org;
input wicket:id=checkBox
name=table:body:rows:1:cells:1:cell:checkBox type=checkbox
/wicket:panel
/div


div wicket:id=cellMy cell content/div





I've tried also to add new AttributeModifier(style, new
ModelString(width:20px;)) to the header in DataTable, see my code:

public class AjaxFallbackDataTableT, S extends DataTableT, S {
private static final long serialVersionUID = 1L;

public AjaxFallbackDataTable(String id, ListIColumnlt;T, S columns,
ISortableDataProviderT, S dataProvider,
 int rowsPerPage) {
super(id, columns, dataProvider, rowsPerPage);
setOutputMarkupId(true);
setVersioned(false);
addTopToolbar(newAjaxNavigationToolbar());
addTopToolbar(newAjaxFallbackHeadersToolbar(dataProvider));
addBottomToolbar(new NoRecordsToolbar(this));
}

protected AjaxFallbackHeadersToolbar
newAjaxFallbackHeadersToolbar(ISortableDataProviderT, S dataProvider) {
AjaxFallbackHeadersToolbar fb = new AjaxFallbackHeadersToolbar(this,
dataProvider);
fb.add(new AttributeModifier(style, new
ModelString(width:20px;)));
return fb;
}

protected AjaxNavigationToolbar newAjaxNavigationToolbar() {
AjaxNavigationToolbar fb = new AjaxNavigationToolbar(this);
fb.add(new AttributeModifier(style, new
ModelString(width:20px;)));
return fb;
}

@Override
protected ItemT newRowItem(final String id, final int index, final
IModelT model) {
return new OddEvenItemT(id, index, model);
}
}

It doesn't work either. Can anybody write me - how can I set the
style=width:20px for a Datatable column?
Thanks.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-set-width-for-DataTable-column-header-tp4660310.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: Problem with wiQuery Dialog after upgrade to Wicket 6.9

2013-07-17 Thread Andrew Schetinin
Hi Sebastien,

I've tried it - used getCallbackFunction() - but it generated a function
inside function, and broke JS syntax.

I've tried a couple of other ideas, but none worked.

Regards,

Andrew

--
Andrew Schetinin


On Wed, Jul 17, 2013 at 1:54 AM, Sebastien seb...@gmail.com wrote:

 Hi,

 I think the idea is more to replace
 wicketSubmitFormById('form',' +formAjaxBehavior.getCallbackUrl() +',
 null, null, null, null,null);)));
 by
 formAjaxBehavior.getCallbackFunction()

 With the override mentioned bellow.
 #getCallbackFunction() will get you the ready-to-use javascript function. I
 am not a wiQuery expert so I don't know where exactly you have to use this
 statement... (something like new JsScope(statement)?)

 Maybe Ernesto or Hielke may help you more on this...

 Best regards,
 Sebastien.



 On Tue, Jul 16, 2013 at 6:06 PM, Andrew Schetinin ascheti...@gmail.com
 wrote:

  Hi Sebastien,
 
  Thank you for the suggestion, but the trouble with the sample (and
 wiQuery)
  is that DialogButton is not a wicket component - it is a very simple
  object. There is no updateAjaxAttributes() to change.
 
  As I explained, the form submit there works by a plain call from
  JavaScript, and that call does not work anymore because of the missing
  wicketSubmitFormById() function.
 
  It seems to me that the only way to extend Dialog in wiQuery is through
  JavaScript - at least everything related to reaction on the button
 clicks.
 
  Regards,
 
  Andrew
 
  --
  Andrew Schetinin
 
 
  On Tue, Jul 16, 2013 at 6:33 PM, Sebastien seb...@gmail.com wrote:
 
   Hi Andrew,
  
   You have to override your ajaxbehavior#updateAjaxAttributes()
  
   protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
   {
   super.updateAjaxAttributes(attributes);
  
   attributes.setMethod(Method.POST); //if you wish to post
   attributes.setFormId(yourFormId);
   }
  
   Best regards,
   Sebastien.
  
  
   On Tue, Jul 16, 2013 at 5:21 PM, Andrew Schetinin 
 ascheti...@gmail.com
   wrote:
  
Hi,
   
I've just upgraded from Wicket 1.4 to 6.9, and (among lots of other
problems) I have a trouble with porting the code that submitted a
 form
   from
within a wiQuery dialog.
   
My code is based on the sample that can be found here:
   
   
  
 
 http://code.google.com/p/wiquery/source/browse/examples/wiquery-examples/src/main/resources/org/odlabs/wiquery/examples/dialog/DialogPage.java?r=407
   
The trick here was that the Dialog contains a form which has to be
submitted when OK button is clicked, and that was done with the
  following
code:
   
buttonsAdv.add(new DialogButton(Save,
   
JsScope.quickScope(wicketSubmitFormById('form',' +
   
formAjaxBehavior.getCallbackUrl() +
', null, null, null,
   null,
null);)));
   
Unfortunately, in Wicket 6.9 this code fails to find the function
wicketSubmitFormById()
   
I also have a feeling that in my previous attempt to port this code
 to
Wicket 6.6 the same functionality worked fine.
   
The question is - how is it possible to submit a form from JS?
   
Regards,
   
Andrew
   
--
Andrew Schetinin
   
  
 



Re: Form questions

2013-07-17 Thread Daniel Watrous
That's what I tried to do. I created
CnavForm.java and CnavForm.html. In the latter file I have this
  wicket:panel
form wicket:id=cnavForm...
// form details
/form
/wicket:panel

Then I have CnavModify.java and CnavModify.html. You already see what I
have in CnavModify.java from my last email. My CnavModify.html has this.
wicket:extend
span wicket:id=cnavFormAreaHere's the form/span
/wicket:extend

Rather than render I'm getting this error:
Last cause: Component [cnavFormArea] (path = [0:cnavFormArea]) must be
applied to a tag of type [form], not: 'span wicket:id=cnavFormArea
id=cnavFormArea3' (line 0, column 0)

I'll keep trying and report back when I figure it out.

Daniel


On Tue, Jul 16, 2013 at 10:50 PM, Paul Bors p...@bors.ws wrote:

 Wicket is a MVC component driven framework similar to Swing.
 In short, what you want to do is create your own Panel with that form file
 of yours and add it to another Panel as a child.

 See chapter 4 Keeping control over HTML of the Wicket Free Guide at:
 http://code.google.com/p/wicket-guide/

 Also available from under the Learn section as the Books link on the right
 side navigation section on Wicket's home page at:
 http://wicket.apache.org/learn/books/

 ~ Thank you,
   Paul Bors

 -Original Message-
 From: Daniel Watrous [mailto:dwmaill...@gmail.com]
 Sent: Tuesday, July 16, 2013 7:13 PM
 To: users@wicket.apache.org
 Subject: Re: Form questions

 Thanks Paul and Sven. I got the form to work and available in the onSubmit
 handler.

 Now I'm interested in splitting the form out into it's one file. So I
 created a class that has nothing more than the form, but I'm not sure how
 to
 include this into a page.

 In my class I do this:

 public class CnavModify extends ConsoleBasePage {

 public CnavModify(PageParameters parameters) {
 super(parameters);

 Form form = new CnavForm(cnavFormArea);
 add(form);
 }
 }

 My CnavModify obviously extends a base page. What do I put inside the
 wicket:extend tag to have the form render?

 Daniel


 On Tue, Jul 16, 2013 at 12:00 AM, Sven Meier s...@meiers.net wrote:

  Hi,
 
 
   Some problems I can't figure out. The code to create the button
  complains
  that it requires a CnavUrl but gets back a String.
 
 add(new Button(publish, model) {
 @Override
 public void onSubmit() {
 CnavUrl cnavUrl = (CnavUrl) getModelObject();
 System.out.println(publish);
 }
 });
 
 
  a Button always has a IModelString to fill the value attribute. Note
  that in #onSubmit() you're getting the model object of the button, not
  of your form.
  You can write:
 
  add(new Button(publish, model) {
 @Override
 public void onSubmit() {
 CnavUrl cnavUrl = (CnavUrl) MyForm.this.getModelObject();
 System.out.println(publish);
 }
 });
 
 
  Using generic types in your code should help you.
 
  Sven
 
 
 
  On 07/15/2013 11:41 PM, Daniel Watrous wrote:
 
  Hello,
 
  I'm interested in creating a single Form that will accommodate the
  following use cases
  1) display blank for creating new records
  2) pre-populate for editing existing records
  3) map submitted values on to an existing domain object
  4) accommodate two actions, Save Draft -or- Publish
 
  I'm following Wicket in Action and within my Form constructor I
  create my model, like this
 
   CnavUrl cnavUrl = new BasicCnavUrl();
   IModel model = new Model((Serializable) cnavUrl);
   setModel(model);
 
  I then use PropertyModel
 
   add(new TextField(url, new PropertyModel(cnavUrl,
  url)));
 
  For the two actions, I'm creating the Button objects like this
 
   add(new Button(publish, model) {
   @Override
   public void onSubmit() {
   CnavUrl cnavUrl = (CnavUrl) getModelObject();
   System.out.println(publish);
   }
   });
 
  Some problems I can't figure out. The code to create the button
  complains that it requires a CnavUrl but gets back a String.
 
  It seems that a new BasicCnavUrl is created once with the Form. What
  happens on subsequent calls? Can I always expect my model to have the
  data from the current form submission?
 
  Is there a best way to incorporate the idea of an edit, where the
  model is pre-populated from a data source and pre-fills the Form fields?
 
  Thanks,
  Daniel
 
 
 
  --**--**--
  --- To unsubscribe, e-mail:
  users-unsubscribe@wicket.**apache.orgusers-unsubscribe@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: Form questions

2013-07-17 Thread Daniel Watrous
I can make it work if I put the markup from CnavForm.html directly into
CnavModify, but the form is not as reusable then. I would have to duplicate
the markup for other pages that use the same form...

Dnaiel


On Wed, Jul 17, 2013 at 9:55 AM, Daniel Watrous dwmaill...@gmail.comwrote:

 That's what I tried to do. I created
 CnavForm.java and CnavForm.html. In the latter file I have this
   wicket:panel
 form wicket:id=cnavForm...
 // form details
 /form
 /wicket:panel

 Then I have CnavModify.java and CnavModify.html. You already see what I
 have in CnavModify.java from my last email. My CnavModify.html has this.
 wicket:extend
 span wicket:id=cnavFormAreaHere's the form/span
 /wicket:extend

 Rather than render I'm getting this error:
 Last cause: Component [cnavFormArea] (path = [0:cnavFormArea]) must be
 applied to a tag of type [form], not: 'span wicket:id=cnavFormArea
 id=cnavFormArea3' (line 0, column 0)

 I'll keep trying and report back when I figure it out.

 Daniel


 On Tue, Jul 16, 2013 at 10:50 PM, Paul Bors p...@bors.ws wrote:

 Wicket is a MVC component driven framework similar to Swing.
 In short, what you want to do is create your own Panel with that form file
 of yours and add it to another Panel as a child.

 See chapter 4 Keeping control over HTML of the Wicket Free Guide at:
 http://code.google.com/p/wicket-guide/

 Also available from under the Learn section as the Books link on the right
 side navigation section on Wicket's home page at:
 http://wicket.apache.org/learn/books/

 ~ Thank you,
   Paul Bors

 -Original Message-
 From: Daniel Watrous [mailto:dwmaill...@gmail.com]
 Sent: Tuesday, July 16, 2013 7:13 PM
 To: users@wicket.apache.org
 Subject: Re: Form questions

 Thanks Paul and Sven. I got the form to work and available in the onSubmit
 handler.

 Now I'm interested in splitting the form out into it's one file. So I
 created a class that has nothing more than the form, but I'm not sure how
 to
 include this into a page.

 In my class I do this:

 public class CnavModify extends ConsoleBasePage {

 public CnavModify(PageParameters parameters) {
 super(parameters);

 Form form = new CnavForm(cnavFormArea);
 add(form);
 }
 }

 My CnavModify obviously extends a base page. What do I put inside the
 wicket:extend tag to have the form render?

 Daniel


 On Tue, Jul 16, 2013 at 12:00 AM, Sven Meier s...@meiers.net wrote:

  Hi,
 
 
   Some problems I can't figure out. The code to create the button
  complains
  that it requires a CnavUrl but gets back a String.
 
 add(new Button(publish, model) {
 @Override
 public void onSubmit() {
 CnavUrl cnavUrl = (CnavUrl) getModelObject();
 System.out.println(publish);
 }
 });
 
 
  a Button always has a IModelString to fill the value attribute. Note
  that in #onSubmit() you're getting the model object of the button, not
  of your form.
  You can write:
 
  add(new Button(publish, model) {
 @Override
 public void onSubmit() {
 CnavUrl cnavUrl = (CnavUrl)
 MyForm.this.getModelObject();
 System.out.println(publish);
 }
 });
 
 
  Using generic types in your code should help you.
 
  Sven
 
 
 
  On 07/15/2013 11:41 PM, Daniel Watrous wrote:
 
  Hello,
 
  I'm interested in creating a single Form that will accommodate the
  following use cases
  1) display blank for creating new records
  2) pre-populate for editing existing records
  3) map submitted values on to an existing domain object
  4) accommodate two actions, Save Draft -or- Publish
 
  I'm following Wicket in Action and within my Form constructor I
  create my model, like this
 
   CnavUrl cnavUrl = new BasicCnavUrl();
   IModel model = new Model((Serializable) cnavUrl);
   setModel(model);
 
  I then use PropertyModel
 
   add(new TextField(url, new PropertyModel(cnavUrl,
  url)));
 
  For the two actions, I'm creating the Button objects like this
 
   add(new Button(publish, model) {
   @Override
   public void onSubmit() {
   CnavUrl cnavUrl = (CnavUrl) getModelObject();
   System.out.println(publish);
   }
   });
 
  Some problems I can't figure out. The code to create the button
  complains that it requires a CnavUrl but gets back a String.
 
  It seems that a new BasicCnavUrl is created once with the Form. What
  happens on subsequent calls? Can I always expect my model to have the
  data from the current form submission?
 
  Is there a best way to incorporate the idea of an edit, where the
  model is pre-populated from a data source and pre-fills the Form
 fields?
 
  Thanks,
  Daniel
 
 
 
  --**--**--
  --- To unsubscribe, e-mail:
  

Re: Form questions

2013-07-17 Thread Daniel Watrous
I think I'm getting it now. The Form needs to be embedded in a panel for
the type of inclusion that I'm interested in.

I created a CnavFormPanel.java and changed CnavForm.html to
CnavFormPanel.html. I left CnavForm.java alone.

In CnavModify.java I removed this

Form form = new CnavForm(cnavFormArea);
add(form);

And added this

add(new CnavFormPanel(cnavFormArea));

That works. Thanks for your help.

Daniel


On Wed, Jul 17, 2013 at 10:07 AM, Daniel Watrous dwmaill...@gmail.comwrote:

 I can make it work if I put the markup from CnavForm.html directly into
 CnavModify, but the form is not as reusable then. I would have to duplicate
 the markup for other pages that use the same form...

 Dnaiel


 On Wed, Jul 17, 2013 at 9:55 AM, Daniel Watrous dwmaill...@gmail.comwrote:

 That's what I tried to do. I created
 CnavForm.java and CnavForm.html. In the latter file I have this
   wicket:panel
 form wicket:id=cnavForm...
 // form details
 /form
 /wicket:panel

 Then I have CnavModify.java and CnavModify.html. You already see what I
 have in CnavModify.java from my last email. My CnavModify.html has this.
 wicket:extend
 span wicket:id=cnavFormAreaHere's the form/span
 /wicket:extend

 Rather than render I'm getting this error:
 Last cause: Component [cnavFormArea] (path = [0:cnavFormArea]) must be
 applied to a tag of type [form], not: 'span wicket:id=cnavFormArea
 id=cnavFormArea3' (line 0, column 0)

 I'll keep trying and report back when I figure it out.

 Daniel


 On Tue, Jul 16, 2013 at 10:50 PM, Paul Bors p...@bors.ws wrote:

 Wicket is a MVC component driven framework similar to Swing.
 In short, what you want to do is create your own Panel with that form
 file
 of yours and add it to another Panel as a child.

 See chapter 4 Keeping control over HTML of the Wicket Free Guide at:
 http://code.google.com/p/wicket-guide/

 Also available from under the Learn section as the Books link on the
 right
 side navigation section on Wicket's home page at:
 http://wicket.apache.org/learn/books/

 ~ Thank you,
   Paul Bors

 -Original Message-
 From: Daniel Watrous [mailto:dwmaill...@gmail.com]
 Sent: Tuesday, July 16, 2013 7:13 PM
 To: users@wicket.apache.org
 Subject: Re: Form questions

 Thanks Paul and Sven. I got the form to work and available in the
 onSubmit
 handler.

 Now I'm interested in splitting the form out into it's one file. So I
 created a class that has nothing more than the form, but I'm not sure
 how to
 include this into a page.

 In my class I do this:

 public class CnavModify extends ConsoleBasePage {

 public CnavModify(PageParameters parameters) {
 super(parameters);

 Form form = new CnavForm(cnavFormArea);
 add(form);
 }
 }

 My CnavModify obviously extends a base page. What do I put inside the
 wicket:extend tag to have the form render?

 Daniel


 On Tue, Jul 16, 2013 at 12:00 AM, Sven Meier s...@meiers.net wrote:

  Hi,
 
 
   Some problems I can't figure out. The code to create the button
  complains
  that it requires a CnavUrl but gets back a String.
 
 add(new Button(publish, model) {
 @Override
 public void onSubmit() {
 CnavUrl cnavUrl = (CnavUrl) getModelObject();
 System.out.println(publish);
 }
 });
 
 
  a Button always has a IModelString to fill the value attribute. Note
  that in #onSubmit() you're getting the model object of the button, not
  of your form.
  You can write:
 
  add(new Button(publish, model) {
 @Override
 public void onSubmit() {
 CnavUrl cnavUrl = (CnavUrl)
 MyForm.this.getModelObject();
 System.out.println(publish);
 }
 });
 
 
  Using generic types in your code should help you.
 
  Sven
 
 
 
  On 07/15/2013 11:41 PM, Daniel Watrous wrote:
 
  Hello,
 
  I'm interested in creating a single Form that will accommodate the
  following use cases
  1) display blank for creating new records
  2) pre-populate for editing existing records
  3) map submitted values on to an existing domain object
  4) accommodate two actions, Save Draft -or- Publish
 
  I'm following Wicket in Action and within my Form constructor I
  create my model, like this
 
   CnavUrl cnavUrl = new BasicCnavUrl();
   IModel model = new Model((Serializable) cnavUrl);
   setModel(model);
 
  I then use PropertyModel
 
   add(new TextField(url, new PropertyModel(cnavUrl,
  url)));
 
  For the two actions, I'm creating the Button objects like this
 
   add(new Button(publish, model) {
   @Override
   public void onSubmit() {
   CnavUrl cnavUrl = (CnavUrl) getModelObject();
   System.out.println(publish);
   }
   });
 
  Some problems I can't figure out. The code to create the button
  complains that it requires a CnavUrl but gets back 

Re: wicket based e-mail UI

2013-07-17 Thread Piratenvisier

What do you expect ?
Only sending emails to an address.
Managing incoming emails and outgoing emails.
At the moment I am using cocoon for outgoing emails
sending always a copy to my mail account.
I tried this already as a test in wicket because I wanted
to leave cocoon because development slowed down.
But it seams there is a revival of this project so i will have first
a closer look at cocoon 3 before I switch to wicket.
Another possibility is using James.
But I preferred to stay near to the normal Mail clients like Outlook
or iceweasel.


Am 16.07.2013 14:57, schrieb Ernesto Reinaldo Barreiro:

Hi,

Does anyone has developed an open source, easy to adapt, e-mail client
UI? Of course, based on wicket.




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



Re: Tree with different BookmarkablePageLink per Node

2013-07-17 Thread Piratenvisier

I made a solution of the first kind. I made Foo a subclass of WebPage.
I think the only reason to use this class is that the parent brings in 
the call setResponsePage
where the page  itsself is a Field in Foo of Type Page which can be 
loaded externally, so that I don't need

declare the pages explicitly in Foo.
Do you think there is a better class in the UI-layer for this.
It works satisfactory with google chrome on my debian system.
When I have time I think about your other suggestion.
I try as Response an adaption of the breadcrumb solution as flow adaption



Am 06.07.2013 10:50, schrieb Sven Meier:

It depends on you node implementation:

If Foo is an object from your UI layer, just add #createContent() to 
it and let it return a suitable representation.
If Foo is part of the domain layer, I'd prefer a factory for that, 
e.g. ContentFactory#createContent(Foo). This factory could consists of 
a huge switch statement, be configured via Spring or use some lookup 
to be extensible from different modules.


Just some ideas
Sven

On 07/05/2013 11:11 PM, Piratenvisier wrote:
What is the best way to build a nested Tree with different 
BookmarkablePageLinks per node?
The best would be when I build the Foo node to give the information 
to build the  BookmarkablePageLink.

Who should know the different PageClasses?



-
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: wicket based e-mail UI

2013-07-17 Thread Cedric Gatay
Hi,I don't know such Wicket based application, however it could be a great project if you're willing to start it and OSS it, don't hesitate to tell the world on this mailing list to get some help.Regards, On 17 juillet 2013 at 20:06:09, Piratenvisier (hansheinrichbr...@yahoo.de) wrote: What do you expect ?
Only sending emails to an address.
Managing incoming emails and outgoing emails.
At the moment I am using cocoon for outgoing emails
sending always a copy to my mail account.
I tried this already as a test in wicket because I wanted
to leave cocoon because development slowed down.
But it seams there is a revival of this project so i will have first
a closer look at cocoon 3 before I switch to wicket.
Another possibility is using James.
But I preferred to stay near to the normal Mail clients like Outlook
or iceweasel.


Am 16.07.2013 14:57, schrieb Ernesto Reinaldo Barreiro:
 Hi,

 Does anyone has developed an open source, easy to adapt, e-mail "client"
 UI? Of course, based on wicket.



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

 __Cedric Gatay (@Cedric_Gatay)http://code-troopers.com|http://www.bloggure.info|http://cedric.gatay.fr
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Re: Gmap3 custom Icon

2013-07-17 Thread Joachim Rohde

Hi Tom,

you need to pass a valid URL (as a string) to GIcon, e.g.:

Icon hotelIcon = new GIcon(http://www.yourdomain/img/Hotel.png;);

In case you are using Maven and Spring I would suggest that you inject 
the base-URL depending on the Maven-profile into a variable so that you 
don't have to worry about setting the right URL.


I defined a variable

public static String IMAGES_URL = ;

in my Wicket-Application-class and in my applicationContext.xml I 
defined the bean:


bean id=wicketApplication class=com.test.MyApplication
property name=imageUrl
value${myapplication.imgUrl}/value
/property
/bean

In my pom.xml I have two profiles:
profile
idproduction/id
properties

myapplication.imgUrlhttp://mydomain.com/myapplication/images//myapplication.imgUrl
wicket.configurationdeployment/wicket.configuration
/properties
/profile

profile
iddevelopment/id
properties

myapplication.imgUrlhttp://localhost:8084/myapplication/images//myapplication.imgUrl
wicket.configurationdevelopment/wicket.configuration
/properties
/profile

If I want to create a GIcon now, I do it like this:

new GIcon(MyApplication.IMAGES_URL + Hotel.png);

This way you can keep your custom images within your project without 
worrying if you are on your development machine or deploying your 
application to a productive server. You just need to choose the right 
Maven profile.


Joachim

On 07/17/2013 03:55 PM, tomatconvien wrote:

Hi to all,

I am trying to customize the default marker.png by defining GIcon with a
custom xxx.png but it just doesn´t want to show up in my map.
The default marker.png is shown without problems. I am getting no errors.
Can someone help me out on this one? I am using wicket 6.8.0 with
wicketstuff-gmap3 6.8.0.

My code is:

gmap = new ExtendedGmap(gmap);
add(gmap);

gmap.setOutputMarkupId(true);
gmap.setPanControlEnabled(true);
gmap.setMapType(GMapType.ROADMAP);
gmap.setDraggingEnabled(true);
gmap.setMapTypeControlEnabled(true);
gmap.setStreetViewControlEnabled(true);
gmap.setScaleControlEnabled(true);
gmap.setScrollWheelZoomEnabled(true);

GIcon hotelIcon = new GIcon(Hotel.png);
GLatLng centerLatLng = new
GLatLng(offerModel.getObject().getHotel().getLatitude(),
offerModel.getObject().getHotel().getLongitude());
GMarkerOptions centerOptions = new GMarkerOptions(gmap, centerLatLng,
Hotel, hotelIcon, null);
GMarker centerMarker = new GMarker(centerOptions);
gmap.addOverlay(centerMarker);  
gmap.setCenter(centerLatLng);

Thanks for your advice.

Tom





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Gmap3-custom-Icon-tp4660309.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



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



Re: Gmap3 custom Icon

2013-07-17 Thread Sven Meier
Please take a look at CustomPointPage in wicketstuff-gmap3-examples. It 
uses custom marker images.


Where are your images located in your war?

Sven

On 07/17/2013 03:55 PM, tomatconvien wrote:

Hi to all,

I am trying to customize the default marker.png by defining GIcon with a
custom xxx.png but it just doesn´t want to show up in my map.
The default marker.png is shown without problems. I am getting no errors.
Can someone help me out on this one? I am using wicket 6.8.0 with
wicketstuff-gmap3 6.8.0.

My code is:

gmap = new ExtendedGmap(gmap);
add(gmap);

gmap.setOutputMarkupId(true);
gmap.setPanControlEnabled(true);
gmap.setMapType(GMapType.ROADMAP);
gmap.setDraggingEnabled(true);
gmap.setMapTypeControlEnabled(true);
gmap.setStreetViewControlEnabled(true);
gmap.setScaleControlEnabled(true);
gmap.setScrollWheelZoomEnabled(true);

GIcon hotelIcon = new GIcon(Hotel.png);
GLatLng centerLatLng = new
GLatLng(offerModel.getObject().getHotel().getLatitude(),
offerModel.getObject().getHotel().getLongitude());
GMarkerOptions centerOptions = new GMarkerOptions(gmap, centerLatLng,
Hotel, hotelIcon, null);
GMarker centerMarker = new GMarker(centerOptions);
gmap.addOverlay(centerMarker);  
gmap.setCenter(centerLatLng);

Thanks for your advice.

Tom





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Gmap3-custom-Icon-tp4660309.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




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



FeedbackPanel customization

2013-07-17 Thread Daniel Watrous
Hi,

I'm working on a modification of the FeedbackPanel to work better with my
theme. I would like to prevent the class for the actual message from being
appended to. Right now MessageListView is a private final class and
the populateItem adds an AttributeModifier to both the label and the
listItem.

I know I can override getCSSClass, but that still sets it for both the
label and listItem.

I can't extend just MessageListView since it's private and final. Even if I
could subclass that, the FeedbackPanel constructor is called before my
subclass of FeedbackPanel, so that it has already used the original
MessageListView.

Can you think of a clean way to eliminate the AttributeListener on listItem?

Daniel


Re: FeedbackPanel customization

2013-07-17 Thread Sebastien
Hi Daniel,

In such a case, you have to not use getCSSClass, but override
newMessageDisplayComponent instead.

You have a sample here:
https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.java
https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.html

Hope this help,
Sebastien.


On Wed, Jul 17, 2013 at 10:54 PM, Daniel Watrous dwmaill...@gmail.comwrote:

 Hi,

 I'm working on a modification of the FeedbackPanel to work better with my
 theme. I would like to prevent the class for the actual message from being
 appended to. Right now MessageListView is a private final class and
 the populateItem adds an AttributeModifier to both the label and the
 listItem.

 I know I can override getCSSClass, but that still sets it for both the
 label and listItem.

 I can't extend just MessageListView since it's private and final. Even if I
 could subclass that, the FeedbackPanel constructor is called before my
 subclass of FeedbackPanel, so that it has already used the original
 MessageListView.

 Can you think of a clean way to eliminate the AttributeListener on
 listItem?

 Daniel



RE: FeedbackPanel customization

2013-07-17 Thread Paul Bors
Of course you can always override them in CSS as well.

/* FEEDBACK MESSAGES */

.feedbackMessages {
padding-left: 0;
padding-top: 0;
text-align: left;
margin-left: 0;
margin-top: 0;
padding-bottom: 1em;
}

.feedbackMessages div {
padding: 0.5em;
font-size: xx-small;
border: none;
}

.feedbackMessages div.feedbackPanelERROR {
background-color: lightsalmon;
border: 1px solid darkred;
}

.feedbackMessages div.feedbackPanelWARNING {
background-color: #FFB90F;
border: 1px solid darkgoldenrod;
}

.feedbackMessages div.feedbackPanelINFO {
background-color: lightgreen;
border: 1px solid darkgreen;
}

~ Thank you,
  Paul Bors

-Original Message-
From: Sebastien [mailto:seb...@gmail.com] 
Sent: Wednesday, July 17, 2013 5:21 PM
To: users@wicket.apache.org
Subject: Re: FeedbackPanel customization

Hi Daniel,

In such a case, you have to not use getCSSClass, but override
newMessageDisplayComponent instead.

You have a sample here:
https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/
main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.java
https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/
main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.html

Hope this help,
Sebastien.


On Wed, Jul 17, 2013 at 10:54 PM, Daniel Watrous
dwmaill...@gmail.comwrote:

 Hi,

 I'm working on a modification of the FeedbackPanel to work better with 
 my theme. I would like to prevent the class for the actual message 
 from being appended to. Right now MessageListView is a private final 
 class and the populateItem adds an AttributeModifier to both the label 
 and the listItem.

 I know I can override getCSSClass, but that still sets it for both the 
 label and listItem.

 I can't extend just MessageListView since it's private and final. Even 
 if I could subclass that, the FeedbackPanel constructor is called 
 before my subclass of FeedbackPanel, so that it has already used the 
 original MessageListView.

 Can you think of a clean way to eliminate the AttributeListener on 
 listItem?

 Daniel



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



Re: FeedbackPanel customization

2013-07-17 Thread Cedric Gatay
Hi,the fix for the issue you face with Css classes has been integrated into Wicket 7.0 (https://issues.apache.org/jira/browse/WICKET-4852).Regards, On 17 juillet 2013 at 22:54:37, Daniel Watrous (dwmaill...@gmail.com) wrote: Hi,

I'm working on a modification of the FeedbackPanel to work better with my
theme. I would like to prevent the class for the actual message from being
appended to. Right now MessageListView is a private final class and
the populateItem adds an AttributeModifier to both the label and the
listItem.

I know I can override getCSSClass, but that still sets it for both the
label and listItem.

I can't extend just MessageListView since it's private and final. Even if I
could subclass that, the FeedbackPanel constructor is called before my
subclass of FeedbackPanel, so that it has already used the original
MessageListView.

Can you think of a clean way to eliminate the AttributeListener on listItem?

Daniel
 __Cedric Gatay (@Cedric_Gatay)http://code-troopers.com|http://www.bloggure.info|http://cedric.gatay.fr
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Re: FeedbackPanel customization

2013-07-17 Thread Daniel Watrous
Hi Sebastian,

I looked at your example, but it's not quite what I need. I want the style
applied to 'messages' but not to 'message'. Your example seems to allow for
a style to be applied to 'message' and not to 'messages'

I've tried implementing it, but that's where I'm stuck. Am I missing
something?

Daniel


On Wed, Jul 17, 2013 at 3:20 PM, Sebastien seb...@gmail.com wrote:

 Hi Daniel,

 In such a case, you have to not use getCSSClass, but override
 newMessageDisplayComponent instead.

 You have a sample here:

 https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.java

 https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.html

 Hope this help,
 Sebastien.


 On Wed, Jul 17, 2013 at 10:54 PM, Daniel Watrous dwmaill...@gmail.com
 wrote:

  Hi,
 
  I'm working on a modification of the FeedbackPanel to work better with my
  theme. I would like to prevent the class for the actual message from
 being
  appended to. Right now MessageListView is a private final class and
  the populateItem adds an AttributeModifier to both the label and the
  listItem.
 
  I know I can override getCSSClass, but that still sets it for both the
  label and listItem.
 
  I can't extend just MessageListView since it's private and final. Even
 if I
  could subclass that, the FeedbackPanel constructor is called before my
  subclass of FeedbackPanel, so that it has already used the original
  MessageListView.
 
  Can you think of a clean way to eliminate the AttributeListener on
  listItem?
 
  Daniel
 



Re: FeedbackPanel customization

2013-07-17 Thread Daniel Watrous
This is what I ended up doing. Hopefully, as Cedric points out, it will be
more flexible in Wicket 7 and I can come back and clean it up.

Thanks.


On Wed, Jul 17, 2013 at 3:23 PM, Paul Bors p...@bors.ws wrote:

 Of course you can always override them in CSS as well.

 /* FEEDBACK MESSAGES */

 .feedbackMessages {
 padding-left: 0;
 padding-top: 0;
 text-align: left;
 margin-left: 0;
 margin-top: 0;
 padding-bottom: 1em;
 }

 .feedbackMessages div {
 padding: 0.5em;
 font-size: xx-small;
 border: none;
 }

 .feedbackMessages div.feedbackPanelERROR {
 background-color: lightsalmon;
 border: 1px solid darkred;
 }

 .feedbackMessages div.feedbackPanelWARNING {
 background-color: #FFB90F;
 border: 1px solid darkgoldenrod;
 }

 .feedbackMessages div.feedbackPanelINFO {
 background-color: lightgreen;
 border: 1px solid darkgreen;
 }

 ~ Thank you,
   Paul Bors

 -Original Message-
 From: Sebastien [mailto:seb...@gmail.com]
 Sent: Wednesday, July 17, 2013 5:21 PM
 To: users@wicket.apache.org
 Subject: Re: FeedbackPanel customization

 Hi Daniel,

 In such a case, you have to not use getCSSClass, but override
 newMessageDisplayComponent instead.

 You have a sample here:

 https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/
 main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.java

 https://github.com/sebfz1/wicket-jquery-ui/blob/master/wicket-jquery-ui/src/
 main/java/com/googlecode/wicket/jquery/ui/panel/JQueryFeedbackPanel.html

 Hope this help,
 Sebastien.


 On Wed, Jul 17, 2013 at 10:54 PM, Daniel Watrous
 dwmaill...@gmail.comwrote:

  Hi,
 
  I'm working on a modification of the FeedbackPanel to work better with
  my theme. I would like to prevent the class for the actual message
  from being appended to. Right now MessageListView is a private final
  class and the populateItem adds an AttributeModifier to both the label
  and the listItem.
 
  I know I can override getCSSClass, but that still sets it for both the
  label and listItem.
 
  I can't extend just MessageListView since it's private and final. Even
  if I could subclass that, the FeedbackPanel constructor is called
  before my subclass of FeedbackPanel, so that it has already used the
  original MessageListView.
 
  Can you think of a clean way to eliminate the AttributeListener on
  listItem?
 
  Daniel
 


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




Re: wicket based e-mail UI

2013-07-17 Thread Ernesto Reinaldo Barreiro
Cedric,

Thanks for your answer.

1- I ideally we would like to have something similar to evolution and WEB
based: and in Wicket so it can be seamless integrated with the rest of our
applications.
2- We are using bootstrap. SO, if we develop something it might be
bootstrap based.
3- My boss is a very open source friendly person (he has been commiter of
open source projects himself). So, he might be willing to consider open
sourcing anything we do. He's only concern might be that if this does not
make it into a mayor Wicket project (core or wicket stuff at least) it
might dye.
4- I was thinking about a panel delivering all this functionality... so you
can easily embed it any where. But a little bit brainstorming might be
needed to get requirements approach right. Any insights on that direction
are highly welcomed

Thanks again!

Ernesto



On Wed, Jul 17, 2013 at 10:54 PM, Cedric Gatay gata...@gmail.com wrote:

 Hi,
 I don't know such Wicket based application, however it could be a great
 project if you're willing to start it and OSS it, don't hesitate to tell
 the world on this mailing list to get some help.

 Regards,

 On 17 juillet 2013 at 20:06:09, Piratenvisier (hansheinrichbr...@yahoo.de)
 wrote:

 What do you expect ?
 Only sending emails to an address.
 Managing incoming emails and outgoing emails.
 At the moment I am using cocoon for outgoing emails
 sending always a copy to my mail account.
 I tried this already as a test in wicket because I wanted
 to leave cocoon because development slowed down.
 But it seams there is a revival of this project so i will have first
 a closer look at cocoon 3 before I switch to wicket.
 Another possibility is using James.
 But I preferred to stay near to the normal Mail clients like Outlook
 or iceweasel.


 Am 16.07.2013 14:57, schrieb Ernesto Reinaldo Barreiro:
  Hi,
 
  Does anyone has developed an open source, easy to adapt, e-mail client
  UI? Of course, based on wicket.
 


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

 __
 Cedric Gatay (@Cedric_Gatay http://twitter.com/Cedric_Gatay)
 http://code-troopers.com | http://www.bloggure.info |
 http://cedric.gatay.fr



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




-- 
Regards - Ernesto Reinaldo Barreiro


Re: wicket based e-mail UI

2013-07-17 Thread Ernesto Reinaldo Barreiro
we would like to have the basic functionality first but the more get the
better...


On Wed, Jul 17, 2013 at 10:04 PM, Piratenvisier
hansheinrichbr...@yahoo.dewrote:

 What do you expect ?
 Only sending emails to an address.
 Managing incoming emails and outgoing emails.
 At the moment I am using cocoon for outgoing emails
 sending always a copy to my mail account.
 I tried this already as a test in wicket because I wanted
 to leave cocoon because development slowed down.
 But it seams there is a revival of this project so i will have first
 a closer look at cocoon 3 before I switch to wicket.
 Another possibility is using James.
 But I preferred to stay near to the normal Mail clients like Outlook
 or iceweasel.


 Am 16.07.2013 14:57, schrieb Ernesto Reinaldo Barreiro:

  Hi,

 Does anyone has developed an open source, easy to adapt, e-mail client
 UI? Of course, based on wicket.



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




-- 
Regards - Ernesto Reinaldo Barreiro


Brazilian Portuguese localization question

2013-07-17 Thread Maxim Solodovnik
Hello All,

I'm trying to provide Brazilian Portuguese localization for our wicket
based application by appending _pt_BR to the names of html template files
like this:

CongratulationsPanel_pt_BR.html

surprisingly after adding portuguese (Brazil) as browser primary language
the localized template files are not used.

Same time
CongratulationsPanel_pt.html
works as expected

What am I doing wrong?
Wicket 6.9.1

Thanks in advance!

-- 
WBR
Maxim aka solomax


Re: How to hide an optional Image component?

2013-07-17 Thread Stefan Renz
Hi Sven,

Sven Meier wrote:
 apart from asking the database _again_ for the data or presence thereof
 
 Whether the image is visible must be determined when the page is
 rendered. The actual loading of the image is done in another request.
 Thus two times to ask the databse.

thanks for reminding me -- sometimes, a powerful framework such as
Wicket makes you forget you work with HTTP ;-)

 
 Alternatively you may render a default resource (e.g.
 https://www.google.com/search?q=no+image) if your database doesn't have
 any data to stream back when the image is requested.
 
 Regards
 Sven
 

Have a nice day.
Stefan

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



Re: How to hide an optional Image component?

2013-07-17 Thread Stefan Renz
Hello,

just to tie up loose ends -- here's the solution I decided on:

First, a Model encapsulates the logic and DB-access for a Logo object. I
can pass this into a LogoResource (extends DynamicImageResource), which
streams out the data from that Model's object. The model, however, also
serves to show or hide the Image component using that Resource.

Thanks for your time and suggestions.
Bye
Stefan

Stefan Renz wrote:
 Hi guys,
 
 I'm desparate for your help: I just can't figure out how to suppress an
 Image in case its IResource yields nothing.
 
 Here's some context:
 
 A customer may have a custom logo image (in fact, there's some logic
 involved in determining which exact logo to use, but that's beside the
 point) located in some database. Using Wicket's Image component, I
 figured I would need to implement the logo resolution algorithm and
 loading from the DB with either subclassing DynamicImageResource, or
 subclassing AbstractResourceStream (which is more approriate?).
 
 Works fine if a logo is there -- the image shows up. However, if there
 _is_ no logo, the browser (firefox in my case) renders a question mark
 instead of showing nothing. Both returning null or an empty byte array
 doesn't matter.
 
 I usually suppress a component with a behavior, or within the
 #onConfigure()-Method, but in the Image's case, where I only have an
 IResource or ResourceReference, I just don't have a hint on how to
 determine if the image data is there or not (apart from asking the
 database _again_ for the data or presence thereof).
 
 Any ideas? What method/class have I missed? Where should I look?
 
 Thanks for your help.
 Cheers
 Stefan
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

-- 
im Auftrag der eFonds Solutions AG, +49-89-579494-3417


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