01: /*
02: * Created on 17-Sep-2006
03: */
04: package uk.org.ponder.rsf.producers.support;
05:
06: import uk.org.ponder.rsf.components.UIContainer;
07: import uk.org.ponder.rsf.components.UIJointContainer;
08: import uk.org.ponder.rsf.producers.BasicProducer;
09: import uk.org.ponder.rsf.producers.NullaryProducer;
10:
11: /** An "adaptor" processor that accepts the NullaryProducer for the
12: * accumulated views in the container, and adapts it to a PageProducer
13: * suitable for injection into a client producer (probably a root page
14: * producer implementing BasicProducer)
15: * @author Antranig Basman (amb26@ponder.org.uk)
16: *
17: */
18: public class NullaryToBasicProducer implements BasicProducer {
19: private NullaryProducer nullaryProducer;
20: private String jointID;
21:
22: public void setJointID(String jointID) {
23: this .jointID = jointID;
24: }
25:
26: public void setNullaryProducer(NullaryProducer nullaryProducer) {
27: this .nullaryProducer = nullaryProducer;
28: }
29:
30: public void fillComponents(UIContainer parent, String clientID) {
31: UIJointContainer joint = new UIJointContainer(parent, clientID,
32: jointID);
33: nullaryProducer.fillComponents(joint);
34: }
35:
36: }
|