myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anil" <sadinenia...@cox.net>
Subject Issue with commandLlink and commandButton with popup.
Date Wed, 16 May 2007 00:51:47 GMT
Hi,

I am using Myfaces 1.4, Facelets and Spring Webflow in my project. I have a
problem working with 'commandLink' and 'commandButton'.

In my Page, I have a 'link'(commandLink) and a 'button'(commandButton).

Desired behavior is that when I click on link, it should popup a window and
submit the form and keep target to opened popup. It is working fine.

The following is the code:

Facelet
-------
<input type="submit" jsfc="h:commandLink" tabIndex="1"
action="popupPageAction" target="testWindow" value="Link to My View"
onclick="openWindow();" immediate="true"/>

javascript
-----------
<script language="javascript">
	function openWindow() {
		var url = "";
		window.open(url,'testWindow',"height=650,width=700,top=50,left=200,toolbar
=0,location=0,status=0,menuBar=0,scrollBars=1,resizable=yes");
	}
</script>


for button, when I click on it, it should actually submits my form for
processing and shows the next page in the flow. It is also working fine. The
following is the code

Facelet
-------
<input type="submit" jsfc="h:commandButton" id="continueBtn" action="submit"
value="#{bundle.continue_label}"  tabIndex="2" onclick="onSubmit();return
true;"/>


Issue:

Issue is when my page is rendered, if I click on button it is working as I
expected. But If I click on the link (which would open a popup) and after
that I click on this button, surprisingly it is opening the popup(instead of
processing the form and showing the next page).

Any ideas on why this is happening. I am not really sure whether this is
generic javascript issue or myfaces related issue. Please advice.

Thanks in advance.

Thanks,
Anil.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@facelets.dev.java.net
For additional commands, e-mail: users-help@facelets.dev.java.net


Mime
View raw message