On 11/7/06, craigdd <[EMAIL PROTECTED]> wrote:
I don't know, I think this really violates the concept of separation of
concerns, which wicket seems to really market. You should be able to as a
developer, develop and test the behavior of a component without having to
rely on the html to be written.
Why is there such a tie to the markup and the code, meaning can you
describe
the situations that cause this tie, such as you described with wicket 2.0
why does a component need to read attributes off of the markup upon
initialization.
here are two of a couple of reasons why they are tied:
a) the html and java component hierarchy must be in sync. this is impossible
to validate without having the markup. so you write your test and everything
works, but then you drop your component into a container and at render time
it barfs because something is out of sync between html and java.
b) <table wicket:id="datatable" wicket:rowsperpage="10"></table>
such a construct is possible in 2.0 where in constructor you would do:
class MyDataTable extends DataTable {
public MyDataTable(String id, MarkupContainer parent, ...) {
int rowsperpage=getMarkupAttributes().getIntValue("rowserperpage");
...
}
}
-igor
igor.vaynberg wrote:
>
> imho,
>
> a wicket component is both the javacode and markup. especially in
> wicket 2.0where part of component's initialization can be reading
> attributes off
> markup.
>
> so turning off markup doesnt really make sense.
>
> -igor
>
>
> On 11/7/06, craigdd <[EMAIL PROTECTED]> wrote:
>>
>>
>> I'm starting to use the WicketTester to unittest a new Page. What I'm
>> finding is that when running the test via the WicketTester it looks for
>> the
>> markup (html file).
>>
>> I sort of have an issue with this behavior, to me I think developers
>> should
>> not have to worry about having the markup available at the time where
you
>> just want to test the behavior of an object (Page or Form). What are
>> people's thoughts? Is there a way to turn this off?
>> --
>> View this message in context:
>>
http://www.nabble.com/WicketTester-turn-off-finding-markup-tf2592710.html#a7231166
>> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/WicketTester-turn-off-finding-markup-tf2592710.html#a7231880
Sent from the Wicket - Dev mailing list archive at Nabble.com.