Re: How to remove css class from a component?

2010-06-16 Thread Zoltan Luspai

Hi,

Two alternative solutions:

- If you want the CSS class be appened only in one response then set the 
AttributeAppender as temporary

...new AttributeAppender(...) {
@Override
isTemporary() { return true} }
}...
- Or disable/enable AttributeAppender as needed by overriding 
isEnabled() method of it:

...new AttributeAppender(...) {
@Override
isEnabled() { return inputComponent.getFeedbackMessage() != null }
}...


Cheers,
Zoltan


On 06/16/2010 07:48 AM, David Chang wrote:

Jeremy, glad to hear from you!

My situation is a little different. The CSS class is added in the following 
way. Please see the following code.

protected void onBeforeRender() {
super.onBeforeRender();
if (inputComponent.getFeedbackMessage() != null) {
inputComponent.add(new AttributeAppender(class, new 
ModelString(errorField),  ));
} else {
// how to remove CSS class here??   
}
}


Thanks!


--- On Wed, 6/16/10, Jeremy Thomersonjer...@wickettraining.com  wrote:

   

From: Jeremy Thomersonjer...@wickettraining.com
Subject: Re: How to remove css class from a component?
To: users@wicket.apache.org
Cc: John Krasnayj...@krasnay.ca
Date: Wednesday, June 16, 2010, 1:40 AM
onComponentTag(...) {
tag.remove(class);
}

On Wed, Jun 16, 2010 at 12:37 AM, David Changdavid_q_zh...@yahoo.comwrote:

 

Hello,

I add a CSS class to component dynamcially the
   

following way:
 

inputComponent.add(new AttributeAppender(class, new
ModelString(errorField),  ));

How can I remove this CSS class in java code?

Best!





   

-
 

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


   


--
Jeremy Thomerson
http://www.wickettraining.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: How to remove css class from a component?

2010-06-16 Thread David Chang
Use a model like it's intended?

You mean I should use AbstractReadOnlyModel?

