hello everybody, i am trying to create a “table” control. Right now, it’s not bad, i can align things properly. The problem is about the style.
Ok, i would like to write a code like this:
[java]
<control name=“xii-table” id=“someId”>
<tr>
<td>blabla</td><td>something</td>
…
</tr>
<tr>
…
</tr>
…
</control>
[/java]
I don’t expect to see anything magic here, i only want to write this and access these values from inside the code. The problem is, the “control” approach that nifty has seems to be “replace everything in the control body with some other stuff”. As it’s pretty good to modify the result, it’s REALLY annoying when you want to parametrize your control more than just with its attributes. You know, it’s just like we throw away all the xml stuff and do everything in code.
And the part that afraid me is everytime you want to do something that is not in the core of the nifty, the only advice you get is “create your own control”. I wouldn’t have any problem with that if it wasn’t equivalent to “throw away the xml, the inheritence of style, the interoperability, the reusability, the readibility, the separation between presentation and logic” etc.
Hey, i have no problem with creating my own “presentation stuff” if i can still create something that is xml based. But it seems that the control tag is more a gate between the xml-carebear world and the java’s world. And it shouldn’t.
So, i HOPE that i am wrong, that i missed something. But when i read that there is no more a way to add item into a dropdown list with the new versions of nifty … i am scared.
A control tag should mean “i will modify the way it’s displayed”, no “i will do everything myself (and throw away everything other people did), including storing the data myself”.
We are supposed to store as much data as possible in the xml. We are NOT supposed to use xml to DISPLAY things. The control approach (if i understood it well) is just a non-sense.
So, am i wrong ? I hope that i am.