Acquire full prefix for a component clientId inside naming containers with JSF 2.0

前端 未结 2 442
时光说笑
时光说笑 2020-12-09 18:08

I am updating a component via AJAX in JSF:


    Click me
        
             


        
2条回答
  •  心在旅途
    2020-12-09 18:19

    @Tuukka Mustonen, thank you for your answer.

    And if we need access some another id from the same "place" we could use:

    
    
        
        
        
        
    
    

    JavaScript function:

    function myJSFunction(message) {
        window.alert(message)
    }
    

    Output on dialog window:

    1) myForm:aaa

    2) null

    3) myForm:ccc

    4) myForm:aaa

    Note: so the 1st and 3th have the same output.

提交回复
热议问题