01: /*
02: * Copyright 2005 Joe Walker
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.getahead.dwrdemo.proxy.demo;
17:
18: import java.util.Collection;
19:
20: import jsx3.GI;
21: import jsx3.app.Server;
22: import jsx3.gui.Button;
23: import jsx3.gui.Form;
24:
25: import org.directwebremoting.ScriptSession;
26: import org.directwebremoting.ServerContext;
27: import org.directwebremoting.ServerContextFactory;
28:
29: public class Test {
30: public static void main(String[] args) {
31: ServerContext sctx = ServerContextFactory.get(null);
32: Collection<ScriptSession> sessions = sctx
33: .getScriptSessionsByPage(null);
34: Server server = GI.getServer(sessions, "appname");
35: Button button = server.getJSXById("button", Button.class);
36: button.setEnabled(Form.STATEDISABLED, true);
37: }
38: }
|