johncorro
11-03-2004, 06:02 AM
I'm attempting to build a library component that is capable of retrieving and displaying XML content from a servlet. The rough format I have for this component is as such:
<library>
<!-- The returned dataset is an RSS like aggregation of stories based on the users preferences -->
<dataset name="NewsDataSet" request="true" src="http://..."/>
<class name="dataport" extends="view">
<tabslider name="NewsTabSlider" width="${parent.width}" height="${parent.height}">
<!-- Display contents of the news data: 1 tabelement per website -->
</tabslider>
</class>
</library>
I have a single servlet that acts as a gateway to all other custom controller classes. You invoke the servlet by passing two parameters that specify the custom controller class name and the method you wish to invoke (e.g. http://localhost:8080/requestProcessor.rpc?class=...&method=...).
I'd like the client to be able to specify the class name and method this library component should use (e.g. <dataport class="foo" method="bar"/>), but my understanding is that I'd need to form the component as such:
<library>
<class name="dataport" extends="view">
<attribute name="class" value=""/>
<attribute name="method" value=""/>
<!-- Notice the dataset is moved -->
<dataset name="NewsDataSet" request="true" src="http://...?class=${class}&method=${method}"/>
<tabslider name="NewsTabSlider" width="${parent.width}" height="${parent.height}">
<!-- Display contents of the news data: 1 tabelement per website -->
</tabslider>
</class>
</library>
However when I tried doing this I got an error saying that 'dataset' is not allowed there. Anyone have any ideas on how I can implement this?
<library>
<!-- The returned dataset is an RSS like aggregation of stories based on the users preferences -->
<dataset name="NewsDataSet" request="true" src="http://..."/>
<class name="dataport" extends="view">
<tabslider name="NewsTabSlider" width="${parent.width}" height="${parent.height}">
<!-- Display contents of the news data: 1 tabelement per website -->
</tabslider>
</class>
</library>
I have a single servlet that acts as a gateway to all other custom controller classes. You invoke the servlet by passing two parameters that specify the custom controller class name and the method you wish to invoke (e.g. http://localhost:8080/requestProcessor.rpc?class=...&method=...).
I'd like the client to be able to specify the class name and method this library component should use (e.g. <dataport class="foo" method="bar"/>), but my understanding is that I'd need to form the component as such:
<library>
<class name="dataport" extends="view">
<attribute name="class" value=""/>
<attribute name="method" value=""/>
<!-- Notice the dataset is moved -->
<dataset name="NewsDataSet" request="true" src="http://...?class=${class}&method=${method}"/>
<tabslider name="NewsTabSlider" width="${parent.width}" height="${parent.height}">
<!-- Display contents of the news data: 1 tabelement per website -->
</tabslider>
</class>
</library>
However when I tried doing this I got an error saying that 'dataset' is not allowed there. Anyone have any ideas on how I can implement this?