Call JSTL Variable to javascript function

L. Quastana

i have this jstl variable in my JSP :

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    
<jsp:useBean id="RECHERCHE_SCENARIO_BEAN"
        class="recherche.RechercheScenarioBean"
        scope="session" />

    <c:set scope="page" var="totoBean"
        value="${ RECHERCHE_SCENARIO_BEAN.totoBean }" />

How can i call totoBean in an javascript function ?

L. Quastana

Render hidden field via “h:inputHidden” tag, assign new value via JavaScript.

JSF…

<script type="text/javascript">
   function setHiddenValue(new_value){

    document.getElementById('myForm:hidden2').value = new_value;

   }
</script>
<h:form id="myForm">            
   <h:inputHidden id="hidden2" value="#{user.hidden2}" />
   <h:commandButton value="submit" action="..." onclick="setHiddenValue('this is hidden2');" />
</h:form>

And my managed bean

@ManagedBean(name="user")
@SessionScoped
public class UserBean
{
    public String hidden2;

    public void setHidden2(String hidden2) {
        this.hidden2 = hidden2;
    }
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Call javascript function with if JSTL

From Dev

Can I somehow call JSTL function from JavaScript file?

From Dev

Javascript variable function method call

From Java

using javascript variable inside jstl

From Dev

Call function and modify variable at the same time in JavaScript

From Dev

Final Value of a Variable in a JavaScript Recursive Function call

From Dev

javascript object.function call through variable

From Dev

JavaScript setting value to variable properties on a function call

From Dev

JavaScript: Store a function call in a variable / object

From Dev

Is it possible to use variable to call a function as parameter javascript

From Dev

Storing the result of a function call as a variable in JavaScript

From Java

Using JSTL in JSP to call a function with a string parameter

From Dev

Unable to call a parameterized function using JSTL

From Dev

Using a variable to call a specific function in javascript instead of IF function

From Dev

Dynamically call a function/variable using a string inside a function Javascript/React

From Dev

function call inside another function with using javascript Global variable

From Dev

my function variable reset when I call function javascript

From Dev

Change list index of jstl variable using javascript

From Java

Reading a jstl variable in javascript code.

From Dev

AEM: How to pass/check Sightly variable in a javascript function call?

From Dev

Use loop variable to make same-named function call - Javascript

From Dev

JavaScript call function with PHP-Variable as transfer parameter

From Dev

How to call a function using variable in javascript without using window?

From Dev

javascript object - how to call class variable inside class function

From Dev

What do we call the argument (variable or its value) of a function in Javascript?

From Dev

I cannot assign a value to a variable after call a function in javascript

From Dev

Public variable with Call function

From Dev

Call variable in function

From Dev

Variable set to call a function

Related Related

  1. 1

    Call javascript function with if JSTL

  2. 2

    Can I somehow call JSTL function from JavaScript file?

  3. 3

    Javascript variable function method call

  4. 4

    using javascript variable inside jstl

  5. 5

    Call function and modify variable at the same time in JavaScript

  6. 6

    Final Value of a Variable in a JavaScript Recursive Function call

  7. 7

    javascript object.function call through variable

  8. 8

    JavaScript setting value to variable properties on a function call

  9. 9

    JavaScript: Store a function call in a variable / object

  10. 10

    Is it possible to use variable to call a function as parameter javascript

  11. 11

    Storing the result of a function call as a variable in JavaScript

  12. 12

    Using JSTL in JSP to call a function with a string parameter

  13. 13

    Unable to call a parameterized function using JSTL

  14. 14

    Using a variable to call a specific function in javascript instead of IF function

  15. 15

    Dynamically call a function/variable using a string inside a function Javascript/React

  16. 16

    function call inside another function with using javascript Global variable

  17. 17

    my function variable reset when I call function javascript

  18. 18

    Change list index of jstl variable using javascript

  19. 19

    Reading a jstl variable in javascript code.

  20. 20

    AEM: How to pass/check Sightly variable in a javascript function call?

  21. 21

    Use loop variable to make same-named function call - Javascript

  22. 22

    JavaScript call function with PHP-Variable as transfer parameter

  23. 23

    How to call a function using variable in javascript without using window?

  24. 24

    javascript object - how to call class variable inside class function

  25. 25

    What do we call the argument (variable or its value) of a function in Javascript?

  26. 26

    I cannot assign a value to a variable after call a function in javascript

  27. 27

    Public variable with Call function

  28. 28

    Call variable in function

  29. 29

    Variable set to call a function

HotTag

Archive