Skip to content

kawanet/nsp-seasar2-taglib

Repository files navigation

nsp-seasar2-taglib

Node.js CI npm version

NSP taglib for Seasar2 SAStruts Tag Functions

SYNOPSIS

import {createNSP} from "nsp-server-pages";
import {fFunctions} from "nsp-seasar2-taglib";

const nsp = createNSP();

nsp.addTagLib({ns: "f", fn: fFunctions});

const render = await nsp.loadJSP("path/to/template.jsp");

const context = {};

const html = await render(context);

console.log(html);

COMMONJS

  • Both ES Modules and CommonJS supported.
const {createNSP} = require("nsp-server-pages");
const {fFunctions, sTags} = require("nsp-seasar2-taglib");

COMPATIBILITY

SA-Struts' ${f:xxx()} functions are implemented. <s:form/>, <s:link/> and <s:submit/> tags are not implemented yet. Contributions for missing features are welcome here!

Function Status Note
${f:h(input)} 👍 OK
${f:u(input)} 👍 OK
${f:date(input, pattern)} 🕑 Not yet yyyyMMdd is only supported
${f:number(input, pattern)} 👍 OK
${f:br(input)} 👍 OK
${f:nbsp(input)} 👍 OK
${f:url(input)} 🕑 Not yet
${f:label(value, dataList, valueName, labelName)} 👍 OK
\

LINKS

LICENSE

// SPDX-License-Identifier: Apache-2.0

About

NSP taglib for Seasar2 SAStruts Tag Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published