Works great. Thanks Hussein!
On 5/29/07 8:46 AM, "Hussein Shafie" <hussein at xmlmind.com> wrote:
> Santy, Michael wrote:
>>
>>
>> I'm building a customized XXE that will be packaged as a webstart app.
>> When XXE is launched via Webstart, the JNLP descriptor specifies which
>> file to open. Because of this, I want to remove the "Open" menu item
>> from the file menu. When I do so, I get the error:
>>
>> 'command triggered by "drop" is unknown'
>>
>> This appears me to be that dragging and dropping a file into XXE
>> attempts to open the file with "openAction". Is there any way to
>> disable both methods ("File | Open" & DnD) of opening a file?
>>
>
> --> The simplest is to add this to your .xxe_gui file:
>
> <action name="openAction">
> <class>com.dynetics.xxe.DummyOpenAction</class>
> </action>
>
> where com.dynetics.xxe.DummyOpenAction is an action which does nothing
> at all. Something like:
>
> public class DummyOpenAction extends AppAction
> implements OpenDocumentAction {
> public void doIt() {}
> public void updateEnabled() {}
>
> public boolean openDocument(URL url) {
> return false;
> }
> }
>
> See
> http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/kit/A
> ppAction.html
>
> Note that this action implements the OpenDocumentAction interface.
> See
> http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/kit/O
> penDocumentAction.html
>
>
>
> --> At the end of your .xxe_gui file, in the <hidden> element, do not
> forget to add a reference to the dummy action aclled "openAction":
>
> ---
> ...
> <!-- Layout ================================================== -->
>
> <layout>
> ...
> <hidden>
> ...
> <action name="openAction" />
> </hidden>
> </layout>
> </gui>
> ---
>
> See http://www.xmlmind.com/xmleditor/_distrib/doc/gui/hidden.html