Keyevents-DataBinding

Hi,
<TextBox Height="23" HorizontalAlignment="Left" Margin="120,122,0,0" Name="PostCode" VerticalAlignment="Top" Width="120" Text="{Binding Path=PostCode}" Keyboard.GotKeyboardFocus="{Binding
Path=ChangeStatus}"/>
      I have a textbox and i want to bind textbox's GotKeyboardFocus to a function(Command/Function) in a viewmodel?Can you let me know how can i do this? As when i try to bind it to a command i got the follwoing error
Error    1    GotKeyboardFocus="{Binding Path=ChangeStatus}" is not valid. '{Binding Path=ChangeStatus}' is not a valid event handler method name. Only instance methods on the generated or code-behind class are valid.
Line 32 Position 161.    C:\senthil-code\Prismtwopage\ModuleTwo\three.xaml    32    161    ModuleTwo
Thanks,
Senthil

Hi Senthil,
In MVVM pattern, if want to add event handler for GotKeyboardFocus
event, we can use Expression Blend interaction triggers and the System.Windows.Interactivity.InvokeCommandAction
class.
Firstly, we need to add a reference to System.Windows.Interactivity.dll
Then, we can create a class called RelayCommand which implements ICommand interface. This class acts as Enhancement for the ICommad and extracts the boilerplate code to separate class:
public class RelayCommand : ICommand
private Action<object> execute;
private Predicate<object> canExecute;
private event EventHandler CanExecuteChangedInternal;
public RelayCommand(Action<object> execute)
: this(execute, DefaultCanExecute)
public RelayCommand(Action<object> execute, Predicate<object> canExecute)
if (execute == null)
throw new ArgumentNullException("execute");
if (canExecute == null)
throw new ArgumentNullException("canExecute");
this.execute = execute;
this.canExecute = canExecute;
public event EventHandler CanExecuteChanged
add
CommandManager.RequerySuggested += value;
this.CanExecuteChangedInternal += value;
remove
CommandManager.RequerySuggested -= value;
this.CanExecuteChangedInternal -= value;
public bool CanExecute(object parameter)
return this.canExecute != null && this.canExecute(parameter);
public void Execute(object parameter)
this.execute(parameter);
public void OnCanExecuteChanged()
EventHandler handler = this.CanExecuteChangedInternal;
if (handler != null)
//DispatcherHelper.BeginInvokeOnUIThread(() => handler.Invoke(this, EventArgs.Empty));
handler.Invoke(this, EventArgs.Empty);
public void Destroy()
this.canExecute = _ => false;
this.execute = _ => { return; };
private static bool DefaultCanExecute(object parameter)
return true;
ViewModel:
public class MainWindowViewModel
private ICommand gotFocusExecuteCommand { get; set; }
private bool canExecute = true;
public bool CanExecute
get
return this.canExecute;
set
if (this.canExecute == value)
return;
this.canExecute = value;
public ICommand GotFocusExecuteCommand
get
return gotFocusExecuteCommand;
set
gotFocusExecuteCommand = value;
public MainWindowViewModel()
gotFocusExecuteCommand = new RelayCommand(TextBox_GotKeyboardFocus, param => this.canExecute);
private void TextBox_GotKeyboardFocus(object obj)
MessageBox.Show("Here");
public void ChangeCanExecute(object obj)
canExecute = !canExecute;
XAML:
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:local="clr-namespace:WpfTextBoxMVVM.ViewModel"
Title="MainWindow" Height="150" Width="525">
<Window.DataContext>
<local:MainWindowViewModel />
</Window.DataContext>
<StackPanel>
<TextBox Text="textBox1" Height="23" Width="120"/>
<TextBox Height="23" Name="textBox2" VerticalAlignment="Top" Width="120" Text="TextBox2" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="GotKeyboardFocus" >
<i:InvokeCommandAction Command="{Binding GotFocusExecuteCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBox>
</StackPanel>
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Databind method call returns null in WebCenter Content Filter

    Hi,
    I have inherited some code that has an issue and I'm new to WebCenter Content and the Filters that can be added. We have a FileNameFilter class that starts off with the code
    public class CWEFileNameFilter implements FilterImplementor {
        public CWEFileNameFilter() {
            super();
        public int doFilter(Workspace workspace, DataBinder dataBinder,
                            ExecutionContext executionContext) throws DataException {
            String service = dataBinder.getLocal("IdcService");
    However, service sometimes comes back null and then the filter throws a NPE.
    My questions are:
    1) Can anyone explain what dataBinder.getLocal("IdcService"); is doing and why it could come back as null
    2) Can anyone provide any links to documentation that explains Filters and a bit more about the DataBinder object as the JavaDoc isn't much help.
    Thanks
    Marc

    Hi Marc,
    Below code will give service name for which filter is implemented  from LocalData
    String service = dataBinder.getLocal("IdcService");
    for example below
    http://localhost:16200/cs/idcplg?IdcService=DOC_INFO_BY_NAME&dDocName=1111111&IsJava
    This will print entire response data including localdata and results which are created as part of service execution. Below is snippet
    <?hda version="11.1.1.8.0PSU-2015-04-01 00:14:53Z-r126309" jcharset="UTF8" encoding="utf-8"?>
    @Properties LocalData
    DocUrl=https://localhost:16200/cs/weblayout/groups/secure/documents/test/mhdk/mjg1/1111111.pdf
    IdcService=DOC_INFO_BY_NAME
    so String service = dataBinder.getLocal("IdcService"); will be service ="DOC_INFO_BY_NAME".
    Below blog will give some idea about filter but best place to learn or start is "The Definitive Guide to Stellent Content Server Development" by Brian Huff
    http://www.redstonecontentsolutions.com/technical-blog/ucm-service-handlers-and-javafilters
    Also i would recommend reading "WebCenter Content Services Reference Guide"
    http://docs.oracle.com/cd/E23943_01/doc.1111/e11011/toc.htm
    Regards,
    Amol Gavali.

  • KeyEvents with the TAB Key

    Hey All,
    I have a small progam with a small problem. My program is an applet with numerous textfields and I have implemented the KeyEvents event listener. What I want to have happened when I press the "Tab Key" is the cursor move from one tab to another, but when it goes to the next tab it clears out the text that is currently in the textfield. Take a look at my code segment that is giving me the problem.
    public void keyPressed(KeyEvent e)
    if(NameField == e.getSource())
              if(e.getKeyCode() == KeyEvent.VK_TAB)
                   SalaryField.setText(" ");
    I know that is works if I replace "VK_TAB" with something else like "VK_A". "NameField" and "SalaryField" are the names of mt textfields. I am currently using Java SDK 1.3.1 to program in java program, but my browser uses JVM/Runtime Enviornment 1.4.1. When I run it with my broswer nothing happens when I press tab and some for the program that I am using to progam in. I did a search in the forum and came up with I have above, but still cannot it to work. When I read APIs on 1.4.1 and 1.3.1 that both said that
    "Aside from those keys that are defined by the Java language (VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_ constants. Sun reserves the right to change these values as needed to accomodate a wider range of keyboards in the future."
    What is going on? How can I solve this problem?
    Thanks,
    Iceman
    PS:
    My Interface is swing

    Hey All,
    Thanks for the help I got to work when I ran it with my programming program, but when I run it in a browser using the current JVM the tab key does not work. What is wrong now? Or how am I to use FocusListener now, I tried to use the getOppositeComponent(, my complier says that it is not a method of FocusListener. Even though java says in the docmentation that it is. Can I get some more help here. The questions again is How can I tab in a applet?
    Later,
    Iceman

  • Error Null Databinding context encountered -WSDL to Java webservice convert

    HI,
    I have been trying to generate service and client from WSDL using Jdeveloper11 and im unable to progress on this particular WSDL, i was succesfull in creating the client and service for a sample Apache WSDL using the Jdeveloper. If anyone can point out the issue in this WSDL or is there a bug in Jdeveloper when handling complex type? i attach the WSDL that i used, now note that the WSDL calls for another WSDL import witin it, if i comment out the import and its bindings im able to proceed,
    WSDL-1
    <!-- Tigerstripe : Operations relating to Alarm -->
    <wsdl:operation name="getAlarmsByKeys">
    <wsdl:input name="getAlarmsByKeysRequest" message="fmWS-v1-0:getAlarmsByKeysRequest" />
    <wsdl:output name="getAlarmsByKeysResponse" message="fmWS-v1-0:getAlarmsByKeysResponse" />
    <wsdl:fault name="getAlarmsByKeysException" message="fmWS-v1-0:getAlarmsByKeysException" />
    </wsdl:operation>
    <wsdl:operation name="getAlarmsByTemplate">
    <wsdl:input name="getAlarmsByTemplateRequest" message="fmWS-v1-0:getAlarmsByTemplateRequest" />
    <wsdl:output name="getAlarmsByTemplateResponse" message="fmWS-v1-0:getAlarmsByTemplateResponse" />
    <wsdl:fault name="getAlarmsByTemplateException" message="fmWS-v1-0:getAlarmsByTemplateException" />
    </wsdl:operation>
    <wsdl:operation name="queryAlarms">
    <wsdl:input name="queryAlarmsRequest" message="fmWS-v1-0:queryAlarmsRequest" />
    <wsdl:output name="queryAlarmsResponse" message="fmWS-v1-0:queryAlarmsResponse" />
    <wsdl:fault name="queryAlarmsException" message="fmWS-v1-0:queryAlarmsException" />
    </wsdl:operation>
    <!-- Tigerstripe : Operations for Interface artifact methods ( JVTAlarmCreationSession ) -->
    <wsdl:operation name="getAlarmSpecificInfoTypes">
    <wsdl:input
    name="getAlarmSpecificInfoTypesRequest"
    message="fmWS-v1-0:getAlarmSpecificInfoTypesRequest" />
    <wsdl:output
    name="getAlarmSpecificInfoTypesResponse"
    message="fmWS-v1-0:getAlarmSpecificInfoTypesResponse" />
    <wsdl:fault
    name="getAlarmSpecificInfoTypesException"
    message="fmWS-v1-0:getAlarmSpecificInfoTypesException" />
    </wsdl:operation>
    <wsdl:operation name="getVersion">
    <wsdl:input
    name="getVersionRequest"
    message="fmWS-v1-0:getVersionRequest" />
    <wsdl:output
    name="getVersionResponse"
    message="fmWS-v1-0:getVersionResponse" />
    <wsdl:fault
    name="getVersionException"
    message="fmWS-v1-0:getVersionException" />
    </wsdl:operation>
    <wsdl:operation name="createAlarms">
    <wsdl:input
    name="createAlarmsRequest"
    message="fmWS-v1-0:createAlarmsRequest" />
    <wsdl:output
    name="createAlarmsResponse"
    message="fmWS-v1-0:createAlarmsResponse" />
    <wsdl:fault
    name="createAlarmsException"
    message="fmWS-v1-0:createAlarmsException" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="JVTAlarmCreationSessionSoapBinding"
    type="fmWS-v1-0:JVTAlarmCreationSessionWSPort">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http" />
    <!-- Tigerstripe : Bindings relating to Alarm -->
    <wsdl:operation name="getAlarmsByKeys">
    <soap:operation soapAction="getAlarmsByKeys" style="document" />
    <wsdl:input>
    <soap:body parts="parameters" use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body parts="parameters" use="literal" />
    </wsdl:output>
    <wsdl:fault name="getAlarmsByKeysException">
    <soap:fault name="getAlarmsByKeysException" use="literal" />
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getAlarmsByTemplate">
    <soap:operation soapAction="getAlarmsByTemplate" style="document" />
    <wsdl:input>
    <soap:body parts="parameters" use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body parts="parameters" use="literal" />
    </wsdl:output>
    <wsdl:fault name="getAlarmsByTemplateException">
    <soap:fault name="getAlarmsByTemplateException" use="literal" />
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="queryAlarms">
    <soap:operation soapAction="queryAlarms" style="document" />
    <wsdl:input>
    <soap:body parts="parameters" use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body parts="parameters" use="literal" />
    </wsdl:output>
    <wsdl:fault name="queryAlarmsException">
    <soap:fault name="queryAlarmsException" use="literal" />
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getAlarmSpecificInfoTypes">
    <soap:operation soapAction="getAlarmSpecificInfoTypes" style="document" />
    <wsdl:input>
    <soap:body parts="parameters" use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body parts="parameters" use="literal" />
    </wsdl:output>
    <wsdl:fault name ="getAlarmSpecificInfoTypesException">
    <soap:fault name ="getAlarmSpecificInfoTypesException" use="literal"/>
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="getVersion">
    <soap:operation soapAction="getVersion" style="document" />
    <wsdl:input>
    <soap:body parts="parameters" use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body parts="parameters" use="literal" />
    </wsdl:output>
    <wsdl:fault name ="getVersionException">
    <soap:fault name ="getVersionException" use="literal"/>
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="createAlarms">
    <soap:operation soapAction="createAlarms" style="document" />
    <wsdl:input>
    <soap:body parts="parameters" use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body parts="parameters" use="literal" />
    </wsdl:output>
    <wsdl:fault name ="createAlarmsException">
    <soap:fault name ="createAlarmsException" use="literal"/>
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>
    <!-- Binding for the Notification Producer -->
    <!-- <wsdl:binding name="NotificationProducerSoapBinding" type="wsnt:NotificationProducer">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http" />-->
    <!-- =========== NotificationProducer Specific ============== -->
    <!-- <wsdl:operation name="Subscribe">
    <soap:operation soapAction="Subscribe" style="document"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    <wsdl:fault name="ResourceUnknownFault">
    <soap:fault name="ResourceUnknownFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="SubscribeCreationFailedFault">
    <soap:fault name="SubscribeCreationFailedFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="TopicExpressionDialectUnknownFault">
    <soap:fault name="TopicExpressionDialectUnknownFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="InvalidFilterFault">
    <soap:fault name="InvalidFilterFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="InvalidTopicExpressionFault">
    <soap:fault name="InvalidTopicExpressionFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="TopicNotSupportedFault">
    <soap:fault name="TopicNotSupportedFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="InvalidProducerPropertiesExpressionFault">
    <soap:fault name="InvalidProducerPropertiesExpressionFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="InvalidMessageContentExpressionFault">
    <soap:fault name="InvalidMessageContentExpressionFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="UnacceptableInitialTerminationTimeFault">
    <soap:fault name="UnacceptableInitialTerminationTimeFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="UnrecognizedPolicyRequestFault">
    <soap:fault name="UnrecognizedPolicyRequestFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="UnsupportedPolicyRequestFault">
    <soap:fault name="UnsupportedPolicyRequestFault" use="literal"/>
    </wsdl:fault>
    <wsdl:fault name="NotifyMessageNotSupportedFault">
    <soap:fault name="NotifyMessageNotSupportedFault" use="literal"/>
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="GetCurrentMessage">
    <soap:operation soapAction="GetCurrentMessage" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    <wsdl:fault name="ResourceUnknownFault">
    <soap:fault name="ResourceUnknownFault" use="literal" />
    </wsdl:fault>
    <wsdl:fault name="TopicExpressionDialectUnknownFault">
    <soap:fault name="TopicExpressionDialectUnknownFault" use="literal" />
    </wsdl:fault>
    <wsdl:fault name="InvalidTopicExpressionFault">
    <soap:fault name="InvalidTopicExpressionFault" use="literal" />
    </wsdl:fault>
    <wsdl:fault name="TopicNotSupportedFault">
    <soap:fault name="TopicNotSupportedFault" use="literal" />
    </wsdl:fault>
    <wsdl:fault name="NoCurrentMessageOnTopicFault">
    <soap:fault name="NoCurrentMessageOnTopicFault" use="literal" />
    </wsdl:fault>
    <wsdl:fault name="MultipleTopicsSpecifiedFault">
    <soap:fault name="MultipleTopicsSpecifiedFault" use="literal" />
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>-->
    <!-- Binding for the SubscriptionManager -->
    <!-- <wsdl:binding name="SubscriptionManagerSoapBinding" type="wsnt:PausableSubscriptionManager">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http" />-->
    <!-- ========= SubscriptionManager specific operations ====== -->
    <!-- <wsdl:operation name="PauseSubscription">
    <soap:operation soapAction="PauseSubscription" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    <wsdl:fault name="ResourceUnknownFault">
    <soap:fault name="ResourceUnknownFault" use="literal" />
    </wsdl:fault>
    <wsdl:fault name="PauseFailedFault">
    <soap:fault name="PauseFailedFault" use="literal" />
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="Renew">
    <soap:operation soapAction="Renew" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    <wsdl:fault name="ResourceUnknownFault">
    <soap:fault name="ResourceUnknownFault" use="literal" />
    </wsdl:fault>
    <wsdl:fault name="UnacceptableTerminationTimeFault">
    <soap:fault name="UnacceptableTerminationTimeFault" use="literal" />
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="Unsubscribe">
    <soap:operation soapAction="Unsubscribe" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    <wsdl:fault name="ResourceUnknownFault">
    <soap:fault name="ResourceUnknownFault" use="literal" />
    </wsdl:fault>
    <wsdl:fault name="UnableToDestroySubscriptionFault">
    <soap:fault name="UnableToDestrySubscriptionFault" use="literal" />
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="ResumeSubscription">
    <soap:operation soapAction="ResumeSubscription" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    <wsdl:fault name="ResourceUnknownFault">
    <soap:fault name="ResourceUnknownFault" use="literal" />
    </wsdl:fault>
    <wsdl:fault name="ResumeFailedFault">
    <soap:fault name="ResumeFailedFault" use="literal" />
    </wsdl:fault>
    </wsdl:operation>
    </wsdl:binding>-->
    <wsdl:service name="JVTAlarmCreationSessionWebService">
    <wsdl:port name="JVTAlarmCreationSessionWSPort"
    binding="fmWS-v1-0:JVTAlarmCreationSessionSoapBinding">
    <soap:address location="http://localhost/JVTAlarmCreationSessionWebService/JVTAlarmCreationSession" />
    </wsdl:port>
    <!--wsdl:port name="NotificationProducerPort" binding="wsnt:NotificationProducerSoapBinding">
    <soap:address location="http://localhost/JVTAlarmCreationSessionWebService/NotificationProducer"/>
    </wsdl:port>
    <wsdl:port name="SubscriptionManagerPort" binding="wsnt:SubscriptionManagerSoapBinding">
    <soap:address location="http://localhost/JVTAlarmCreationSessionWebService/SubscriptionManager"/>
    </wsdl:port-->
    </wsdl:service>
    </wsdl:definitions>
    WSDL-2 imported in the above WSDL
    <?xml version="1.0" encoding="utf-8"?>
    <!--
    OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
    OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
    Copyright (C) OASIS Open (2004-2006). All Rights Reserved.
    This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.
    The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
    This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
    -->
    <wsdl:definitions name="WS-BaseNotification"
    targetNamespace="http://docs.oasis-open.org/wsn/bw-2"
    xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2"
    xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
    xmlns:wsa="http://www.w3.org/2005/08/addressing"
    xmlns:wsrf-rw="http://docs.oasis-open.org/wsrf/rw-2"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <!-- ========================== Imports =========================== -->
    <wsdl:import
    namespace="http://docs.oasis-open.org/wsrf/rw-2"
    location="rw-2.wsdl"/>
    <!-- ===================== Types Definitions ====================== -->
    <wsdl:types>
    <xsd:schema elementFormDefault="qualified">
    <xsd:import
    namespace="http://docs.oasis-open.org/wsn/b-2"
    schemaLocation="b-2.xsd"/>
    </xsd:schema>
    </wsdl:types>
    <!-- ================ NotificationConsumer::Notify ================
    Notify(
    NotificationMessage
    (SubscriptionReference, TopicExpression, ProducerReference,
    Message)*
    returns: n/a (one way)
    -->
    <wsdl:message name="Notify">
    <wsdl:part name="Notify" element="wsnt:Notify"/>
    </wsdl:message>
    <!-- ============== NotificationProducer::Subscribe ===============
    Subscribe(
    (ConsumerEndpointReference, [Filter], [SubscriptionPolicy],
    [InitialTerminationTime])
    returns: WS-Resource qualified EPR to a Subscription
    -->
    <wsdl:message name="SubscribeRequest" >
    <wsdl:part name="SubscribeRequest"
    element="wsnt:Subscribe"/>
    </wsdl:message>
    <wsdl:message name="SubscribeResponse">
    <wsdl:part name="SubscribeResponse"
    element="wsnt:SubscribeResponse"/>
    </wsdl:message>
    <wsdl:message name="SubscribeCreationFailedFault">
    <wsdl:part name="SubscribeCreationFailedFault"
    element="wsnt:SubscribeCreationFailedFault" />
    </wsdl:message>
    <wsdl:message name="TopicExpressionDialectUnknownFault">
    <wsdl:part name="TopicExpressionDialectUnknownFault"
    element="wsnt:TopicExpressionDialectUnknownFault" />
    </wsdl:message>
    <wsdl:message name="InvalidFilterFault">
    <wsdl:part name="InvalidFilterFault"
    element="wsnt:InvalidFilterFault" />
    </wsdl:message>
    <wsdl:message name="InvalidProducerPropertiesExpressionFault">
    <wsdl:part name="InvalidProducerPropertiesExpressionFault"
    element="wsnt:InvalidProducerPropertiesExpressionFault" />
    </wsdl:message>
    <wsdl:message name="InvalidMessageContentExpressionFault">
    <wsdl:part name="InvalidMessageContentExpressionFault"
    element="wsnt:InvalidMessageContentExpressionFault" />
    </wsdl:message>
    <wsdl:message name="UnrecognizedPolicyRequestFault">
    <wsdl:part name="UnrecognizedPolicyRequestFault"
    element="wsnt:UnrecognizedPolicyRequestFault" />
    </wsdl:message>
    <wsdl:message name="UnsupportedPolicyRequestFault">
    <wsdl:part name="UnsupportedPolicyRequestFault"
    element="wsnt:UnsupportedPolicyRequestFault" />
    </wsdl:message>
    <wsdl:message name="NotifyMessageNotSupportedFault">
    <wsdl:part name="NotifyMessageNotSupportedFault"
    element="wsnt:NotifyMessageNotSupportedFault" />
    </wsdl:message>
    <wsdl:message name="UnacceptableInitialTerminationTimeFault">
    <wsdl:part name="UnacceptableInitialTerminationTimeFault"
    element="wsnt:UnacceptableInitialTerminationTimeFault"/>
    </wsdl:message>
    <!-- ========== NotificationProducer::GetCurrentMessage ===========
    GetCurrentMessage(topicExpression)
    returns: a NotificationMessage (xsd:any)
    -->
    <wsdl:message name="GetCurrentMessageRequest">
    <wsdl:part name="GetCurrentMessageRequest"
    element="wsnt:GetCurrentMessage"/>
    </wsdl:message>
    <wsdl:message name="GetCurrentMessageResponse">
    <wsdl:part name="GetCurrentMessageResponse"
    element="wsnt:GetCurrentMessageResponse"/>
    </wsdl:message>
    <wsdl:message name="InvalidTopicExpressionFault">
    <wsdl:part name="InvalidTopicExpressionFault"
    element="wsnt:InvalidTopicExpressionFault" />
    </wsdl:message>
    <wsdl:message name="TopicNotSupportedFault">
    <wsdl:part name="TopicNotSupportedFault"
    element="wsnt:TopicNotSupportedFault" />
    </wsdl:message>
    <wsdl:message name="MultipleTopicsSpecifiedFault">
    <wsdl:part name="MultipleTopicsSpecifiedFault"
    element="wsnt:MultipleTopicsSpecifiedFault" />
    </wsdl:message>
    <wsdl:message name="NoCurrentMessageOnTopicFault">
    <wsdl:part name="NoCurrentMessageOnTopicFault"
    element="wsnt:NoCurrentMessageOnTopicFault" />
    </wsdl:message>
    <!-- ========== PullPoint::GetMessages ===========
    GetMessages(MaximumNumber)
    returns: NotificationMessage list
    -->
    <wsdl:message name="GetMessagesRequest">
    <wsdl:part name="GetMessagesRequest"
    element="wsnt:GetMessages"/>
    </wsdl:message>
    <wsdl:message name="GetMessagesResponse">
    <wsdl:part name="GetMessagesResponse"
    element="wsnt:GetMessagesResponse"/>
    </wsdl:message>
    <wsdl:message name="UnableToGetMessagesFault">
    <wsdl:part name="UnableToGetMessagesFault"
    element="wsnt:UnableToGetMessagesFault"/>
    </wsdl:message>
    <!-- ========== PullPoint::DestroyPullPoint ===========
    DestroyPullPoint()
    returns: void
    -->
    <wsdl:message name="DestroyPullPointRequest">
    <wsdl:part name="DestroyPullPointRequest"
    element="wsnt:DestroyPullPoint"/>
    </wsdl:message>
    <wsdl:message name="DestroyPullPointResponse">
    <wsdl:part name="DestroyPullPointResponse"
    element="wsnt:DestroyPullPointResponse"/>
    </wsdl:message>
    <wsdl:message name="UnableToDestroyPullPointFault">
    <wsdl:part name="UnableToDestroyPullPointFault"
    element="wsnt:UnableToDestroyPullPointFault"/>
    </wsdl:message>
    <!-- ========== PullPoint::CreatePullPoint ===========
    CreatePullPoint()
    returns: PullPoint (wsa:EndpointReference)
    -->
    <wsdl:message name="CreatePullPointRequest">
    <wsdl:part name="CreatePullPointRequest"
    element="wsnt:CreatePullPoint"/>
    </wsdl:message>
    <wsdl:message name="CreatePullPointResponse">
    <wsdl:part name="CreatePullPointResponse"
    element="wsnt:CreatePullPointResponse"/>
    </wsdl:message>
    <wsdl:message name="UnableToCreatePullPointFault">
    <wsdl:part name="UnableToCreatePullPointFault"
    element="wsnt:UnableToCreatePullPointFault"/>
    </wsdl:message>
    <!-- ================ SubscriptionManager::Renew ==================
    Renew( Duration | AbsoluteTime)
    returns: (New Termination Time [CurrentTime])
    -->
    <wsdl:message name="RenewRequest">
    <wsdl:part name="RenewRequest"
    element="wsnt:Renew"/>
    </wsdl:message>
    <wsdl:message name="RenewResponse">
    <wsdl:part name="RenewResponse"
    element="wsnt:RenewResponse"/>
    </wsdl:message>
    <wsdl:message name="UnacceptableTerminationTimeFault">
    <wsdl:part name="UnacceptableTerminationTimeFault"
    element="wsnt:UnacceptableTerminationTimeFault" />
    </wsdl:message>
    <!-- ============== SubscriptionManager::Unsubscribe ===============
    Unsubscribe()
    returns: empty
    -->
    <wsdl:message name="UnsubscribeRequest">
    <wsdl:part name="UnsubscribeRequest"
    element="wsnt:Unsubscribe"/>
    </wsdl:message>
    <wsdl:message name="UnsubscribeResponse">
    <wsdl:part name="UnsubscribeResponse"
    element="wsnt:UnsubscribeResponse"/>
    </wsdl:message>
    <wsdl:message name="UnableToDestroySubscriptionFault">
    <wsdl:part name="UnableToDestroySubscriptionFault"
    element="wsnt:UnableToDestroySubscriptionFault" />
    </wsdl:message>
    <!-- ========== SubscriptionManager::PauseSubscription ============
    PauseSubscription()
    returns: empty
    -->
    <wsdl:message name="PauseSubscriptionRequest">
    <wsdl:part name="PauseSubscriptionRequest"
    element="wsnt:PauseSubscription"/>
    </wsdl:message>
    <wsdl:message name="PauseSubscriptionResponse">
    <wsdl:part name="PauseSubscriptionResponse"
    element="wsnt:PauseSubscriptionResponse"/>
    </wsdl:message>
    <wsdl:message name="PauseFailedFault">
    <wsdl:part name="PauseFailedFault"
    element="wsnt:PauseFailedFault" />
    </wsdl:message>
    <!-- ========= SubscriptionManager::ResumeSubscription ============
    ResumeSubscription()
    returns: empty
    -->
    <wsdl:message name="ResumeSubscriptionRequest">
    <wsdl:part name="ResumeSubscriptionRequest"
    element="wsnt:ResumeSubscription"/>
    </wsdl:message>
    <wsdl:message name="ResumeSubscriptionResponse">
    <wsdl:part name="ResumeSubscriptionResponse"
    element="wsnt:ResumeSubscriptionResponse"/>
    </wsdl:message>
    <wsdl:message name="ResumeFailedFault">
    <wsdl:part name="ResumeFailedFault"
    element="wsnt:ResumeFailedFault" />
    </wsdl:message>
    <!-- =================== PortType Definitions ===================== -->
    <!-- ========= NotificationConsumer PortType Definition =========== -->
    <wsdl:portType name="NotificationConsumer">
    <wsdl:operation name="Notify">
    <wsdl:input message="wsntw:Notify" />
    </wsdl:operation>
    </wsdl:portType>
    <!-- ========= NotificationProducer PortType Definition =========== -->
    <wsdl:portType name="NotificationProducer">
    <wsdl:operation name="Subscribe">
    <wsdl:input message="wsntw:SubscribeRequest" />
    <wsdl:output message="wsntw:SubscribeResponse" />
    <wsdl:fault name="ResourceUnknownFault"
    message="wsrf-rw:ResourceUnknownFault" />
    <wsdl:fault name="InvalidFilterFault"
    message="wsntw:InvalidFilterFault"/>
    <wsdl:fault name="TopicExpressionDialectUnknownFault"
    message="wsntw:TopicExpressionDialectUnknownFault"/>
    <wsdl:fault name="InvalidTopicExpressionFault"
    message="wsntw:InvalidTopicExpressionFault" />
    <wsdl:fault name="TopicNotSupportedFault"
    message="wsntw:TopicNotSupportedFault" />
    <wsdl:fault name="InvalidProducerPropertiesExpressionFault"
    message="wsntw:InvalidProducerPropertiesExpressionFault"/>
    <wsdl:fault name="InvalidMessageContentExpressionFault"
    message="wsntw:InvalidMessageContentExpressionFault"/>
    <wsdl:fault name="UnacceptableInitialTerminationTimeFault"
    message="wsntw:UnacceptableInitialTerminationTimeFault"/>
    <wsdl:fault name="UnrecognizedPolicyRequestFault"
    message="wsntw:UnrecognizedPolicyRequestFault"/>
    <wsdl:fault name="UnsupportedPolicyRequestFault"
    message="wsntw:UnsupportedPolicyRequestFault"/>
    <wsdl:fault name="NotifyMessageNotSupportedFault"
    message="wsntw:NotifyMessageNotSupportedFault"/>
    <wsdl:fault name="SubscribeCreationFailedFault"
    message="wsntw:SubscribeCreationFailedFault"/>
    </wsdl:operation>
    <wsdl:operation name="GetCurrentMessage">
    <wsdl:input message="wsntw:GetCurrentMessageRequest"/>
    <wsdl:output message="wsntw:GetCurrentMessageResponse"/>
    <wsdl:fault name="ResourceUnknownFault"
    message="wsrf-rw:ResourceUnknownFault" />
    <wsdl:fault name="TopicExpressionDialectUnknownFault"
    message="wsntw:TopicExpressionDialectUnknownFault"/>
    <wsdl:fault name="InvalidTopicExpressionFault"
    message="wsntw:InvalidTopicExpressionFault" />
    <wsdl:fault name="TopicNotSupportedFault"
    message="wsntw:TopicNotSupportedFault" />
    <wsdl:fault name="NoCurrentMessageOnTopicFault"
    message="wsntw:NoCurrentMessageOnTopicFault" />
    <wsdl:fault name="MultipleTopicsSpecifiedFault"
    message="wsntw:MultipleTopicsSpecifiedFault" />
    </wsdl:operation>
    </wsdl:portType>
    <!-- ========== PullPoint PortType Definition ===================== -->
    <wsdl:portType name="PullPoint">
    <wsdl:operation name="GetMessages">
    <wsdl:input name="GetMessagesRequest"
    message="wsntw:GetMessagesRequest" />
    <wsdl:output name="GetMessagesResponse"
    message="wsntw:GetMessagesResponse" />
    <wsdl:fault name="ResourceUnknownFault"
    message="wsrf-rw:ResourceUnknownFault" />
    <wsdl:fault name="UnableToGetMessagesFault"
    message="wsntw:UnableToGetMessagesFault" />
    </wsdl:operation>
    <wsdl:operation name="DestroyPullPoint">
    <wsdl:input name="DestroyPullPointRequest"
    message="wsntw:DestroyPullPointRequest" />
    <wsdl:output name="DestroyPullPointResponse"
    message="wsntw:DestroyPullPointResponse" />
    <wsdl:fault name="ResourceUnknownFault"
    message="wsrf-rw:ResourceUnknownFault"/>
    <wsdl:fault name="UnableToDestroyPullPointFault"
    message="wsntw:UnableToDestroyPullPointFault" />
    </wsdl:operation>
    <wsdl:operation name="Notify">
    <wsdl:input message="wsntw:Notify"/>
    </wsdl:operation>
    </wsdl:portType>
    <!-- ========== CreatePullPoint PortType Definition =============== -->
    <wsdl:portType name="CreatePullPoint">
    <wsdl:operation name="CreatePullPoint">
    <wsdl:input name="CreatePullPointRequest"
    message="wsntw:CreatePullPointRequest" />
    <wsdl:output name="CreatePullPointResponse"
    message="wsntw:CreatePullPointResponse" />
    <wsdl:fault name="UnableToCreatePullPointFault"
    message="wsntw:UnableToCreatePullPointFault" />
    </wsdl:operation>
    </wsdl:portType>
    <!-- ========== SubscriptionManager PortType Definition =========== -->
    <wsdl:portType name="SubscriptionManager">
    <wsdl:operation name="Renew">
    <wsdl:input name="RenewRequest"
    message="wsntw:RenewRequest" />
    <wsdl:output name="RenewResponse"
    message="wsntw:RenewResponse" />
    <wsdl:fault name="ResourceUnknownFault"
    message="wsrf-rw:ResourceUnknownFault" />
    <wsdl:fault name="UnacceptableTerminationTimeFault"
    message=
    "wsntw:UnacceptableTerminationTimeFault" />
    </wsdl:operation>
    <wsdl:operation name="Unsubscribe">
    <wsdl:input name="UnsubscribeRequest"
    message="wsntw:UnsubscribeRequest" />
    <wsdl:output name="UnsubscribeResponse"
    message="wsntw:UnsubscribeResponse" />
    <wsdl:fault name="ResourceUnknownFault"
    message="wsrf-rw:ResourceUnknownFault" />
    <wsdl:fault name="UnableToDestroySubscriptionFault"
    message=
    "wsntw:UnableToDestroySubscriptionFault" />
    </wsdl:operation>
    </wsdl:portType>
    <!-- ====== PausableSubscriptionManager PortType Definition ======= -->
    <wsdl:portType name="PausableSubscriptionManager">
    <!-- ============== Extends: SubscriptionManager ============ -->
    <wsdl:operation name="Renew">
    <wsdl:input name="RenewRequest"
    message="wsntw:RenewRequest" />
    <wsdl:output name="RenewResponse"
    message="wsntw:RenewResponse" />
    <wsdl:fault name="ResourceUnknownFault"
    message="wsrf-rw:ResourceUnknownFault" />
    <wsdl:fault name="UnacceptableTerminationTimeFault"
    message=
    "wsntw:UnacceptableTerminationTimeFault" />
    </wsdl:operation>
    <wsdl:operation name="Unsubscribe">
    <wsdl:input name="UnsubscribeRequest"
    message="wsntw:UnsubscribeRequest" />
    <wsdl:output name="UnsubscribeResponse"
    message="wsntw:UnsubscribeResponse" />
    <wsdl:fault name="ResourceUnknownFault"
    message="wsrf-rw:ResourceUnknownFault" />
    <wsdl:fault name="UnableToDestroySubscriptionFault"
    message=
    "wsntw:UnableToDestroySubscriptionFault" />
    </wsdl:operation>
    <!-- === PausableSubscriptionManager specific operations === -->
    <wsdl:operation name="PauseSubscription">
    <wsdl:input message="wsntw:PauseSubscriptionRequest"/>
    <wsdl:output message="wsntw:PauseSubscriptionResponse"/>
    <wsdl:fault name="ResourceUnknownFault"
    message="wsrf-rw:ResourceUnknownFault" />
    <wsdl:fault name="PauseFailedFault"
    message="wsntw:PauseFailedFault" />
    </wsdl:operation>
    <wsdl:operation name="ResumeSubscription">
    <wsdl:input message="wsntw:ResumeSubscriptionRequest"/>
    <wsdl:output message="wsntw:ResumeSubscriptionResponse"/>
    <wsdl:fault name="ResourceUnknownFault"
    message="wsrf-rw:ResourceUnknownFault" />
    <wsdl:fault name="ResumeFailedFault"
    message="wsntw:ResumeFailedFault" />
    </wsdl:operation>
    </wsdl:portType>
    </wsdl:definitions>
    And the error i get is [fatal error] null databinding context encountered when creating service.
    Steps i followed:
    1. Created a new project in Jdev
    2. Right clicked on project to expand Business Tier - Web Services nodes. Selected the Java web Service from WSDL.
    3. Selected WSDL to convert
    ---Says it is Fetching WSDL
    ---then says building model
    --and pops error : [fatal error] null databinding context encountered.
    Any suggestions? I'm unable to get this issue fixed for a long time.

    Hey guys,
    I couldnt get this fixed in jdeveloper, i finally gave up on using Jdeveloper for Web service creation.
    I went back to my eclipse3.2.2 and used the Eclipse WTP 1.5.4 and guess what, it had no issues generating the service and client for my WSDL.
    I am not sure Jdeveloper can compete with Eclipse functionality and ease.

  • UiXML: dataBinding problem with decimal validator

    I'm trying to use the decimal validator inside a uit template and dataBind the minValue, maxValue, maxScale and maxPrecision attributes to the ui:rootAttr dataObject like so:
    <textInput ...>
    <onSubmitValidater>
    <decimal
    data:minValue="minValue@ui:rootAttr"
    data:maxValue="maxValue@ui:rootAttr"
    data:maxPrecision="maxPrecision@ui:rootAttr"
    data:maxScale="maxScale@ui:rootAttr"/>
    </onSubmitValidater>
    </textInput>
    However that doesn't seem to work the validation never executes.
    But when I don't use dataBinding it works fine.
    Example:
    <textInput ...>
    <onSubmitValidater>
    <decimal
    minValue="0"
    maxValue="10"
    maxPrecision="2"
    maxScale="3"/>
    </onSubmitValidater>
    </textInput>
    Could it be that there is some bug with the decimal validator? I'm using the dateValidator in just the same way and it works fine.
    Guido

    We'll at least warn you of the problem starting in 9.0.5.
    Getting full databinding support in there may not happen
    by then.
    But there is a workaround today: databind the
    onSubmitValidater attribute:
    <textInput data:onSubmitValidater="decimal@someBean"/>
    ... to point to code that directly creates the
    DecimalValidater.
    public ClientValidater getDecimal()
    DecimalValidater validater = new DecimalValidater();
    validater.setMinValue(1.0);
    // etc...
    return validater;

  • Problem with complex dataBinding within concat

    Im trying to create a link with a databound onClick attribute like so:
    <link ....>
    <boundAttribute name="onClick">
    <concat>
    <fixed text="submitForm('result',0,{'event':'action','action':'"/>
    <dataObject select="defaultAction" source="fti:search"/>
    <dataObject select="##','index':'%index%'});return false;" source="resultRow@fti:search"/>
    </concat>
    </boundAttribute>
    </link>
    fti:search is a dataObject that returns another dataObject for the selectString resultRow. The resultRow dataObject should then be called with the selectString ="##','index':'%index%'});return false;
    However the resultRow dataObject is never called with that selecString.
    I also tried writing:
    <fixed data:text="##','index':'%index%'});return false;@resultRow@fti:search"/>
    but with the same result.
    I'm using this syntax for many other controls, but for the text attribute of a <fixed> element it doesn't seem to work.
    So how can I do a complex dataBinding within a <concat> element?
    Thanks,
    Guido

    Hi Guido
    I think you need this
    <dataObject select="##,'index':'%index%});return false;" data:source="resultRow@fti:search"/>Cheers
    Ian

  • Trapping KeyEvents anywhere in a JFrame for a status bar

    Hi all,
    There are a few examples of how to implement a status bar in the archives, but I haven't seen anything that tells you how to trap KeyEvents (e.g. pertaining to CapsLock etc.) which occur anywhere in a JFrame: once you start adding focusable components (particularly but not exclusively JTextComponents) to a JFrame the JFrame itself is often not sent the KeyEvents, so a rudimentary addKeyListener() is not the answer.
    Could this involve the use of KeyboardFocusManager or sthg? NB to experts: I have read the tutorial on the focus subsystem to no avail. The key seems to be to trap the event thread in some way, perhaps??
    All help greatly appreciated...
    Mike

    Add a AWTEventListener on Toolkit.getDefaultToolkit() with appropriate mask. See javadocs of addAWTEventListener method.

  • Databinding problem - tutorial

    Hello,
    I have just began to work with the SAP .NET connector.
    I am trying to do the tutorial : "Write an ASP.NET Client Application with SAP.NET Connector".
    The user writes a name in a textbox. Then the programm  calls the Bapi RFC_CUSTOMER_GET and it returns the list of customers who have the name written in the textbox.
    However the databinding is not working well between the textbox and the corresponding parameter in the method RFC_CUSTOMER_GET. The programm doesn't use the value in the textbox to find the customers. Instead, it always choses the default value in the SAPProxy11.
    Once the list of customers is found, the value of the textbox changes automatically and is set to the default value of the SAPProxy.
    I guess this is due to the databinding which only works in one direction. The textbox cannot set the value in the BAPI. But the value in the BAPI sets the value in the textbox.
    To avoid the missing databinding, I have found the following solution :
    there is a method Button_Click which calls the BAPI; at the beginning of this method, I write to following code to force the value of the parameter of the customer name
    sapproxy11.CustName=this.TextBox1.Text;
    However, this is not the right solution.
    Have you ever had that problem ?
    Any suggestions ?
    Thank you.
    Marie

    Hi,
    It's true, in a ASP.NET the databinding only works in one way (by design) - from source to UI, and not the other way around (this will apparently change in ASP 2.0)... so your solution is in-fact the right one.
    If you want to enjoy the 2-way binding, use winforms 
    Regards,
    Ofer

  • Use combination context param, EL of databinding in a EL.

    Hi. I have a image tag(ADF Faces.General Controls). I add into source attribute at common of property palette a EL #{resource['images:bakery.jpg']} with bakery.jpg is a image locate directy in images directory. Now, I want to change images directory by a context param that i added and bakery.jpg by a EL of databinding, as #{bindings.Name.inputValue}. Purpose is to change dynamically image displayed. How to do that? Thanks.

    Hi,
    using Google to search for : EL JSF context parameter brings up
    http://stackoverflow.com/questions/6523193/jsf-2-how-can-i-get-a-context-param-value-from-web-xml-using-jsf-el
    For the image name, if it is in an ADF attribute you use
    #{bindings.attributeName.inputValue}
    So concatenating it
    #{initparam El as in link above}/#{bindings.attributeName.inputValue}
    or, to read it from HTTP and not through the faces servlet
    /#{initparam El as in link above}/#{bindings.attributeName.inputValue}
    Frank

  • COMMIT problem in TopLink, Struts, JSP and ADF Databinding sample

    In the sample Developing a J2EE Application using TopLink, Struts, JSP and ADF Databinding,
    I followed all the steps to build a department browse page and a edit page.
    But when I get to Step number 23 in "Create a JSP to Edit Departments" I have a problem with the commit.
    Only after I make a change in the form and click the sumbit button, the commit and rollback buttons become active. And After I click the commit button the data gets commited to the database but the page inofmation changes to the very first department record, not the current one.
    How do I make those buttons active with out the extra click on the submit?
    After I click the commit button, how do I keep the current data on the screen?
    Thanks for you help.

    Shay,
    Thanks for the reply.
    For #1, I was able to do the following and get away with not having to press submit first. I just removed the bindings for disable. I hope that does not cause any problems?
    <input type="submit" name="event_Commit" value="Commit" />
    <input type="submit" name="event_Rollback" value="Rollback" />
    For #2, How I add an action on an HTML button? My UIModel.xml for the edit department page currently has two actions on it. Commit and RollBack. Is it linked through the "name" attribute of the input tag?

  • MouseEvents and KeyEvents in the same form is not working

    Hello!
    I'm newbee in java althought i've bee programing for a long time in other languages, C, C++ wich i'm proud of.
    Now i land on java and there are a lot of cuestions (nothing that cant be solved by trying and reading).
    But today i hitted my head against all posible solutions and nothing (but bad mood) came out.
    The code with trouble is this...
    public class NewJFrame extends javax.swing.JFrame
        public NewJFrame()
            initComponents();
        private void initComponents() {
            jButton1 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            addKeyListener(new java.awt.event.KeyAdapter() {
                public void keyPressed(java.awt.event.KeyEvent evt) {
                    formKeyPressed(evt);
                public void keyReleased(java.awt.event.KeyEvent evt) {
                    formKeyReleased(evt);
                public void keyTyped(java.awt.event.KeyEvent evt) {
                    formKeyTyped(evt);
            jButton1.setText("jButton1");
            jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jButton1MouseClicked(evt);
            pack();
        private void formKeyTyped(java.awt.event.KeyEvent evt) {
            Integer i = evt.getKeyCode();
        private void formKeyPressed(java.awt.event.KeyEvent evt) {
            Integer i = evt.getKeyCode();
        private void formKeyReleased(java.awt.event.KeyEvent evt) {
            Integer i = evt.getKeyCode();
        private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
            Integer i = evt.getButton();
        private javax.swing.JButton jButton1;
    }In debug mode i cant listen to mouse events and key events in the same form. Is that normal ?
    In case this is normal, how can i surround this "problem" and make it work.
    Thanks a lot in ahead.

    Thanks for trying to understand whats going on ...
    There is my SSCCE
    * NewJFrame.java
    * Created on 2 de mayo de 2008, 20:32
    * @author  edu
    public class NewJFrame extends javax.swing.JFrame
        public NewJFrame()
            initComponents();
            setFocusable(true);
            requestFocus();
        private void initComponents() {
            jButton1 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            addKeyListener(new java.awt.event.KeyAdapter() {
                public void keyPressed(java.awt.event.KeyEvent evt) {
                    formKeyPressed(evt);
                public void keyReleased(java.awt.event.KeyEvent evt) {
                    formKeyReleased(evt);
                public void keyTyped(java.awt.event.KeyEvent evt) {
                    formKeyTyped(evt);
            jButton1.setText("jButton1");
            jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jButton1MouseClicked(evt);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jButton1)
                        .addGap(0, 0, Short.MAX_VALUE)))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jButton1)
                        .addGap(0, 0, Short.MAX_VALUE)))
            pack();
        private void formKeyTyped(java.awt.event.KeyEvent evt) {                             
            setTitle(String.valueOf(evt.getKeyCode()));
        private void formKeyPressed(java.awt.event.KeyEvent evt) {                               
            setTitle(String.valueOf(evt.getKeyCode()));
        private void formKeyReleased(java.awt.event.KeyEvent evt) {                                
            setTitle(String.valueOf(evt.getKeyCode()));
        private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
            setTitle(String.valueOf(evt.getButton()));
        private javax.swing.JButton jButton1;
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
    }It's quite simple, its suposed to show on the windows title the KeyCode (if there is any) or the MouseButton when pressed.
    The problem is: it doesnt work... (if i comment out the jButton1 related code, that means that i dont listen to MouseEvents & dont add the MouseAdapter as MouseListner to the form, the KeyEvents are raised and i can listen to them - but there are no MouseEvents - if i run the SSCCE like above i can listen to the MouseEvents, but cant listen to the KeyEvents. Can you tell me why?
    Just before posting i realized it was a focus issue ! The button got the focus and got all the events redirected towards him ! I solved it with the code
            jButton1.setFocusable(false);and it finally worked !
    Thanks!

  • Flex databinding and webservices

    Hi everyone,
    At the beginning, i asked this on the Flex forum but they redirected me here, hoping i could find an answer.
    I have a JBoss server, getting some data for my Flex/AIR client. The client is requesting the data using SOAP webservices.
    The trouble is that it's getting really complex to handle the data so i basically want to use the databinding feature, or some pattern to make it easier.
    The goal isn't only displaying, but also editing the data so that it's automatically sent to the JBoss server (and eventually auto-refreshing on other clients).
    That's why i really want to use some kind of databinding, which totally fits: the displayed value is totally synchronized with the dataprovider variable. I would like to use that with external data (through webservice in the best case), hoping you know a way/pattern/feature to make it work.
    Thank you very much.
    Original post : http://forums.adobe.com/thread/801243

    Ask on the BlazeDS and/or LiveCycle forums.

  • How to convert a string into a collection of KeyEvents

    I'm working on a program that must interact with a 3rd party application (closed to me, I have no access to the code or anything like that). I have been unable to send data to the program by getting its OutputStream. The only thing that has worked was using a Robot object to send individual key events (i.e. robot.keyPress(KeyEvent.VK_A);). Therefore I'm looking to convert a string (many different strings actually) into a collection of their associated KeyEvents so I can send them to the other application. Does anyone know a good way of doing it, or is anyone able to help me with using the OutputStream?
    Thank you!
    (The 3rd party application is Attachmate InfoConnect, a Unisys terminal emulation program that I have to use to access a mainframe).

    Here is a code sample.     public void checknumber(int vsize){
    int total;
    String anum;
    anum = tf2.getText();
    validnumber = true;
    lines2combine = 1;     //default (an integer)
    recs2make = 1;          //default
    try{
    lines2combine = Integer.parseInt(anum);
    catch (NumberFormatException e){
              System.out.println("Entry for lines to combine not numeric");
         validnumber = false;
         d1Title = "Data Entry Error";
         d1Txt = "For number for lines to combine;";
         d2Txt = "Enter a number.";
         doMessage();

  • 2 way databinding between DataGrid and DropDownList

    I am not getting anywhere with what I thought is the most simplest basic thing in the world.
    I have a ArrayCollection "employees" which is used to fill a DataGrid. The department is listed as an Integer value. I would like to display however the name of the department, which is in a second ArrayCollection "departmentsArray". So the itemRenderer (which is not yet implemented in this code) needs to match the "idn" value with the "departmentid" value and then display the name of the department. However, when the user clicks on the DropDownLists and selects a new department, the departmentid value in the employee array needs to get updated too.
    I am assuming that this can be done with 2 way databinding, but I am not getting this to work and would greatly appreciate if someone could show me how the code would have to look for this.
    Michael
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
         <fx:Declarations>
              <!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
         </fx:Declarations>
         <fx:Script>
              <![CDATA[               
                   import mx.collections.ArrayCollection;
                   [Bindable]
                   private var employees:ArrayCollection = new ArrayCollection([
                        {idn:1, firstname:'Lisa', lastname:'Tran', departmentid:1},
                        {idn:2, firstname:'Michael', lastname:'Orchard', departmentid:2},
                        {idn:3, firstname:'Wolfgang', lastname:'Prettyer', departmentid:2},
                        {idn:4, firstname:'Julia', lastname:'Stancau', departmentid:3},
                   [Bindable]
                   private var departmentsArray:ArrayCollection = new ArrayCollection([
                        {idn:1, department:'Video'},
                        {idn:2, department:'Web'},
                        {idn:3, department:'Print'},
              ]]>
         </fx:Script>
         <s:DataGrid x="57" y="90" width="410" requestedRowCount="4" dataProvider="{employees}">
              <s:columns>
                   <s:ArrayList>
                        <s:GridColumn dataField="idn" headerText="ID"></s:GridColumn>
                        <s:GridColumn dataField="firstname" headerText="Vorname"></s:GridColumn>
                        <s:GridColumn dataField="lastname" headerText="Nachname"></s:GridColumn>
                        <s:GridColumn dataField="departmentid" headerText="Department"></s:GridColumn>
                   </s:ArrayList>
              </s:columns>
         </s:DataGrid>
    </s:Application>

    Thanks for the info.
    I've only seen info about Snow Leopard syncing (and it doesn't really specify 2 way) to Exchange (which is not LDAP)
    Addressbookserver (www.addressbookserver.com) is also not LDAP.
    I really need this to work (2 way sync) with an LDAP server.
    Thanks.

  • Good practice for async databinding, regarding entity-framework.

    I have some issue to find a good pattern to keep my UI responsive using asynch databinding and entity framework which is not thread-safe. It would be a shame if the UI came to totaly freeze with no feedback for a connection lost.
    So, entity framework is not thread-safe. Which mean I won't be able to rely on lazy loading here and involve than if I do async databinding to a collection of object, each object will have to load their navigations properties with their own context to display
    data. Ok, I can handle this. But what if I need more than displaying data and I want to modify a navigation property ?
    I need when I set the navigation property in my viewmodel to attach an entity from the same context than the parent entity is from. So here I have one context for multiple thread. What do I do ? =(
    Does anyone have some experience in it and can help me to clear this mess from my mind ? =D
    All the sample I can find about async databinding don't go any further than make a Thread.Sleep before returning a string, it's not realy helpfull.

    There are reasons people post simple explanations.
    One of those is because they post blog entries when they're learning something rather than when they are expert in it.  The blog post is part of their learning process.
    I sometimes share context. 
    What I do is put the context in Application.Current.Resources and then go get it from there when I need to re-use that particular one.
    xxxDomainContext DBContext = new xxxDomainContext();
    Application.Current.Resources.Add("DBContext", DBContext);
    and using that:
    context = (xxxxDomainContext)Application.Current.Resources["DBContext"];
    You can alternatively share collections in a similar way.  Depends on how many related tables you have, but reading a whole tree of static data is sometimes a good idea rather than just one table at a time.
    One technique I use is to cache slowly changing data on the client and then go get changes since the last run off the server.  For a fair few applications, yesterdays data is good enough for most data sets.  It's just the odd one or two which you really
    need up to date numbers or whatever.
    You can see a collection shared in this sample ( but the sharing is for different reasons ) :
     https://gallery.technet.microsoft.com/Dynamic-XAML-Composed-View-e087f3c1
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

Maybe you are looking for

  • Major Issues with Premiere Pro CC

    I am currently having some major issues with Premiere Pro CC running on my macbook pro(specs below). I am trying to export a 4 minute video using the vimeo 1080p export settings as I usually do, and it takes about 10 hours to export the video. On cs6

  • Is it possible to update the comments field once receiving is done

    Hi All, Can anyone of You help on this. We have done the receiving against one PO. The material is receipt and delivered in the Inventory. User has enter in-correct details in the comment field (both at header and line level) during receiving. Now we

  • Bug with cinemaDNG importer

    Hello. Premiere Pro CS 5.02 hang on import a AAF file (export from Avid Mediacomposer with DV edit) if cinemaDNG plugin is installed. I deleted the importer and Premiere works fine. Best Regards

  • Always getting syntax error when using RANK formula. Please help!!

    i am desperate! tried EVERYTHING. so as a last try, I tested the very same Example that Apple gives to elaborate how the "RANK" formula works...and you guessed it....NOT WORKING. not even a reconstruction 1 to 1 of the apple example worked, giving me

  • Creating new records in list view

    Hi, We have a requirement to allow creation/editing of records in the list view for Accounts/Opportunities. Can anyone provide clues to how this may be achieved in CRM 5.0 PCUI? Thanks Sujon