KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > admingui > handlers > adminObjectHandlers


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * ConnectorConnectionPoolHandlers.java
26  *
27  * Created on November 26, 2003, 2:35 PM
28  */

29
30 package com.sun.enterprise.tools.admingui.handlers;
31
32 import java.util.EventObject JavaDoc;
33 import javax.servlet.http.HttpSession JavaDoc;
34
35 import com.iplanet.jato.RequestContext;
36 import com.iplanet.jato.RequestManager;
37 import com.iplanet.jato.model.DefaultModel;
38 import com.iplanet.jato.view.View;
39 import com.iplanet.jato.view.ViewBean;
40 import com.iplanet.jato.model.ModelControlException;
41 import com.iplanet.jato.view.ContainerViewBase;
42 import com.iplanet.jato.view.ViewBase;
43
44 import com.sun.enterprise.tools.guiframework.view.DescriptorContainerView;
45 import com.sun.enterprise.tools.guiframework.view.HandlerContext;
46 import com.sun.enterprise.tools.guiframework.exception.FrameworkException;
47 import com.sun.enterprise.tools.guiframework.view.descriptors.ViewDescriptor;
48
49
50 public class adminObjectHandlers {
51     
52     /* called from step2, to get values from step1 */
53     public void getValuesFromStep1(RequestContext ctx, HandlerContext handlerCtx) throws ModelControlException {
54         View view = handlerCtx.getView();
55     DescriptorContainerView descView = (DescriptorContainerView)(((ViewBase)view));
56     ViewDescriptor vd = descView.getViewDescriptor();
57     HttpSession JavaDoc session = RequestManager.getSession();
58         DefaultModel step1Model = (DefaultModel)(session.getValue("adminObjectStep1.model"));
59         descView.setDisplayFieldValue("JndiName", step1Model.getValue("JndiName"));
60         descView.setDisplayFieldValue("ResourceType", step1Model.getValue("ResourceType"));
61         descView.setDisplayFieldValue("ResourceAdapter", step1Model.getValue("ResourceAdapter"));
62     }
63     
64 }
65
Popular Tags