Skip to content
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

HTML data attributes don't work on the table tag #692

Open
ikannak opened this issue May 7, 2024 · 1 comment
Open

HTML data attributes don't work on the table tag #692

ikannak opened this issue May 7, 2024 · 1 comment
Assignees

Comments

@ikannak
Copy link

ikannak commented May 7, 2024

I'm looking into adding Material Design Bootstrap (mdb) to a project that uses displaytag. I want to add datatable functionality to existing displaytag tables. In order to do that, I need to add data attributes such as data-mdb-datatable-init and others to the rendered table. The problem is that when I try to naively add that attribute to the display:table tag, I get an error message:

org.apache.jasper.JasperException: /jsp/styleguide/styleGuideBootstrap.jsp (line: [926], column: [45]) equal symbol expected
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:299)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:99)

I've also tried adding ="" at the end of that data attribute, but that doesn't work either:

org.apache.jasper.JasperException: /jsp/styleguide/styleGuideBootstrap.jsp (line: [926], column: [6]) Attribute [data-mdb-datatable-init] invalid for tag [table] according to TLD
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:299)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1287)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:900)

Is there any way to add html data attributes to displaytag elements, or will I have to make a choice between displaytag tables and material design datatables?

@hazendaz
Copy link
Owner

@ikannak Can you show the code you are adding that produces the error? Have you tried to find an answer on stack overflow? I'm only in maintain mode with this project and only have one use case I care about. If you need new support item that doesn't exist currently to solve your case, it would require you to create a pull request. I'm not familiar enough this this any longer to add much help for issues thus stack overflow is probably your best option.

@hazendaz hazendaz self-assigned this Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants