how to remove image from image field? - oracle

I created check box with ON and OFF option. When click on "ON" option then image show. I want to when click on "OFF" option then image remove or image filed empty
How to achieve this target in oracle forms 10g?

I don't think you can do this.
As someone suggested it, you could have thought using SET_ITEM_INSTANCE_PROPERTY (this one only applies to the current record). However, you cannot modify all the properties, only few of them : BORDER_BEVEL, INSERT_ALLOWED, NAVIGABLE, REQUIRED, UPDATE_ALLOWED and VISUAL_ATTRIBUTE.
Check the documentation of this method here (Oracle Forms v6i) : https://docs.oracle.com/cd/A97335_02/apps.102/a73074.pdf
One of the best solution you may find should be to make a custom Java Bean item which would handle this behavior. However be careful, Java Beans don't work correctly when used in a multi-records blocks. If your checkbox is used within a single-record block, it should be OK.
Here are some of my references to create your own Java Beans :
http://devtalks.blogspot.com/2008/07/creating-and-using-java-beans-in-oracle.html
http://forms.pjc.bean.over-blog.com/
https://www.baigzeeshan.com/2010/02/how-to-add-java-bean-by-writing-your.html

Related

IntelliJ Not Displaying Values in Debug Mode

For the last weeks, I am having problems when debugging in IntelliJ (java/groovy) and I am not able to see the values of the different variables.
I see "head", "tail", "accessorder". In each of these entries I can access the key / value of separately. Therefore, in order to see the complete item (e.g hashmap or arraylist), I need to open each entry separately, which is very inefficient.
This description may not be clear, so I include a screenshot of what I currently see.
I have tried the following:
Resetting the settings
Using IntelliJ 2020 version (having deleted the settings and cache)
Using IntelliJ 2021 version (having deleted the settings and cache)
Thank you,
Kat
After having tried #Satyen Shimpi useful reply, I am not able to change the view type in the variables.
I think your settings are showing the Map as Object and you need to change the view settings to Auto.
Following will help you.
The reason you are seeing the head, tail etc is
From Above, you can see that LinkedHashMap is being rendered as Object in View as menu because I had selected Object
And you can solve it by changing View to Auto. Then it will show Map in a way that you are expecting where you don't need to expand each entry.
Note: When you select Auto, it will automatically change to Map. For the same reason, my image has Map checked and not the Auto

How can I disable a custom toolbar button in CKEditor 5?

I implemented a version of the image insert Simple Plugin example from CKEditor 5's framework docs.
But the example doesn't cover how to disable the item when the editor's isReadOnly property is set (like it does by default for all the standard buttons). I found docs for an isEnabled prop as well as a bind method for ButtonView, but it quotes examples using a command item, rather than a view item. Problem is, the Simple Plugin example doesn't create a command to bind to.
So question is whether I need to create a command, or if there is some other way to make the view item's state sensitive to the readonly state of the editor instance.
Thanks, and my apologies if I've left out any needed context (new to posting here on SO). Feedback is welcome (and I know y'all will whip me into shape).
D'oh, I think I figured it out:
view.bind('isEnabled').to(editor, 'isReadOnly', isReadOnly => !isReadOnly);
Just needed to bind to the observable property of the editor. Seems to be working as I desired/expected.

how to mask/unmask a field by changing type and retaining all old events (using dojo in IE)

