Announcement Announcement Module
Collapse
No announcement yet.
Custom javaScript in Tagx Components Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom javaScript in Tagx Components

    Hello !

    I want to include some Javascript in a selfwritten Tagx component.

    But during compilation the Tiles/JSp Parser seems to mess around with the javascirpt ....


    PHP Code:
    <script language="javascript">

        function 
    formatEditLink(val) {
            
    val "<a href='products/"+val+"'</a>";
            return 
    val;
        }  
        
    </script> 
    As soon as the tiles/JSP Parser detectes a a href in my javascirpt strings something like "java.lang.RuntimeException: org.apache.jasper.JasperException: /WEB-INF/tags/components/productFinder.tagx(55,24) Element type "a" must be f
    ollowed by either attribute specifications, ">" or "/>"." gets thrown ...

    can anyone help me there ?

  • #2
    Hi,

    Review my article at http://viralpatel.net/blogs/2011/02/...-ui-forms.html . It shows a way of doing it.


    I hope it helps you

    B. Roogards
    jD

    Comment


    • #3
      Does it work if you do this?

      PHP Code:
      <script language="javascript">
      <![
      CDATA[

          function 
      formatEditLink(val) {
              
      val "<a href='products/"+val+"'</a>";
              return 
      val;
          }  
      ]]>    
      </script> 

      Comment


      • #4
        I am not sure to whom you are addressing the question at all...

        If it is to me: jD; this is my answer: If I were you I'd better check the article. I wrote such code months ago since 1.1.0.M1. I can't remember all the details at this time.

        BTW: Since this one of the most popular questions; I am including it in my Spring Roo book currently in the works. More on this later.


        B. Roogards
        jD

        Comment

        Working...
        X