Results 1 to 4 of 4

Thread: Custom javaScript in Tagx Components

  1. #1

    Default 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. #2
    Join Date
    Jun 2010
    Posts
    440

    Default

    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

  3. #3

    Default

    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> 

  4. #4
    Join Date
    Jun 2010
    Posts
    440

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •