-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image rendering problem #2
Comments
The only criticism I'll make here initially is that any thing that renders an HTML fragment should never use hard-coded "id" since you are effectively dictating what page layout should be from the layer below the programmer creating the page. I might also ask, where do "src" and "url" come from? I see nothing to suggest what they might be. |
"src" and "url" come from QrcodeTagLib.groovy by default: def url = { attrs -> when I print "src" and "url", they are OK, but only this is actualy rendered (without image): when I try to render image directly in the QrcodeTagLib.groovy, like this .... , everything works fine and output is: < call> So I think maybe the implementation of the "img()" method has changed or as I wrote, there is maybe the incompatibility problem in the resource plugin. It uses "r.img()" method. Changing from : "ids" to "classes" attributes did not solve the problem. |
Please verify this has been fixed. |
The problem remains... It does not generate image. When I replace def mkp = new groovy.xml.MarkupBuilder(out) mkp { img(alt: text, src: src) } by out << "< img src="${src.encodeAsHTML()}"/>" in QrcodeTagLib.groovy everything works fine. I dont know why but maybe some problem with generating images in groovy.xml.MarkupBuilder |
Note: I am using Grails 2.0.1 |
For some reason, images are not rendered in html... DIV with id, A with class and href and SPAN are rendered but image does not in all closures in the QrcodeTagLib class -> grails version 2.0.1 (possible incompatibility to resource 1.1.6 plugin)
def mkp = new MarkupBuilder(out)
mkp {
div('id':'qrcodebox') {
a('class':'qrcodeLink',href:"javascript:null",label) {
span('id':'qrcode') {
img(alt:url,src:src)
}
}
}
}
The text was updated successfully, but these errors were encountered: