myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Imhof <Matze.Im...@web.de>
Subject Re: [Tomahawk] ModalDialog: close with dialogok-event
Date Fri, 25 May 2007 10:52:42 GMT
hi again,

now I'm using Firefox and the call with <s:submitOnEvent> works fine.

I'm trying to use some inputfields in the modaldialog but the input seems not to be set in
my backing bean.


my code:
...
<h:outputLink id="openNewResourceDialog"
	onclick="newResourceDialog.show();" value="#">
	<t:graphicImage value="../images/resource_new.gif" border="0" />
	<h:outputText value="Ressource hinzuf├╝gen" />
</h:outputLink> 
<h:commandButton id="newResourceAction" style="visibility: hidden;"
		value="#" action="#{resourceManageController.newResourceAction}" />
<s:modalDialog dialogId="newResourceDialog"
	dialogVar="newResourceDialog"
	dialogAttr="bgColor='black' bgOpacity='0.5'"
	styleClass="dojoDialog" dialogTitle="Ressource hinzuf├╝gen"
		closeButton="true" viewId="pages/rm_newResourceDialog.jsf">
	<s:submitOnEvent event="dialogok" for="newResourceAction" />
</s:modalDialog><br />
...



rm_newResourceDialog.jsf
...
<f:view>
	<h:panelGrid columns="1">
		<h:panelGrid columns="2">
			<h:outputText value="Name: " />
			<s:inputSuggestAjax
				value="#{resourceManageController.newResourceTypeName}"
				suggestedItemsMethod="#{resourceManageController.getResourceTypes}"
				autoComplete="true" maxSuggestedItems="10" />
		</h:panelGrid>
		<h:panelGrid columns="2">
			<t:commandButton id="ok" forceId="true" value="Ok"
				onclick="window.parent._myfaces_currentModal._myfaces_ok=true; window.parent._myfaces_currentModal.hide();"
/>
			<t:commandButton id="cancel" forceId="true" value="Abbrechen"
				onclick="window.parent._myfaces_currentModal.hide();" />
		</h:panelGrid>
	</h:panelGrid>
</f:view>
...


Backing Bean:
...
    private String newResourceTypeName;

    public String getNewResourceTypeName() {
        return this.newResourceTypeName;
    }

    public void setNewResourceTypeName(String newResourceTypeName) {
        this.newResourceTypeName = newResourceTypeName;
    }

    public String createResource() {
        // do something with newResourceTypeName
        // but it is null
    }



what is wrong .. ? 

greetings
matze

_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192


Mime
View raw message