InstallUISequence for custom dialog with radiobuttons - dialog

My InstallUISequence looks as below in Orca:
CostFinalize->Dialog1->CA1->Dialog2->CA2->MaintenanceWelcomeDlg
Dialog1 has two radio buttons (rb1 and rb2):
- rb1 should show Dialog 3 after Dialog1 without going through CA1->Dialog2->CA2 and then show MaintenanceWelcomeDlg
- rb2 follows the InstallUISequence defined above and shows Dialog 4 before MaintenanceWelcomeDlg
However when I select rb1 this is what happens:
Dialog1->Dialog3->Dialog2
How can I prevent Dialog2 from being called when rb1 is selected?
NOTE: Dialog3 and Dialog4 are not on the InstallUISequence. They are only called using NewDialog from Next buttons.

Solved the problem by adding a condition to the CA1, Dialog2 and CA2.
<Custom Action="CA1" After="Dialog1">
<![CDATA[rb_Prop = "valueX"]]>
</Custom>
<Show Dialog="Dialog2" After="CA1">
<![CDATA[rb_Prop = "valueX"]]>
</Show>
<Custom Action="CA2" After="Dialog2">
<![CDATA[rb_Prop = "valueX"]]>
</Custom>

Related

Can I make a widget visible when button is pressed?

Is there any way for displaying a widget when a button is clicked ? But not as a pop up with template = true and slotId = cockpitWidgetChildrenInvisible like in this example :
<widget-extension widgetId="mainSlot">
<widget id="paragraphsPopup" widgetDefinitionId="com.training.backoffice.widgets.paragraphspopup"
slotId="cockpitWidgetChildrenInvisible" template="true">
<setting key="_width" type="String">500px</setting>
<setting key="_height" type="String">auto</setting>
<instance-settings>
// instance settings here for close / init / select.
</instance-settings>
<virtual-sockets/>
</widget>
</widget-extension>
I want the widget to be invisible in a Default Portal Widget maybe in the children slot and when I press a button the widget becomes visible. (Again : NOT as a pop-up widget)

How to click one of the options listed in the drop down menu in hand coded UI testing?

UITestControl uiLinkAboutus = new UITestControl(_bw);
uiLinkAboutus.TechnologyName = "Web";
uiLinkAboutus.SearchProperties.Add("ControlType", "Image");
uiLinkAboutus.SearchProperties.Add("TagName", "IMG");
uiLinkAboutus.SearchProperties.Add("Alt", "Open Menu");
Mouse.Click(uiLinkAboutus);
/* Upon execution, the drop down button is clicked but the option listed below is not clicked. How to solve this problem?
In stead of searching for an image, search for the list or dropdown control using a wpfCombobox, winCombobox or HtmlComboBox control. There you set the selectedItem property to the value you want. that is the most robust way of selecting an item in the UI. so e.g. :
ApplicationUnderTest aut = ApplicationUnderTest.Launch(#"yourapp.exe");  
WpfComboBox cbBox = new WpfComboBox(aut);
cbBox.SearchProperties.Add(WpfComboBox.PropertyNames.AutomationId,"cmbCountries");//AutomationId == xName roperty
cbBox.SelectedItem = "your value";

How to check and uncheck and enable and disable a check Box control in MFC

What is the source code to do the standard checkbox actions with a Visual C++ MFC checkbox control?
set a check in the displayed checkbox control
clear a check in the displayed checkbox control
enable the displayed checkbox control for user input
disable the displayed checkbox control for user input
Controlling Checkboxes in MFC
Here's how to check, uncheck, enable, and disable a checkbox in MFC:
CButton* pBtn = (CButton*) GetDlgItem(IDC_SETUP_AM);
pBtn->SetCheck(0);// uncheck it
CButton* pBtn = (CButton*) GetDlgItem(IDC_SETUP_AM);
pBtn->SetCheck(1);// check it
CButton* pBtn = (CButton*) GetDlgItem(IDC_SETUP_AM);
pBtn->EnableWindow(0);// disable it
CButton* pBtn = (CButton*) GetDlgItem(IDC_SETUP_AM);
pBtn->EnableWindow(1);// enable it
bool isRemoveChecked = IsDlgButtonChecked(IDC_removeProf);
Alternatively, you won't need to retrieve a pointer to the button (checkbox) if you use CWnd::CheckDlgButton to check/un-check the button, for example:
BOOL isChecked = ...
CheckDlgButton(IDC_SOME_ID, isChecked);
And, enabling/disabling can be simplified to:
BOOL isEnabled = ...
GetDlgItem(IDC_SOME_ID)->EnableWindow(isEnabled);

Configurable XPages ApplicationLayout titlebar tabs: so close, but

I am now getting my tabs in the Application Layout's TitleBar form a view, but it seems that managing the "selected" property is not wotking. Here is the code I have in my page:
<xe:this.titleBarTabs>
<xe:repeatTreeNode indexVar="1" var="tab">
<xe:this.children>
<xe:basicLeafNode label="# {tab.label}"
submitValue="#{tab.label}"
onClick="#{javascript:sessionScope.selectedTab = tab.label;}">
<xe:this.href><![CDATA[#{javascript:
"home.xsp?action=openDocument&documentId=" + tab.unid;}]]>
</xe:this.href>
<xe:this.selected>
<![CDATA[#{javascript:tab.label==sessionScope.selectedTab;}]]>
</xe:this.selected>
</xe:basicLeafNode>
</xe:this.children>
<xe:this.value><![CDATA[#{javascript:getTabs();}]]></xe:this.value>
</xe:repeatTreeNode>
</xe:this.titleBarTabs>
Can this be that hte Href and onClick cannot be there at the same time or I'm just missing something?
As usual, thanks a million for your help. Can't wait to give some back...
You have to decide what shall happen when user clicks a title bar tab:
open URL defined in href
OR
execute onClick event.
The help for onClick gives the hint:
So, you can't use onClick and a scope variable to appear a tab selected after user clicked on tab and new content shows up.
To accomplish this
add an URL parameter &tab= with the tab label tab.label to your href URL
return true in selected code if the current tab label is equal to the tab URL parameter
Your href and selected properties would look like this then:
<xe:this.href><![CDATA[#{javascript:
"home.xsp?action=openDocument&documentId=" + tab.unid + "&tab=" + tab.label}]]>
</xe:this.href>
<xe:this.selected>
<![CDATA[#{javascript:tab.label === param.tab}]]>
</xe:this.selected>
Don't forget to delete the onClick property in your code. You don't need it anymore.
Along the lines of what Knut is suggesting (I think) ... comment out the onClick property for the basicLeafNode and moves its function to the onItemClick for the xe:applicationLayout control.
The code for the onItemClick would be something like this...
var clickedTab = context.getSubmittedValue();
sessionScope.selectedTab = clickedTab;

MKMap annotation selection

I want to check when he user presses the annotation (the bubble on top of the pin). I tried the following :
-(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view{}
but it fires up when i press the pin. How can i check when the user actually presses on the annotation bubble?
You can first put a right accessory button and set an separate action for it as such:
UIButton* rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[rightButton addTarget:self
action:#selector(showDetails:)
forControlEvents:UIControlEventTouchUpInside];
customPinView.rightCalloutAccessoryView = rightButton;
you can implement the showDetails method with the function that you like

Resources