taglib

taglib -> dependency injection pojo/service how?

Is there a nice way to dependency inject using a jsp taglib? either using ejb 3.0, spring, or guice... I have a lot of services/pojos that I would like to use in my taglibs ...

what's the fundamental difference between a jsp taglib vs including a jsp page?

i have several common elements (components), that will generate some html. it seems my options are creating a taglib, or just putting that logic into a jsp page and including the jsp. whats the difference? positives vs negatives? ...

Use AJAX instead of TagLib?

I was thinking about the idea of using Ajax instead of TagLib. The most elegant way would be: Using Java Annotation. The idea is, designers or anybody can make the HTML without any taglib ,just using the "standard" HTML tags with id or name, and call the Javascript. That way any WYSIWYG can be used, developer don't have to care about HT...

Concatenate strings in JSP EL?

I have a List of beans, each of which has a property which itself is a List of email addresses. <c:forEach items="${upcomingSchedule}" var="conf"> <div class='scheduled' title="${conf.subject}" id="scheduled<c:out value="${conf.id}"/>"> ... </div> </c:forEach> This renders one <div> per bean in the List. For the sublist, ...

eclipse support for custom facelets tags

Hi I recently started facelets development, and a couple of days ago made my first useful custom tag. Now I would like to have autocompletion support in eclipse, like I have for standard taglibs like h, c and ui. Is there any easy way (less than 30 min work) to enable tool support for custom tags? I'm using eclipse 3.4 with jboss tool...

Not getting the 'index" value from for loop to the if loop in the JSP

Hello. My if statement is always evaluating to false and not entering the <span> block. Because of which, I'm not able to get the value of "index" in the if condition, I've tried every thing appending index with # and %. Can anybody suggest the solution? <c:forEach var="index" begin="1" end="<%=a%>" step="1"> <s:if test="index == 1"...

Error using JSTL XML taglib - attribute xml does not accept any expressions

I'm getting the following error when I try to use the JSTL XML taglib: /server-side-transform.jsp(51,0) According to TLD or attribute directive in tag file, attribute xml does not accept any expressions I'm looking into the tlds etc, but if anyone knows what this is an can save me some time, it'd be appreciated! If it helps, I get t...

Extracting Album art from MP3 files using TagLib - Is there a better way write this code?

I'm using Visual Basic 9 (VS2008) and TagLib. The following code extracts the album art from an MP3 file and displays it in a PictureBox. Is there a better way to write this code? Dim file As TagLib.File = TagLib.File.Create(filepath) If file.Tag.Pictures.Length >= 1 Then Dim bin As Byte() = DirectCast(file.Tag.Pictures(0).Data...

Reading the g:datePicker-value in Grails without using the "new Object(params)"-method

Let's say I have a datePicker called "foobar": <g:datePicker name="foobar" value="${new Date()}" precision="day" /> How do I read the submitted value of this date-picker? One way which works but has some unwanted side-effects is the following: def newObject = new SomeClassName(params) println "value=" + newObject.foobar This way o...

How to add existing JSF components to my own custom components?

Hello! I have a tag class which extends UIComponent and UIOutput. In this class I have encodeBegin and encodeEnd which I can use my contextWriter to output any kinda html tag I want too by using writer.startElement("div", myComponent) and so on. My problem now is that I need to insert for example a instead of using the writer.startEl...

JSP: EL expression is not evaluated

I have a JSP page running on Tomcat 5.5. I have the following code: <c:forEach var="i" begin="1" end="10" step="1"> <c:out value="${i}" /> <br /> </c:forEach> The output I am getting is: ${i} ${i} ${i} ${i} ${i} ${i} ${i} ${i} ${i} ${i} I cant work out why the forEach loop is working but the output is not working. Any...

GWT/Eclipse/Jetty issue: Jasper can't resolve tag libraries

I'm trying to get GWT Hosted mode working in Eclipse, à la this HOWTO. Servlets work fine, as does my GWT code, but all my JSPs fail because with errors such as the following: [WARN] /view/lniExecutiveSummary.htm org.apache.jasper.JasperException: /WEB-INF/jsp/lni/lniExecutiveSummary.jsp(1,1) The absolute uri: http://java.sun.com/jsp/...

Converting A JSP Tag To A JSF Component

Hi all, I've got an JSP tag that I would like to use in my JSF/Seam application. Could someone please give me some guidance in getting my environment to accept the tag. Can I just point a faclets *.taglib.xml file at my old tag or do I need to write a component extending the previous tag perhaps? Cheers for any info, Lee ...

How does EL search for an attribute?

How does EL search for an attribute in JSP? and how to disable it? does any one know the performance of EL? ...

pack:tag does not work in websphere

I find the pack:tag very cool. It minifies javascripts, CSS and other stuff thereby reducing the network payload. It works quite fine on Tomcat. But when I run it on Websphere AS 6.1, it does not work. There are no errors reported in the logs, but it simply does not work. Anyone pointers/tips would be great. ...

Testing grails taglib

Grails 1.1. My custom tag: class MyTagLib { static namespace 'ct' def textField = {attrs -> def bean = attrs.remove('bean') def field = attrs.remove('field') attrs.name = field out << render(template:"/templates/textField", model:[ required: !bean.constraints[field].nullable, display : bean["${bean.tr...

How can I post parameters for JSTL import tag (<c:import>)?

I'm currently using JSTL tag in a JSP page to import the content of an external page: <c:import url="http://some.url.com/"&gt; <c:param name="Param1" value="<%= param1 %>" /> ... <c:param name="LongParam1" value="<%= longParam1 %>" /> </c:import> Unfortunately the parameters are now getting longer. Since they are encoded as ...

Is ajax4jsf dead? What other AJAX libraries for JSF are there?

I am currently using the JBoss RichFaces JSF component library for the project I am working on. It works quite well in general, especially the AJAX support provided by ajax4jsf (A4J), but I find the usually very inflexible table-markup used for almost every component and all this "skin" stuff of richfaces quite annoying. It would be nice...

Grails link taglib use outside of GSP

I'm trying to use the taglib call there's attribute parameters, but also the stuff inside the tag itself which the link taglib uses. I can't find the attribute to pass in to a g.link() call to have it render the text of the link. I've tried 'body' and 'link' and 'text' and 'linkText' already - none of those work. I'm expecting to be ...

Jsp doesn't see included taglibs. Seems to be a local webshpere 6 configuration issue?

Ill try to be as descriptive as possible. situation: struts tag's not being resolved on a jsp. When you look at what should resolve as links you see: <html:link page="/dto/initDTO.do"><b><i>Design To Order Control System ( DTOCS )</i></b></html:link> Which leads me to believe that the struts tag is not being resolved. The source o...