I am trying to mask/unmask a dojo text field upon clicking a mask/unmask-link..
On clicking this link I am changing the type property of the dojo-text field to "password" and vice versa..
but this is not working in IE8,9,10 versions.. works in IE11/Firefox though..
when searching google the advice was to recreate the same field with the existing properties and events with the needed type..
I can recreate the field, but I am just wondering how to get all the existing-events(dojo) of the current field.
Can somebody help me ?
I am also looking for any other approach other than this to handle this mask/unmask use-case, but considering using Dojo.
I'm using Dojo 1.4.
In older versions of Internet Explorer the type attribute of an input field is considered readonly (IE6, IE7, IE8, IE9?) and the browser will not let you change it. (This may also be the case if not running in Standards Mode - though I haven't tested this)
To overcome this you may need to remove it from the DOM, and create a new input of the type you want, and re-insert it.

Ckeditor's Link Dialog incomplete?

In an Xpage running on Domino 9.0.1 I'm using a rich text control with some custom toolbar configuration using the control's "attr" property as it is described here: https://frostillic.us/f.nsf/posts/quick-and-dirty-ckeditor-toolbar-setup-for-xpages
I added the link toolbar template using
<xp:this.attrs>
<xp:attr name="toolbar">
<xp:this.value><![CDATA[[["Link", "Unlink", "Anchor"]]]]></xp:this.value>
</xp:attr>
</xp:this.attrs>
All three buttons are displayed fine, esp. I'm able to define an anchor link target.
But trying to reference the anchor target I find that the Link dialog is somewhat incomplete as I can't define my link to use a relative target on the same page. I tried entering a reference in the dialog's URL field as #myAnchorId, but that results in a link looking like this:
....
Here's an image of the dialog that pops up from my Xpage when I hit the "URL link" button:
And this is what the dialog looks like that I can test from the CKEditor Samples page:
I'm aware that the samples page uses CKEditor V 4, so the dialog is somewhat different, but even V 3.6 should be able to reference anchor links using the dialog.
I already looked up on the installed ckeditor's version; \DominoData\domino\html\ckeditor\version.txt says:
cke_version=3.6.6.2
cke_revision=20130606-1534
Question is: what's missing here? Do I have to somehow modify the dialog?
Oh my, finally got it to work; #IBM: this feature truly could use some proper documentation! I'll mark this answer as a community wiki.
Indeed a different dialog is used here, which btw appears to apply to all the dialogs in use with Domino's CKEditor implementation. The trick in my case is to use one of the custom toolbar items instead of the standard one; up to now I found three of those customized items:
use MenuLink instead of the standard Link item; this item
consists of two sub items ('URL Link' and 'Anchor Link'), each calling its own dialog version; the resulting toolbar definition then looks like this: ['MenuLink', 'Unlink', 'Anchor']
use MenuPaste instead of the standard Paste item; again, this
item consists of two sub items ('Paste' and 'Paste as text'), again
each calling its own dialog version
use LotusSpellChecker to add IBM's own spell checking feature, where CKE's standard spell checker isn't working
I found hints to those three custom items inside my local \DominoData\domino\html\ckeditor\config.js. Don't know if those are all custom items available to day.
EDIT:
IBM's Domino Designer Xpages User Guide mentions another means of customizing the toolbar; the section unfortunately is incorrect in describing the options for the toolbarType attribute: be aware that all named types must start with capital letters, e.g. Basic, Slim, Medium, Large, Full, while the also mentioned Lite type isn't working at all; mistyping or using a non-existing value results in the editor not being displayed at all.
The link dialog that you're using is not the default one, so you should check how to modify it or replace it with the default one.

Orchard CMS widget Display Type

I have a widget which is using a query to display details. Is it possible to specify the display type of the widget (the query is using Summary and all is displayed as i want) because the header of the widget has a display type of Detail and i want it to use summary so i can override the shape when i place it in different sections (mainly the header text), but when in the content zone i would want it to be details. I am using the bootstrap theme. So basically if i stick my widget any where other than content i want it to use summary
Hope this makes sense.
Thanks
Ah, we meet again.
Widgets are built and injected into the layout in a class called Orchard.Widgets.Filters.WidgetFilter. There doesn't appear to be any way to modify the display type used for a widget (the default WidgetFilter uses the default value of "Detail").
To get around this, you can use your own implementation of WidgetFilter. Copy the existing code into your own class, and add an [OrchardSuppressDependency("Orchard.Widgets.Filters.WidgetFilter")] attribute to your class. This will make sure that the existing WidgetFilter isn't used, and yours is.
If you read through the OnResultExecuting method, you'll see that right near the end there is a call to BuildDisplay. The second argument to this method can be a display type. You can check widgetPart.Record.Zone to see where the widget has been placed, and pass in different values for the displayType parameter accordingly.
I'm not sure if this is the most elegant way, but it's where I'd start. Perhaps someone else might have a neater solution.

Resources