0

here is my problem. I have this xhtml page:

<html>
<body>
<script>

function myFunction() {
var link='#{myController.goMyDetails}' + MyId
var MyId = '#{myController.myDetails.getId()}';
self.location=link;

}
</script>


<input type="button" id="LinkBtn" onclick="myFunction()" value="Go Details" />


</body>
</html>

What I need it to do is open itself again but with the called Controller.goMyDetails and the Id in MyId as parameter for the controller.

So I click the button and I get the Controller.goMyDetails called with MyId as parameter.

Is there anyway to do this with javascript. No Primefaces or other stuff.

Thank you for your help, this is driving me mad.

9
  • Who told you OmniFaces is not allowed to be used? The Project 'architect'? Commented May 18, 2017 at 13:10
  • I didn't make the rule... I just have to keep to it. Commented May 18, 2017 at 13:12
  • No it is not since <h:commandButton> is NOT Javascript only form, input or other html tags are allowed. I have seen that at it is not a possible solution here Commented May 18, 2017 at 13:21
  • 1
    So using an <h:commandButton> is not allowed either? Why are you using JSF then? Commented May 18, 2017 at 13:23
  • 1
    So, why not create a servlet in that case? Commented May 18, 2017 at 13:45

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.