01: /**
02: * Copyright 2006 Webmedia Group Ltd.
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: **/package org.araneaframework.example.common.tags.wizard;
16:
17: import java.io.Writer;
18: import org.araneaframework.OutputData;
19: import org.araneaframework.core.ApplicationWidget;
20: import org.araneaframework.jsp.tag.BaseTag;
21:
22: /**
23: * This tag includes wizard's current page.
24: * It must be nested into WizardTag.
25: *
26: * @author Rein Raudjärv <reinra@ut.ee>
27: *
28: * @jsp.tag
29: * name = "wizardBody"
30: * body-content = "JSP"
31: * description = "Includes the current wizard page."
32: */
33: public class WizardBodyTag extends BaseTag {
34: protected int doStartTag(Writer out) throws Exception {
35: ApplicationWidget widget = getContextWidget();
36:
37: OutputData output = getOutputData();
38:
39: try {
40: hideGlobalContextEntries(pageContext);
41: out.flush();
42: widget._getWidget().render(output);
43: } finally {
44: restoreGlobalContextEntries(pageContext);
45: }
46:
47: return SKIP_BODY;
48: }
49: }
|