Linebreak in shortdesc in tooltip in adf - oracle-adf

I have a inputcombobox and I have its shortdesc attribute pointed to a String variable in a managed bean. The string contain line breaks but while rendering on browser, it seems to ignore it.
I tried workarounds for this by using pop up but it seems like showPopupBehaviour is not allowed inside inputComboBox. Also can't use javascript as it is mouse hover method is messing up with click event on LOV of inputcombobox.
I am using jdev 11.1.1.7.2
Any ideas

Use HTML entities in your shortDesc string.
The ones you are looking for are:
- Line Feed
- Carriage Return
Examples:
<af:outputText value="Hello StackOverFlow" shortDesc="Hallo
World"/>
<af:outputText value="Hello StackOverFlow" shortDesc="Hallo 
 World"/>
<af:outputText value="Hello StackOverFlow" shortDesc="Hallo
World"/>
These will all show a tooltip with a new line.
Edit:
It seems that the outputText component puts the tooltip in the title attribute while the inputCombobox puts the tooltip in a <div>

Related

Is there a way to access the link inside react-tooltip on hover?

Im using react-simple-maps with react-tooltip
Looks like the hover works fine, but I try to click on a link I've added on the tooltip but before I can get to the tooltip, it disappears and I can't access the content with my mouse.
is this possible?
Depending on what your implementation specifically looks like, I think the delayHide property is what you're looking for. It defines the delay after the hover event ends until the tooltip disappears, in milliseconds.
<ReactTooltip delayHide={1000} />

Oracle ADF: Need to show checkbox before label using selectBooleanCheckbox

I was trying to show checkbox before label using selectBooleanCheckbox in oracle ADF but it is showing checkbox after label.
<af:panelFormLayout id="pfl2" maxColumns="4" rows="1">
<af:iterator id="i2" value="#{pageFlowScope.StoreSearchMB.storeCreateCheckboxes}" var="List">
<af:selectBooleanCheckbox label="#{List.VStore}" id="sbc2" inlineStyle="Color:#949595;font-size:18px;" value="#{List.VStStatus}"/>
</af:iterator>
</af:panelFormLayout>
Could you please help me to get the correct way?
Use Text Attribute of af:selectBooleanCheckbox instead of label .
More here Demo
Use the Text property of the checkbox instead of Label.

Including a button for a related textfield in a CQ dialog

How can I include a button with an input field, so that it looks like this (without the icon):
The purpose of this is so that if somebody enters invalid text, he can click on the button for some suggestions.
(I think this part could be achieved by a JavaScript function which calls a SlingServlet, returning some suggestions to be displayed e.g. maybe as an alert.)
Since you've clarified in comments that having them in one line is important for you, you could wrap them both in a toolbar XType:
<toolbar
jcr:primaryType="cq:Widget"
xtype="toolbar">
<items
jcr:primaryType="cq:WidgetCollection">
<input
jcr:primaryType="cq:Widget"
xtype="textfield"
name="./myInput">
</input>
<button
jcr:primaryType="cq:Widget"
xtype="button"
name="./myButton"
text="Submit">
</button>
</items>
</toolbar>
I think you can then also style the widgets further, e.g. width of the input field.
Check out the API docs too, they have some examples of a ComboBox on the toolbar page, which talks of type-ahead & suggested values — it sounds like it could be adapted to what you're looking for, if the data field came from an external JSON source (e.g. your SlingServlet), rather than coded inline.

Bold / Cursive section of Tooltip text obtained from binding

I have a tooltipservice set to an image, where I want to display a text.
Part of this text we wish to have in bold. Another part in cursive.
The text is obtained from the database and given to the tooltipservice via a binding (localization)
Example: "this is bold and this is cursive but this is normal style"
Is this possible?
I've found online that using the tags < Bold > and < /Bold > should work, but it doesn't seem to for me.
Only thing i can think of is in your tooltip service style, add something like
<TextBlock>
<Span FontWeight="Bold">Hello</Span>
<Span FontStyle="Italic">World</Span>
</TextBlock>
Not sure if this will work

How can I underline a single character in the Content of a Button in WPF?

I have a number of buttons in my WPF window and I would like to have certain characters in the button contents underlined.
I have tried using the "_" like "My_Content" to underline the C, however this does not appear until the user hits the Alt key, or has their local settings changed. Using < Underline > within the Content property causes an error when I attempt to underline only part of the content like:
Content="My< Underline >C< /Underline >ontent".
I would prefer to set this in the XAML if possible. Any help would be appreciated.
Thank You!
You would have to do this explicitly like so:
<Button>
<Button.Content>
<TextBlock>
My <Underline>C</Underline>ontent
</TextBlock>
</Button.Content>
</Button>
This would remove the ability to click the button using Alt+Char though. For that an AccessText element is used. But that doesn't support the markup syntax of TextBlock.

Resources