Thorsten Scherler wrote:
+ /**
+ * @return Returns the useCforms.
+ */
+ public boolean isUseCforms() {
+ return useCforms;
+ }
I'd rather make this more general:
<usecase ...>
<view type="cforms">
<cforms definition="..." binding="..."/>
...
</view>
</usecase>
public static String VIEW_JX = "jx";
public static String VIEW_CFORMS = "cforms";
public static String VIEW_FOO = "foo";
public int getViewType() {
return this.viewType
}
Maybe we can use a ViewHandler class or something else
to use polymorphism instead of static fields and an if/then/else
condition in usecases.js?
JavaScript is interpreted, so we can even create function
calls dynamically.
function cformsView(...) { ... }
function jxView(...) { ... }
function fooView(...) { ... }
...
eval(usecase.getViewType + "View(...)");
That is IMO cleaner than if/then/else.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]