I've been using 1.3.6 but let me try 1.4 rc build and see where it takes me.

Is there an example that shows how it can be used in the above context ?

-Arun


igor.vaynberg wrote:
> 
> see
> 
> org.apache.wicket.markup.repeater.OddEvenItem
> 
> for a cleaner, simpler way to do this
> 
> -igor
> 
> On Tue, Aug 4, 2009 at 4:36 PM, Arun Gupta<[email protected]> wrote:
>> Trying to provide different color to alternate rows by following the
>> recommendation at:
>>
>> http://devinvenable.blogspot.com/2007/10/wicket-and-html-style-attributes.html
>>
>> The source code is available at:
>>
>> http://kenai.com/projects/runner/sources/subversion/content/wicket/runner/src/main/java/org/example/runner/runlog/RunlogPage.java?rev=118
>>
>> Adding the following code:
>>
>> item.add(new AttributeModifier("class", new PropertyModel(this,
>> runlog.getId() % 2 == 0 ? "list-line-odd" : "list-line-event")));
>>
>> at line 104 or 134 gives the following error:
>>
>> -- cut here --
>> WicketMessage: No get method defined for class: class
>> org.example.runner.runlog.RunlogPage$2 expression: list-line-odd
>>
>> Root cause:
>>
>> org.apache.wicket.WicketRuntimeException: No get method defined for
>> class: class org.example.runner.runlog.RunlogPage$2 expression:
>> list-line-odd
>> at
>> org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:440)
>> at
>> org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:282)
>> at
>> org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:91)
>> -- cut here --
>>
>> CSS is statically linked as:
>>
>> <link rel="stylesheet" type="text/css" href="css/runlog.css"/>
>>
>> The CSS is at:
>>
>> http://kenai.com/projects/runner/sources/subversion/content/wicket/runner/src/main/webapp/css/runlog.css?rev=118
>>
>> Any idea, what's wrong ?
>>
>> Or a better advise to provide odd/even rows with different colors ?
>>
>> Thanks,
>> -Arun
>> --
>> Need Application Server ? - Download glassfish.org
>> Blog: http://blogs.sun.com/arungupta
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Alternate-rows-with-different-color-tp24818138p24818321.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to