Re: How to check markup attributes?

2011-05-24 Thread Pedro Santos
             String attrVal = tag.getAttribute("maxlength"); >>                if( StringUtils.isBlank(attrVal)){ >>                        throw new IllegalStateException("No maxlength defined >> for " + tag.getId()); >>                } >>              

Re: How to check markup attributes?

2011-05-24 Thread Pedro Santos
>        } >         > } > > Craig > > -Original Message----- > From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] > Sent: May-13-11 5:02 PM > To: users@wicket.apache.org > Subject: Re: How to check markup attributes? > > if you are doing validation you c

Re: How to check markup attributes?

2011-05-24 Thread Martin Grigorov
throw new IllegalStateException("No maxlength > defined for " + tag.getId()); >} >return tag; >} > > } > > Craig > > -Original Message----- > From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] > Sent

Re: How to check markup attributes?

2011-05-24 Thread Igor Vaynberg
                 throw new IllegalStateException("No maxlength defined > for " + tag.getId()); >                } >                return tag; >        } >         > } > > Craig > > -Original Message----- > From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]

RE: How to check markup attributes?

2011-05-24 Thread Craig Pardey
g [mailto:igor.vaynb...@gmail.com] Sent: May-13-11 5:02 PM To: users@wicket.apache.org Subject: Re: How to check markup attributes? if you are doing validation you can use imarkupfilter to check the attrs. -igor On Fri, May 13, 2011 at 1:57 PM, Craig Pardey wrote: > I'd like to check that parti

Re: How to check markup attributes?

2011-05-13 Thread Igor Vaynberg
if you are doing validation you can use imarkupfilter to check the attrs. -igor On Fri, May 13, 2011 at 1:57 PM, Craig Pardey wrote: > I'd like to check that particular markup attributes have been set on a > component. > My first instinct was to use component.getMarkupAttributes(), but the Jav

How to check markup attributes?

2011-05-13 Thread Craig Pardey
I'd like to check that particular markup attributes have been set on a component. My first instinct was to use component.getMarkupAttributes(), but the JavaDoc quite clearly suggests that it shouldn't be used. For example, all TextFields should have a 'maxlength' defined: public class MyTextFie