protected void onBeforeRender() {
super.onBeforeRender();
inputComponent.add(new SimpleAttributeModifier(class, true, new
AbstractReadOnlyModelString() {
public String getObject() {
return inputComponent.getFeedbackMessage() != null
? errorField : ;
}
});
}

There is no such constructor forSimpleAttributeModifier.

Thanks.



--- On Wed, 6/16/10, Jeremy Thomerson jer...@wickettraining.com wrote:

 From: Jeremy Thomerson jer...@wickettraining.com
 Subject: Re: How to remove css class from a component?
 To: users@wicket.apache.org
 Date: Wednesday, June 16, 2010, 1:52 AM
 On Wed, Jun 16, 2010 at 12:48 AM,
 David Chang david_q_zh...@yahoo.comwrote:
 
  Jeremy, glad to hear from you!
 
  My situation is a little different. The CSS class is
 added in the following
  way. Please see the following code.
 
         protected void
 onBeforeRender() {
                
 super.onBeforeRender();
                
 if (inputComponent.getFeedbackMessage() != null) {
                
      
    inputComponent.add(new
 AttributeAppender(class,
  new ModelString(errorField),  ));
              
    } else {
                
         // how to remove CSS class
 here??
                
 }
         }
 
 
  Thanks!
 
 
  --- On Wed, 6/16/10, Jeremy Thomerson jer...@wickettraining.com
 wrote:
 
   From: Jeremy Thomerson jer...@wickettraining.com
   Subject: Re: How to remove css class from a
 component?
   To: users@wicket.apache.org
   Cc: John Krasnay j...@krasnay.ca
   Date: Wednesday, June 16, 2010, 1:40 AM
   onComponentTag(...) {
   tag.remove(class);
   }
  
   On Wed, Jun 16, 2010 at 12:37 AM, David Chang
 david_q_zh...@yahoo.com
  wrote:
  
Hello,
   
I add a CSS class to component dynamcially
 the
   following way:
   
inputComponent.add(new
 AttributeAppender(class, new
ModelString(errorField),  ));
   
How can I remove this CSS class in java
 code?
   
Best!
   
   
   
   
   
  
 -
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
   
   
  
  
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
 
 
 
 
 
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 Use a model like it's intended?
 
 protected void onBeforeRender() {
     super.onBeforeRender();
     inputComponent.add(new
 SimpleAttributeModifier(class, true, new
 AbstractReadOnlyModelString() {
         public String getObject() {
             return
 inputComponent.getFeedbackMessage() != null
 ? errorField : ;
         }
     });
 }
 
 -- 
 Jeremy Thomerson
 http://www.wickettraining.com
 




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



Re: How to remove css class from a component?

2010-06-16 Thread Jeremy Thomerson
On Wed, Jun 16, 2010 at 1:05 AM, David Chang david_q_zh...@yahoo.comwrote:

 Use a model like it's intended?

 You mean I should use AbstractReadOnlyModel?

 protected void onBeforeRender() {
super.onBeforeRender();
inputComponent.add(new SimpleAttributeModifier(class, true, new
 AbstractReadOnlyModelString() {
public String getObject() {
return inputComponent.getFeedbackMessage() != null
 ? errorField : ;
}
});
 }

 There is no such constructor forSimpleAttributeModifier.

 Thanks.



 --- On Wed, 6/16/10, Jeremy Thomerson jer...@wickettraining.com wrote:

  From: Jeremy Thomerson jer...@wickettraining.com
  Subject: Re: How to remove css class from a component?
  To: users@wicket.apache.org
  Date: Wednesday, June 16, 2010, 1:52 AM
  On Wed, Jun 16, 2010 at 12:48 AM,
  David Chang david_q_zh...@yahoo.comwrote:
 
   Jeremy, glad to hear from you!
  
   My situation is a little different. The CSS class is
  added in the following
   way. Please see the following code.
  
  protected void
  onBeforeRender() {
  
  super.onBeforeRender();
  
  if (inputComponent.getFeedbackMessage() != null) {
  
 
 inputComponent.add(new
  AttributeAppender(class,
   new ModelString(errorField),  ));
  
 } else {
  
  // how to remove CSS class
  here??
  
  }
  }
  
  
   Thanks!
  
  
   --- On Wed, 6/16/10, Jeremy Thomerson jer...@wickettraining.com
  wrote:
  
From: Jeremy Thomerson jer...@wickettraining.com
Subject: Re: How to remove css class from a
  component?
To: users@wicket.apache.org
Cc: John Krasnay j...@krasnay.ca
Date: Wednesday, June 16, 2010, 1:40 AM
onComponentTag(...) {
tag.remove(class);
}
   
On Wed, Jun 16, 2010 at 12:37 AM, David Chang
  david_q_zh...@yahoo.com
   wrote:
   
 Hello,

 I add a CSS class to component dynamcially
  the
following way:

 inputComponent.add(new
  AttributeAppender(class, new
 ModelString(errorField),  ));

 How can I remove this CSS class in java
  code?

 Best!





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


   
   
--
Jeremy Thomerson
http://www.wickettraining.com
   
  
  
  
  
  
  -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  Use a model like it's intended?
 
  protected void onBeforeRender() {
  super.onBeforeRender();
  inputComponent.add(new
  SimpleAttributeModifier(class, true, new
  AbstractReadOnlyModelString() {
  public String getObject() {
  return
  inputComponent.getFeedbackMessage() != null
  ? errorField : ;
  }
  });
  }
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 




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


I wrote the code in gmail, without the benefit of autocomplete or compile
errors.  What I'm really getting at is that you should *always* add the
attribute modifier, which takes a model for the value to set the attribute
to.  The model (either Model or AbstractReadOnlyModel, although the latter
is more appropriate for this) should then return the correct value based on
the logic

-- 
Jeremy Thomerson
http://www.wickettraining.com


Making rows of DefaultDataTable into links

2010-06-16 Thread Ray Weidner
Hi all,

Forgive my ignorance if this is too obvious.  I'm using DefaultDataTable to
display search results, and that's working fine.  What I'd like to do is
make each row of the table a hyperlink to the view/edit page of the record
in question.  How can I do this?

I was able to add links to a column, although they don't show up in the
browser as actual links.  Rather, they appear as text with associate
javascript to process an onclick event.  Here's the custom column I created
for this purpose:

private class IncidentLinkPropertyColumn extends PropertyColumn
IncidentReport {

public IncidentLinkPropertyColumn (IModel String nameModel, String
propertyName) {
super (nameModel, propertyName);
}
 @Override
public void populateItem (Item ICellPopulator IncidentReport item,
String componentId,
IModel IncidentReport model) {
PageParameters params = new PageParameters ();
params.put (incidentId, model.getObject ().getRecordId ());
item.add (new LabelLink (componentId, CreateOrEditIncidentPage.class,
params));
}

private class LabelLink extends BookmarkablePageLink Object {
private static final long serialVersionUID = 3429331456890689136L;

public LabelLink (String componentId, Class ? extends Page pageType,
PageParameters parameters) {
super (componentId, pageType, parameters);
}
 @Override
protected void onComponentTagBody (MarkupStream markupStream, ComponentTag
openTag) {
replaceComponentTagBody (markupStream, openTag, click here!);
}
}
}

As I said, I'd like the rows to be links to the IncidentReport, but barring
that, it would be nice if the link column actually appeared as links, so
users can right-click to open in a separate tab.  If necessary, I can draft
an informational column (like ID) to serve as a link, as long as it is a
true link (so it will be visually obvious, as well as retaining right-click
functionality).

Any ideas?  Thanks in advance.


Re: How to remove css class from a component?

2010-06-16 Thread David Chang
Zoltan, thanks for your input. The isTemporary works for me!

Best.

--- On Wed, 6/16/10, Zoltan Luspai zlus...@gmail.com wrote:

 From: Zoltan Luspai zlus...@gmail.com
 Subject: Re: How to remove css class from a component?
 To: users@wicket.apache.org
 Date: Wednesday, June 16, 2010, 1:59 AM
 Hi,
 
 Two alternative solutions:
 
 - If you want the CSS class be appened only in one response
 then set the 
 AttributeAppender as temporary
 ...new AttributeAppender(...) {
    �...@override
      isTemporary() { return true} }
 }...
 - Or disable/enable AttributeAppender as needed by
 overriding 
 isEnabled() method of it:
 ...new AttributeAppender(...) {
    �...@override
      isEnabled() { return
 inputComponent.getFeedbackMessage() != null }
 }...
 
 
 Cheers,
 Zoltan
 
 
 On 06/16/2010 07:48 AM, David Chang wrote:
  Jeremy, glad to hear from you!
 
  My situation is a little different. The CSS class is
 added in the following way. Please see the following code.
 
      protected void onBeforeRender() {
         
 super.onBeforeRender();
          if
 (inputComponent.getFeedbackMessage() != null) {
         
     inputComponent.add(new
 AttributeAppender(class, new
 ModelString(errorField),  ));
          } else {
         
     // how to remove CSS class
 here??       
     
          }
      }
 
 
  Thanks!
 
 
  --- On Wed, 6/16/10, Jeremy Thomersonjer...@wickettraining.com 
 wrote:
 
     
  From: Jeremy Thomersonjer...@wickettraining.com
  Subject: Re: How to remove css class from a
 component?
  To: users@wicket.apache.org
  Cc: John Krasnayj...@krasnay.ca
  Date: Wednesday, June 16, 2010, 1:40 AM
  onComponentTag(...) {
  tag.remove(class);
  }
 
  On Wed, Jun 16, 2010 at 12:37 AM, David
 Changdavid_q_zh...@yahoo.comwrote:
 
       
  Hello,
 
  I add a CSS class to component dynamcially
 the
         
  following way:
       
  inputComponent.add(new
 AttributeAppender(class, new
  ModelString(errorField),  ));
 
  How can I remove this CSS class in java code?
 
  Best!
 
 
 
 
 
         
 
 -
       
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
         
 
  -- 
  Jeremy Thomerson
  http://www.wickettraining.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
 
 




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



Re: How to remove css class from a component?

2010-06-16 Thread David Chang
Thanks for the explanation! All the best.


--- On Wed, 6/16/10, Jeremy Thomerson jer...@wickettraining.com wrote:

 From: Jeremy Thomerson jer...@wickettraining.com
 Subject: Re: How to remove css class from a component?
 To: users@wicket.apache.org
 Date: Wednesday, June 16, 2010, 2:10 AM
 On Wed, Jun 16, 2010 at 1:05 AM,
 David Chang david_q_zh...@yahoo.comwrote:
 
  Use a model like it's intended?
 
  You mean I should use AbstractReadOnlyModel?
 
  protected void onBeforeRender() {
     super.onBeforeRender();
     inputComponent.add(new
 SimpleAttributeModifier(class, true, new
  AbstractReadOnlyModelString() {
         public String getObject()
 {
             return
 inputComponent.getFeedbackMessage() != null
  ? errorField : ;
         }
     });
  }
 
  There is no such constructor
 forSimpleAttributeModifier.
 
  Thanks.
 
 
 
  --- On Wed, 6/16/10, Jeremy Thomerson jer...@wickettraining.com
 wrote:
 
   From: Jeremy Thomerson jer...@wickettraining.com
   Subject: Re: How to remove css class from a
 component?
   To: users@wicket.apache.org
   Date: Wednesday, June 16, 2010, 1:52 AM
   On Wed, Jun 16, 2010 at 12:48 AM,
   David Chang david_q_zh...@yahoo.comwrote:
  
Jeremy, glad to hear from you!
   
My situation is a little different. The CSS
 class is
   added in the following
way. Please see the following code.
   
           protected void
   onBeforeRender() {
   
   super.onBeforeRender();
   
   if (inputComponent.getFeedbackMessage() != null)
 {
   
  
      inputComponent.add(new
   AttributeAppender(class,
new ModelString(errorField), 
 ));
   
      } else {
   
           // how to
 remove CSS class
   here??
   
   }
           }
   
   
Thanks!
   
   
--- On Wed, 6/16/10, Jeremy Thomerson jer...@wickettraining.com
   wrote:
   
 From: Jeremy Thomerson jer...@wickettraining.com
 Subject: Re: How to remove css class
 from a
   component?
 To: users@wicket.apache.org
 Cc: John Krasnay j...@krasnay.ca
 Date: Wednesday, June 16, 2010, 1:40
 AM
 onComponentTag(...) {
 tag.remove(class);
 }

 On Wed, Jun 16, 2010 at 12:37 AM, David
 Chang
   david_q_zh...@yahoo.com
wrote:

  Hello,
 
  I add a CSS class to component
 dynamcially
   the
 following way:
 
  inputComponent.add(new
   AttributeAppender(class, new
  ModelString(errorField),
  ));
 
  How can I remove this CSS class in
 java
   code?
 
  Best!
 
 
 
 
 

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


 --
 Jeremy Thomerson
 http://www.wickettraining.com

   
   
   
   
   
  
 -
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
   
   
   Use a model like it's intended?
  
   protected void onBeforeRender() {
       super.onBeforeRender();
       inputComponent.add(new
   SimpleAttributeModifier(class, true, new
   AbstractReadOnlyModelString() {
           public
 String getObject() {
           
    return
   inputComponent.getFeedbackMessage() != null
   ? errorField : ;
           }
       });
   }
  
   --
   Jeremy Thomerson
   http://www.wickettraining.com
  
 
 
 
 
 
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 I wrote the code in gmail, without the benefit of
 autocomplete or compile
 errors.  What I'm really getting at is that you should
 *always* add the
 attribute modifier, which takes a model for the value to
 set the attribute
 to.  The model (either Model or AbstractReadOnlyModel,
 although the latter
 is more appropriate for this) should then return the
 correct value based on
 the logic
 
 -- 
 Jeremy Thomerson
 http://www.wickettraining.com
 




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



Re: Making rows of DefaultDataTable into links

2010-06-16 Thread Jeremy Thomerson
On Wed, Jun 16, 2010 at 1:17 AM, Ray Weidner 
ray.weidner.develo...@gmail.com wrote:

 Hi all,

 Forgive my ignorance if this is too obvious.  I'm using DefaultDataTable to
 display search results, and that's working fine.  What I'd like to do is
 make each row of the table a hyperlink to the view/edit page of the record
 in question.  How can I do this?

 I was able to add links to a column, although they don't show up in the
 browser as actual links.  Rather, they appear as text with associate
 javascript to process an onclick event.  Here's the custom column I created
 for this purpose:

 private class IncidentLinkPropertyColumn extends PropertyColumn
 IncidentReport {

 public IncidentLinkPropertyColumn (IModel String nameModel, String
 propertyName) {
 super (nameModel, propertyName);
 }
  @Override
 public void populateItem (Item ICellPopulator IncidentReport item,
 String componentId,
 IModel IncidentReport model) {
 PageParameters params = new PageParameters ();
 params.put (incidentId, model.getObject ().getRecordId ());
 item.add (new LabelLink (componentId, CreateOrEditIncidentPage.class,
 params));
 }

 private class LabelLink extends BookmarkablePageLink Object {
 private static final long serialVersionUID = 3429331456890689136L;

 public LabelLink (String componentId, Class ? extends Page pageType,
 PageParameters parameters) {
 super (componentId, pageType, parameters);
 }
  @Override
 protected void onComponentTagBody (MarkupStream markupStream, ComponentTag
 openTag) {
 replaceComponentTagBody (markupStream, openTag, click here!);
 }
 }
 }

 As I said, I'd like the rows to be links to the IncidentReport, but barring
 that, it would be nice if the link column actually appeared as links, so
 users can right-click to open in a separate tab.  If necessary, I can draft
 an informational column (like ID) to serve as a link, as long as it is a
 true link (so it will be visually obvious, as well as retaining right-click
 functionality).

 Any ideas?  Thanks in advance.


to make the rows into links, override newItem (or whatever the name is - it
starts with new) that creates a new row.  then you could add an onclick to
the row item, or even an ajaxeventbehavior(onclick) to do some ajax
behavior

to make the column into a real link, you'll need to use a fragment since the
default html for a cell is just a span.

-- 
Jeremy Thomerson
http://www.wickettraining.com


Re: Wicket and mobile browsers

2010-06-16 Thread Martin Funk
Thank you for the hint, mobileaware wasn't on my radar so far.

2010/6/15 Joachim F. Kainz j...@jolira.com

 Martin,

 WURFL is a great solution, but there are some problems with keeping it
 up-to-date for commercial applications.

 http://www.mobileaware.com/ is a good commercial vendor I have used for
 m.wellsfarg.com and other sites. They have an extensive
 device-repository and a lot of other useful features for building MWeb
 sites. Downside: $$$

 Best regards,

 Joachim

 On Tue, 2010-06-15 at 17:36 +0200, Martin Funk wrote:

  Hi Giovanni,
 
  on what basis do you do the device recognition and classification?
 
  Currently we are looking into wurfl http://wurfl.sourceforge.net/
  Any opion on tha? Or do you know of an alternative to wurfl?
 
  mf
 
  2010/6/15 Joachim F. Kainz j...@jolira.com
 
   Giovanni,
  
   I am one of the developers of mobile.walmart.com. We are using Wicket
 to
   support all types of cell phones, but most of our traffic is from smart
   phones. If you point to our site using iPhone, Blackberry, and Motorola
   Razor you get three different experience. All three experiences are
   backed by the same Java code.
  
   We have nothing to do with visural wicket (even though at first glance
   it looks interesting). Our opensource components are at
   http://code.google.com/p/jolira-tools/
  
   Best regards,
  
   Joachim
   http://www.jolira.com
  
   On Sun, 2010-04-18 at 13:02 -0500, Jeremy Thomerson wrote:
  
There are many classes of smart phones available.  Some support n JS,
   some
very limited, while others support just about anything you can put in
 a
regular browser.  Because of this, you may use the same java code
 with
   three
or four different styles of markup so that each browser class has its
 own
markup.
   
Search the list for mobile.walmart.com and see the post made by
 the
   guys
that created that site.  It talked about this.  They also released
 some
   open
source components - visural wicket.
   
--
Jeremy Thomerson
http://www.wickettraining.com
   
   
   
On Sun, Apr 18, 2010 at 3:17 AM, Giovanni pino_o...@yahoo.com
 wrote:
   
 I need to write a web application which will be accessed via mobile
 browsers from smartphones.

 What are the smartphone browsers which work well with Wicket?

 What kind of attention should I pay during the development of
 Wicket
 applications for mobile devices?

 Is there any tutorial about developing Wicket applications for
 mobile
 target browsers?

 Thanks in advance for any help.

 giovanni




  



Re: is this a bug in ModelT?

2010-06-16 Thread Wilhelmsen Tor Iver
 it is a bug, open a jira issue

Or a feature? Either it should use getObject() internally or Model.getObject() 
should be declared final to prevent the programmer from thinking he can 
override it - both will solve the issue.

- Tor Iver

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



RE: Wicket and mobile browsers

2010-06-16 Thread Chris Colman
Should a Motorola E51 be able to use a stock standard wicket site with a
bit of AJAX? Apparently its browser has javascript support (and it is
enabled) but I can never get any parts of our wicket website that
require AJAX to work on this phone.

Any idea why not?

-Original Message-
From: Martin Funk [mailto:mafulaf...@googlemail.com]
Sent: Wednesday, 16 June 2010 7:10 PM
To: users@wicket.apache.org
Subject: Re: Wicket and mobile browsers

Thank you for the hint, mobileaware wasn't on my radar so far.

2010/6/15 Joachim F. Kainz j...@jolira.com

 Martin,

 WURFL is a great solution, but there are some problems with keeping
it
 up-to-date for commercial applications.

 http://www.mobileaware.com/ is a good commercial vendor I have used
for
 m.wellsfarg.com and other sites. They have an extensive
 device-repository and a lot of other useful features for building
MWeb
 sites. Downside: $$$

 Best regards,

 Joachim

 On Tue, 2010-06-15 at 17:36 +0200, Martin Funk wrote:

  Hi Giovanni,
 
  on what basis do you do the device recognition and classification?
 
  Currently we are looking into wurfl http://wurfl.sourceforge.net/
  Any opion on tha? Or do you know of an alternative to wurfl?
 
  mf
 
  2010/6/15 Joachim F. Kainz j...@jolira.com
 
   Giovanni,
  
   I am one of the developers of mobile.walmart.com. We are using
Wicket
 to
   support all types of cell phones, but most of our traffic is from
smart
   phones. If you point to our site using iPhone, Blackberry, and
Motorola
   Razor you get three different experience. All three experiences
are
   backed by the same Java code.
  
   We have nothing to do with visural wicket (even though at first
glance
   it looks interesting). Our opensource components are at
   http://code.google.com/p/jolira-tools/
  
   Best regards,
  
   Joachim
   http://www.jolira.com
  
   On Sun, 2010-04-18 at 13:02 -0500, Jeremy Thomerson wrote:
  
There are many classes of smart phones available.  Some support
n
JS,
   some
very limited, while others support just about anything you can
put
in
 a
regular browser.  Because of this, you may use the same java
code
 with
   three
or four different styles of markup so that each browser class
has
its
 own
markup.
   
Search the list for mobile.walmart.com and see the post made
by
 the
   guys
that created that site.  It talked about this.  They also
released
 some
   open
source components - visural wicket.
   
--
Jeremy Thomerson
http://www.wickettraining.com
   
   
   
On Sun, Apr 18, 2010 at 3:17 AM, Giovanni pino_o...@yahoo.com
 wrote:
   
 I need to write a web application which will be accessed via
mobile
 browsers from smartphones.

 What are the smartphone browsers which work well with Wicket?

 What kind of attention should I pay during the development of
 Wicket
 applications for mobile devices?

 Is there any tutorial about developing Wicket applications
for
 mobile
 target browsers?

 Thanks in advance for any help.

 giovanni




  


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



Re: wiQuery components with server side state - live demo

2010-06-16 Thread Cemal Bayramoglu
Theis,

It has just been brought to my attention that we have not responded on
this thread yet - thanks for your patience.

This has never been an open source project - it was just a show case
of what can be achieved with Wicket, wiQuery, and various jQuery
components (like grids, growls, splitters, portlets etc) for RIA.

We are working on aspects of these extensions with/for various clients
and it is quite likely we will only make publicly
available/open-source limited parts of it. These should eventually
live on the wiQuery-plugins project on gitHub  we have been planning
for wiQuery with ODLabs and Lionel.

As things stand, I would say don't hold your breath as there are
various commercial factors we have no control over that any related
decisions are dependent on.

Regards - Cemal
jWeekend
Training, Development, Consultancy
http://jWeekend.com



On 12 June 2010 23:42, Thies Edeling tedel...@gmail.com wrote:
 Is this project still alive? The URL below now prompts for a
 username/password. Thx!

 On Wed, Mar 10, 2010 at 1:10 AM, Cemal Bayramoglu 
 jweekend_for...@cabouge.com wrote:

 http://labs.jweekend.com/public/grid/GridRowExpanderPage

 On 3 March 2010 18:20, John Armstrong siber...@siberian.org wrote:
  Hi Richard,
 
   See here: http://www.extjs.com/examples/explorer.html#gridplugins
 
  http://www.extjs.com/examples/explorer.html#gridpluginsIn this case
 its a
  grid rather then a tree that expands and allows arbitrary components to
 be
  inserted beneath the row.
 
  Similar to a tree but very grid specific.
 
  Very excited about your work, so many hoops too jump through with GWT..
  J
 
  On Wed, Mar 3, 2010 at 10:17 AM, Richard Wilkinson 
  richard.wilkin...@jweekend.com wrote:
 
  Hi,
 
  John - im not to sure what you mean by row expanders, is that similar
  to what is provided on the tree grid?
 
  Ernesto - see comments inline:
 
 
  On 3 March 2010 12:59, Ernesto Reinaldo Barreiro reier...@gmail.com
  wrote:
   Hi Cemal,
  
   Other things that might be useful:
  
   -Offer (pluggable) support for grid events at client and server side
  (e.g.
   been notified when user navigates between pages, sorts a columns,
 etc).
  By
   pluggable I mean they can be enable if you need them so that no
  unnecessary
   server round trips are made.
 
  The gird always has to make a request to the server when the user
  navigates between pages, or changes the sorting, since this requires
  updated data.  However these events are handled internally to the grid
  code and are not accessible to the developer.  If required we could
  make these events accessible to the developer, either through adding a
  behaviour, or overriding a method.  Other things such as selection
  notification events, or editing, can optionally be listened to by the
  developer, but these do not make a round trip to the server unless
  they are explicitly added.
 
   -Show an example of how the grid interacts with a normal wicket form.
  E.g.
   have a form the is submitted via Wicket AJAX and get the grid
 refreshed
   either via Wicket AJAX (i.e. the whole grid component is reloaded) or
   triggering a reload event on the grid (I see the master detail example
 is
   built using this last approach?) .
 
  yes, this page (http://labs.jweekend.com/public/gridjpa/ProjectEditPage
 )
  uses a wicket form (not automatically generated though) to edit a row
  in one grid, which then triggers a data refresh in both grids, but
  does not do a wicket ajax component replace.  However ajax component
  replace is supported as there is an AjaxRequestTarget, but I feel that
  forcing the grid to reload is cleaner.
 
   -All the examples seem to use JSON for data transfer? Is XML
 supported?
 
  The grid uses JSON, however this is all internal and transparent to
  the developer using the grid, so I dont see how supporting XML would
  be a benefit.  It is not possible to construct JSON or XML and feed
  this into the grid manually, i.e. by telling the grid which url to
  use.
 
  The intended use is the same as with a Wicket DataTable, where an
  IDataProvider provides an iterator of beans which are rendered as rows
  in the grid.  We use Wicket IConverter to convert each field of the
  bean to a String, then use a JSON library to construct the JSON
  response, which is then used in a custom wicket IRequestTarget for
  JSON.
 
  
   Best,
  
   Ernesto
  
   On Wed, Mar 3, 2010 at 11:33 AM, Cemal Bayramoglu 
   jweekend_for...@cabouge.com wrote:
  
 
 
 
  --
  Regards - Richard Wilkinson
  Developer,
  jWeekend: OO  Java Technologies - Development and Training
  http://jWeekend.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, 

Re: gmail like file upload

2010-06-16 Thread fachhoch

Please suggest me how to integrate google like fileupload in wicket 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/gmail-like-file-upload-tp2251270p2257580.html
Sent from the Wicket - User 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: Frustrating behavior ... same browser, same war, same tomcat version - different behavior!!!

2010-06-16 Thread Bryan Montgomery
I haven't got to the bottom of it exactly, but it's related to our (my)
attempt to integrate jcifs and ntml SSO in to the application.

It's gone back now to our main software vendor to figure out from here.

Bryan.

On Tue, Jun 8, 2010 at 8:46 AM, Bryan Montgomery mo...@english.net wrote:

 Thanks for all the ideas and interest - I still haven't solved it.

 It did seem to work for a while but then as I changed a configuration to
 prove what was broken - I haven't been able to get it working again.

 I'm thinking it is some sort of caching issue - but I can't find any
 settings, tomcat is running as root so it shouldn't be any permission issues
 ..

 I need to move on with the project so I am probably just going to get a new
 virtual server built. I want to keep the old around because it is bugging
 the heck out of me :)


 On Tue, Jun 8, 2010 at 6:58 AM, nino martinez wael 
 nino.martinez.w...@gmail.com wrote:

 did you solve this yet?

 2010/6/7 Bryan Montgomery mo...@english.net:
  Thanks - this is still puzzling me. This is a virtual machine. I did
 just
  try the war on another virtual machine and it worked as expected. I
 think
  I'm about to rebuild the server.
 
  I don't have any clustering, and not using apache, just hitting tomcat
  directly. One thing I noticed from the profiling on IE8 is that on the
  servers that worked normally, the postbacks had the jsessionid appended
 to
  the url. The non-working server is missing that so I'm doing a little
 bit of
  digging to see if I can find a reason why that may be happening.
 
  Cheers - Bryan.
 
  On Fri, Jun 4, 2010 at 7:33 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
 
  right, sounds like the session is being lost and the page is being
  rerendered fresh.
 
  -igor
 
  On Fri, Jun 4, 2010 at 1:46 PM, Scott Swank scott.sw...@gmail.com
 wrote:
   Do you have apache or a load balancer or anything else in the
 network?
Is there maybe a simple difference in your httpd.conf pertaining to
   sessions?
  
   On Fri, Jun 4, 2010 at 1:32 PM, Bryan Montgomery mo...@english.net
  wrote:
   Thanks for the ideas. Still no joy.
  
   The behavior is consistent between three different clients, all
 running
   different versions of IE (6,7 and 8).
   I was able to use the debugging feature built in to IE 8 to see that
 the
   wicket ajax javascript was gettting called. At some point in that
  process it
   lost the value of the field and it got set to an empty field.
  
   I have the feeling that there is something different with the
  environment on
   this particular server - but I have no idea what at this point.
  
   On Fri, Jun 4, 2010 at 1:32 PM, gnul nullc...@gmail.com wrote:
  
   
Essentially, part of the process generates dynamic web forms
 based on
  xml
configuration files. We noticed that on one of our servers when
 we
   deployed
the war file that the fields would not hold their values, and as
 soon
  as
   you
tabbed out, the entry would disappear. Taking the same war file
 and
deploying it to another server the form acts as expected.
   
  
   If it works on one server, but not the other, and they are
 configured
   the same (meaning same appserver/tomcat version, same jvm, same
   user/group/perms, etc.), the first thing I do is clean the
 appserver
   and do a fresh deploy.
  
   For example, say you are deploying to /var/lib/tomcat/webapps/, I
   would shutdown both tomcats, remove the exploded directories (e.g.
   myapp.war = myapp/ ) and re-deploy the war files to each server.
  I
   would also clean out tomcat's temp directory (e.g.
   /var/cache/tomcat5/temp), then restart them both.
  
-gnul
  
  
 -
   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
 
 
 

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





Re: Show/hide form components best practice

2010-06-16 Thread Iain Reddick
I looked at this again today and realised that my examples are basically broken 
(also typos in the last one :) ).

Obviously, you can't use the converted input of a FormComponent before 
validation has happened. This means that using the CheckBox converted input to 
determine whether another form component is used in the submission is wrong - 
it will only return the value it held before the submit. You would actually 
have to look at the raw input.

So I'm back at square one with this again.

I suppose my question is Is component visibility the only means of determining 
whether a form component should be considered in the form submit mechanism?.

- Original Message -
From: Iain Reddick iain.redd...@beatsystems.com
To: users@wicket.apache.org
Sent: Wednesday, 9 June, 2010 8:35:13 PM
Subject: Re: Show/hide form components best practice

Looking at the wicket source regarding this, I don't think it's possible
to get the desired behaviour.

It looks like a new hook is needed in FormComponent.validate() that is
called before any of the other logic.

Something like FormComponent.isUsed(). If this returns false, just exit
the validate() methods.

Default FormComponent implementation would return true for this method,
but it can be overriden to provide the desired behaviour.

As I understand the submit/validate/bind sequence, this would mean that
the form component's raw input is updated (which makes sense), but
validation/model object doesn't happen.

Is this feasible, and would it impact elsewhere?


Here's an update of my previous example showing how it would be used:

private class TestForm extends Form {

private String always;
private boolean useOptional = false;
private String optional;

public TestForm(String id) {
super(id);

add( new TextField(always, new PropertyModel(this,
always)).setRequired(true) );
final CheckBox useOptionalCheck = new CheckBox( useOptional, new
PropertyModel(this, useOptional) );
add( useOptionalCheck );
add( new TextField(optional, new PropertyModel(this, optional)) {
@Override public boolean isUsed() {
return ((Boolean)useOptionalCheck.getConvertedInput()).booleanValue();
}

@Override
public boolean isRequired() {
isUsed(); }
}.add(MinimumLengthValidator.minimumLength(3)) );
}

}


- Original Message -
From: Xavier López xavil...@gmail.com
To: users@wicket.apache.org
Sent: Thursday, 3 June, 2010 2:56:33 PM
Subject: Re: Show/hide form components best practice

I'm with you on this one, this code feels like doing something that it
shouldn't, looks kind of bloated for such a simple and common
requirement. Maybe we need some stuffing of nice, pre-canned
FormValidators ? :)

The problem with wicket's validators, as I see it, is that they are at a
Component level. They do their job based on that component's
input/state, only. In fact, they are called in Form's
validateComponents() one by one in
a traversal. If another component's input or state is required to
perform the validation, i'd do it inside a FormValidator. That copes
with your
requirement of ignore the input for this component completely,
although I
don't know how would that be achieved.

Of course, in all those comments, I assume you can not rely on
javascript nor ajax to perform those validations, in which case the
visibility approach
simply couldn't work.

Cheers,
Xavier

2010/6/3 Iain Reddick iain.redd...@beatsystems.com

 The problem with this approach is that you throw away all the nice,
 re-usable pre-canned validators that wicket has, and that it seems
 very wrong.

 I'd actually push the behaviour I would like to see even further - in
 the example I gave, I don't even want the optional field to update
 it's model
 when the check box isn't selected.

 Effectively, I want to be able to specify logic which says ignore the
 input for this component completely. Currently, the only way to do
 this is
 by using component visibility (unless I'm completely wrong on this).

 Xavier López wrote:

 Hi Iain,

 I would do it like this, with a FormValidator. I moved the minimum
 length validation also to the formValidator, because doing it with a
 MinimumLenghtValidator would trigger it before the formValidator
 executes, and may raise errors when the input is not valid (i.e. not
 mandatory) :

 private class TestForm extends Form {

 IModel modelAlways;
 IModel modelCheckOptional;
 IModel modelOptional;

  public TestForm(String id) {
   super(id);

   modelAlways = new Model();
   modelCheckOptional = Boolean.FALSE;
   modelOptional = new Model();
   final TextField alwaysTextfield = new TextField(always,
   modelAlways); alwaysTextField.setRequired(true);
   add(alwaysTextField); final CheckBox useOptionalCheck = new
   CheckBox( useOptional,
 modelCheckOptional);
   add( useOptionalCheck );
   final TextField optionalTextField = new TextField(optional,
 modelOptional);
   add(optionalTextField);

   add(new IFormValidator(){
  protected FormComponent getDependentFormComponents(){ return
  null; }
   

Encoding for wicket:message tag

2010-06-16 Thread Martin Makundi
Hi!

We are using wicket:message tag to generate content for WAP.

Wap is strict XML so it does not allow special characters. Is there a
way to force wicket:message tag to escape encode its message?

**
Martin

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



url params with ExternalLink

2010-06-16 Thread jgormley

In looking at the source code for ExternalLink (wicket 1.4.6), I see that all
urls have '' converted to 'amp;'

// generate the href attribute
tag.put(href, Strings.replaceAll(url, , amp;));

How can I link to an external url and still pass url parameters?  I want to
do something like this:

this.add(new ExternalLink(link,
http://www.google.com/search?hl=enq=wicket;, Google Wicket));

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/url-params-with-ExternalLink-tp2257905p2257905.html
Sent from the Wicket - User 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: url params with ExternalLink

2010-06-16 Thread Igor Vaynberg
and whats the problem with that? the browser should convert the amp;
back into  when you hit the link.

-igor

On Wed, Jun 16, 2010 at 2:10 PM, jgormley
josh.gorm...@networkedinsights.com wrote:

 In looking at the source code for ExternalLink (wicket 1.4.6), I see that all
 urls have '' converted to 'amp;'

        // generate the href attribute
        tag.put(href, Strings.replaceAll(url, , amp;));

 How can I link to an external url and still pass url parameters?  I want to
 do something like this:

        this.add(new ExternalLink(link,
 http://www.google.com/search?hl=enq=wicket;, Google Wicket));

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/url-params-with-ExternalLink-tp2257905p2257905.html
 Sent from the Wicket - User 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: Wicket and mobile browsers

2010-06-16 Thread Chris Colman
Whoops! That should have read 'Nokia E51' - I accidentally mixed the
brand name of my previous phone with the model number of my current
phone.

Should a Motorola E51 be able to use a stock standard wicket site with
a
bit of AJAX? Apparently its browser has javascript support (and it is
enabled) but I can never get any parts of our wicket website that
require AJAX to work on this phone.

Any idea why not?

-Original Message-
From: Martin Funk [mailto:mafulaf...@googlemail.com]
Sent: Wednesday, 16 June 2010 7:10 PM
To: users@wicket.apache.org
Subject: Re: Wicket and mobile browsers

Thank you for the hint, mobileaware wasn't on my radar so far.

2010/6/15 Joachim F. Kainz j...@jolira.com

 Martin,

 WURFL is a great solution, but there are some problems with keeping
it
 up-to-date for commercial applications.

 http://www.mobileaware.com/ is a good commercial vendor I have used
for
 m.wellsfarg.com and other sites. They have an extensive
 device-repository and a lot of other useful features for building
MWeb
 sites. Downside: $$$

 Best regards,

 Joachim

 On Tue, 2010-06-15 at 17:36 +0200, Martin Funk wrote:

  Hi Giovanni,
 
  on what basis do you do the device recognition and classification?
 
  Currently we are looking into wurfl http://wurfl.sourceforge.net/
  Any opion on tha? Or do you know of an alternative to wurfl?
 
  mf
 
  2010/6/15 Joachim F. Kainz j...@jolira.com
 
   Giovanni,
  
   I am one of the developers of mobile.walmart.com. We are using
Wicket
 to
   support all types of cell phones, but most of our traffic is
from
smart
   phones. If you point to our site using iPhone, Blackberry, and
Motorola
   Razor you get three different experience. All three experiences
are
   backed by the same Java code.
  
   We have nothing to do with visural wicket (even though at first
glance
   it looks interesting). Our opensource components are at
   http://code.google.com/p/jolira-tools/
  
   Best regards,
  
   Joachim
   http://www.jolira.com
  
   On Sun, 2010-04-18 at 13:02 -0500, Jeremy Thomerson wrote:
  
There are many classes of smart phones available.  Some
support
n
JS,
   some
very limited, while others support just about anything you can
put
in
 a
regular browser.  Because of this, you may use the same java
code
 with
   three
or four different styles of markup so that each browser class
has
its
 own
markup.
   
Search the list for mobile.walmart.com and see the post made
by
 the
   guys
that created that site.  It talked about this.  They also
released
 some
   open
source components - visural wicket.
   
--
Jeremy Thomerson
http://www.wickettraining.com
   
   
   
On Sun, Apr 18, 2010 at 3:17 AM, Giovanni
pino_o...@yahoo.com
 wrote:
   
 I need to write a web application which will be accessed via
mobile
 browsers from smartphones.

 What are the smartphone browsers which work well with
Wicket?

 What kind of attention should I pay during the development
of
 Wicket
 applications for mobile devices?

 Is there any tutorial about developing Wicket applications
for
 mobile
 target browsers?

 Thanks in advance for any help.

 giovanni




  


-
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: url params with ExternalLink

2010-06-16 Thread jgormley

Ok then, color me ignorant.  I was writing my unit tests and noticed that
this was happening and thought it would cause issues (I'm not yet testing in
the browser -- just writing up-front tests of the app as I build it).  I
never really paid attention to the fact that you could encode those
characters in the href and the browser would be smart enough to get it
right.  Thanks for clarifying.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/url-params-with-ExternalLink-tp2257905p2258153.html
Sent from the Wicket - User 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: url params with ExternalLink

2010-06-16 Thread Igor Vaynberg
in fact you *should* encode it to be xhtml compliant...

-igor

On Wed, Jun 16, 2010 at 8:14 PM, jgormley
josh.gorm...@networkedinsights.com wrote:

 Ok then, color me ignorant.  I was writing my unit tests and noticed that
 this was happening and thought it would cause issues (I'm not yet testing in
 the browser -- just writing up-front tests of the app as I build it).  I
 never really paid attention to the fact that you could encode those
 characters in the href and the browser would be smart enough to get it
 right.  Thanks for clarifying.
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/url-params-with-ExternalLink-tp2257905p2258153.html
 Sent from the Wicket - User 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