custom-tag

Passing a value to a custom tag

青春壹個敷衍的年華 提交于 2020-01-15 06:19:27
问题 I have a custom tag that I'm trying to pass a String to. It was giving me a NullPointerException. After making some edits suggested below, I am getting ${note} instead of the processed output I had intended. Can anyone help me with this? Here is the relevant code from the JSP. I'm using Struts 2 in my form, and I've marked the line where I'm calling my custom tag. <s:iterator value="bulletins"> <s:if test="approved == false"> <s:form action="ApproveBulletin" method="post"> <table border="2"

I got the error “HtmlEncoderTag cannot be resolved to a type” on defining a custom tag?

旧时模样 提交于 2020-01-06 05:23:11
问题 I am defining a custom tag "htmlencoder". I have These files: WEB-INF/classes/HtmlEncoderTag.jar ,with a java code like this: import java.io.IOException; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyContent; import javax.servlet.jsp.tagext.BodyTagSupport; public class HtmlEncoderTag extends BodyTagSupport{ //.... } WEB-INF/htmlencoder.tld : <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN

How to add custom HTML Tags to Visual Studio and Avoid Squiggly Lines

旧时模样 提交于 2019-12-19 16:53:54
问题 I'm using Visual Studio 2013 to create raw HTML pages (i.e. index.html). In my HTML I am implementing custom HTML tags. As such, Visual Studio underlines my custom tags with squiggly lines (due to the warning of "Unknown element ..."). In hopes to get rid of the squigglies, I added my custom tags to the list of "Tag Specific Options" via Tools > Options > Text Editor > HTML (Web Forms) > Formatting > Tag Specific Options . However, the squiggly lines persist. Is there a way to inform VS2013

Is there a way with rails form helper to produce a button tag for submit

最后都变了- 提交于 2019-12-17 15:37:33
问题 I am trying to create buttons ala Wufoo (Rediscovering the button element) I would like to write the following code like the following: <%form_tag search_path, :method => :get, :class => 'search' do %> <%=text_field_tag :search, params[:search] -%> <%=button_tag 'search', :name => nil-%> <%end%> To generate the following HTML (instead of the input[type="submit"] tag) <button type="submit" class="positive"> <img src="/images/icons/tick.png" alt=""/> Save </button> Does a method exist already?

IE lose custom tag while sethtml

依然范特西╮ 提交于 2019-12-13 11:32:15
问题 This following Code Running in FF & IE TempNode= CKEDITOR.dom.element.createFromHtml("<span></span>"); TempNode.setHtml("<p>test</p>"); But below mentioned code losing user defined Tags In IE (FF Works Fine) TempNode= CKEDITOR.dom.element.createFromHtml("<span></span>"); TempNode.setHtml("<myTag>test</myTag>"); Also same problem with * appendHtml() * My Exact Requirement is : Element.setHtml(AnotherElement.getHtml()); original value in AnotherElement.getHtml() is: <P><mytag id="test_39878"

Why won't my Facelets loop variable go out of scope?

橙三吉。 提交于 2019-12-13 02:04:21
问题 I know this looks like a lot of text, but I think it's a pretty simple concept I'm missing. I'm writing a web application with Facelets. I've got a custom tag rq:request-list that takes a list of requests as a parameter and outputs a lovely table to display them. So far, so good. rq:request-list starts out like you'd expect: <!-- ... --> <ice:dataTable value="#{list}" var="req"> <ice:column> <f:facet name="header">Date last edited</f:facet> <ice:outputText value="#{req.dateModified}" /> </ice

Why does this PrettyTime custom tag produce 11 lines of blank text before the “pretty” date in the HTML output?

点点圈 提交于 2019-12-11 20:57:00
问题 <%@ tag language="java" pageEncoding="utf-8" isELIgnored="false" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ tag import="com.ocpsoft.pretty.time.PrettyTime, java.util.Date"%> <%@ attribute name="dateParam" required="true" type="java.util.Date" %> <% PrettyTime p = new PrettyTime(); String prettyDate = p.format(dateParam);

C# Selenium QA - how to extract the value of custom attribute

蓝咒 提交于 2019-12-06 16:59:07
问题 I have complex DOM structure with dynamically changing values of the HTML id attributes. Selenium is returning "null" when I attempt to extract the values of the "custom" attributes. I need to extract the value of parentId (namely I need the "qqq-bbb", which is different on every reload) //Selenium(C#): // evaluates to "null" string someStringName = someIWebElement.GetAttribute("parentId"); //HTML tag (example): // in Chrome the parentId is visible and unique <g id="333-aaa" parentId="qqq-bbb

How do i avoid generating html in a java custom tag handler?

此生再无相见时 提交于 2019-12-06 14:40:54
问题 Every example i can find has the tag handler java class generating html and spewing it out with out.print(someHTML); Is there a way to include a jsp and add attributes to the request instead? 回答1: I haven't tried this but it should be possible by obtaining a RequestDispatcher from the Request object: public int doStartTag() throws JspException { try { pageContext.setAttribute("title", "My Title"); pageContext.getRequest().getRequestDispatcher("/WEB-INF/includes/header.jspf").include

C# Selenium QA - how to extract the value of custom attribute

别来无恙 提交于 2019-12-04 21:05:18
I have complex DOM structure with dynamically changing values of the HTML id attributes. Selenium is returning "null" when I attempt to extract the values of the "custom" attributes. I need to extract the value of parentId (namely I need the "qqq-bbb", which is different on every reload) //Selenium(C#): // evaluates to "null" string someStringName = someIWebElement.GetAttribute("parentId"); //HTML tag (example): // in Chrome the parentId is visible and unique <g id="333-aaa" parentId="qqq-bbb"> Solution: (based on recommendation in comment#2). Issuing the following command returns as string