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.jsp.tag.updateregion;
16:
17: import java.io.Writer;
18: import org.araneaframework.jsp.util.JspUtil;
19:
20: /**
21: * Defines the update region in the HTML page that can be updated via AJAX requests.
22: * Should be used when updating content inside HTML <code>table</code> rows, due to
23: * browser peculiarities these cases are handled differently.
24: *
25: * @author Jevgeni Kabanov (ekabanov <i>at</i> araneaframework <i>dot</i> org)
26: *
27: * @jsp.tag
28: * name = "updateRegionRows"
29: * body-content = "JSP"
30: * description = "See 'updateRegion' tag. Use this tag if you need to update several table rows (there is no way to update table cells only)."
31: */
32: public class UpdateRegionRowsHtmlTag extends BaseUpdateRegionTag {
33:
34: protected int doStartTag(Writer out) throws Exception {
35: super .doStartTag(out);
36:
37: JspUtil.writeOpenStartTag(out, "tbody");
38: JspUtil.writeAttribute(out, "id", fullId);
39: JspUtil.writeCloseStartTag(out);
40:
41: out.write("<!--BEGIN:" + fullId + "-->");
42:
43: return EVAL_BODY_INCLUDE;
44: }
45:
46: protected int doEndTag(Writer out) throws Exception {
47: out.write("<!--END:" + fullId + "-->");
48:
49: JspUtil.writeEndTag(out, "tbody");
50:
51: return super.doEndTag(out);
52: }
53: }
|