I have a property sheet having two pages. The first page contains an edit box (EDITBOX1)and a check box (CHECKBOX1) . The second page contains also contains an edit box(EDITBOX2) with a check box(CHECKBOX2).
I am trying to implement a way that when there is no value in EDITBOX1 and EDITBOX2 have some value CHECKBOX2 should be checked and it should be dithered .
Then when we entered somevalue to EDITBOX1 the previously checked CHECKBOX2 should not be checked and dithered.
Can anyone suggest me some implementation? Any suggestion is appreciated.
Thanks a lot!
Derive your own class from CPropertySheet. Override CPropertySheet::OnActivatePage. Set the appropriate page how you want when it is activated.
Include your pages in your MyPropertySheet.h file. Declare your pages (CPropertyPage m_Page1, CPropertyPage m_Page2, ..) - as many as you need - in the MyPropertySheet.h file.
Add the pages to your CPropertySheet in the class constructor in MyPropertySheet.cpp file with method
CPropertySheet::AddPage(&m_Page);
Get parent of your CPropertySheet in MyPropertyPage2.cpp such as:
CMyPropertySheet* pSheet = (CMyPropertySheet*)GetParent();
Reach your m_Page1 controls pSheet->m_Page1.GetDlgItem(CHECKBOX2) from m_Page2.
Related
Can some one please tell me how to use the result dialog mentioned in the
https://doc.orbeon.com/form-runner/advanced/buttons-and-processes/predefined.html#the-result-dialog
I want to know if this is a predefined dialog and if not where exactly I should define it, any coding samples and how to display it when a button is clicked? Where do I need to put the code? Is it in properties-local.xml file?
Please help. Thank you
You can't pass the message to be shown to the result-dialog. If you just use one of those dialogs, you could define a property to override the default message.
The value of the oxf.fr.detail.submit.go.uri-xpath.*.* property is an XPath expression. If you have a static URL you want to take users to, you can set it to that URL inside single quotes, say 'http://www.orbeon.com/'.
The extension library offers means to structure your forms by Form Tables, where you can put Form Layout Columns and Form Layout Rows.
The Form Layout Rows have a property called "for" (the "For Indentifier") - here is the OnHover-text:
"Holds the ID of the control used to edit the data. That control should be contained within this Form Layout Row control."
So, I could enter the id of e.g. an Edit Box control I put into this form row (which translates to the code ' for="inputText1" '). But what exactly is this needed for? Where or for what can this information be used?
I found no different behaviour or limited functionality when sparing this information - at least, not how we use it atm. I found nothing in the web regarding this question; hope anyone can shed some light.
It's useful if your form row contains multiple controls, preventing the form row's code from determining its "for" target automatically. In that situation, you can provide the server-side ID of the "real" target control in the row to keep the label behavior working properly.
It's also mandatory to set this attribute if you want to use the built-in OneUI or Bootstrap themes to have the label formatted correctly. For example the text will be bold only if you set the for attribute (Bootstrap acts like this)
I am new to XPages, and I have a Check Box Group ('checkBoxGroup1') as one of my design elements that contains three choices ("CBChoice1", "CBChoice1", "CBChoice1"). Underneath that Check Box Group, I have three edit box fields which correspond to the three checkbox choices. Each time one of the checkbox choices is chosen, I want the corresponding edit box to become visible.
Whenever one of the checkboxes is chosen, I have it partially refreshing the panel that the edit boxes are in, but I cannot figure out the code in each of the edit box's visible property. I started with
getComponent('checkBoxGroup1').getValue() == "CBChoice1"
which kind of works, but isn't the answer. I also tried
var valueArray = getComponent('checkBoxGroup1').getSelectedValues();
valueArray[0] == "CBChoice1";
which seems more on target, but I was getting the following browser error:
Error 500 HTTP Web Server: Command Not Handled Exception
I notice that in the computed code for the visibility property, it is SSJS. I feel like I am close, but have been banging my head for too long. Any help would be greatly appreciated.
A better method might be to bind the checkbox group to either a document data source or a scope variable.
Then, your visible property might look something like:
#Contains(myDoc.getItemValueArray("checkBoxFieldName"),"CBChoice1");
or
#Contains(viewScope.get("checkBoxScopeVar"),"CBChoice1");
I am using a file download control and I would like to set the value of the "allowDelete" property dynamically depending on whether the document is in edit or read mode. However, this
property is computed onload of the page. I tried calling the function "setAllowDelete(boolean)" on the onclick event of a button or the "beforeRenderResponse" event of a custom control and a partial or full update to change the value of the property, but it didn't change.
Do you know if there is a way to do this?
Thanks a lot in advance!
I have encountered the same problem. There are two options to workaround it.
1) To use two controls, one with deletion enabled, the other with deletion disabled, and use rendered properties according to edit state (or user role).
2) Render download controls by your own, as data table or repeat. However, this solution has its own problems, too.
Have you tried just calculating the property like this?
<xp:fileDownload .... >
<xp:this.allowDelete><![CDATA[${javascript:
return document.isEditable()}]]>
</xp:this.allowDelete>
</xp:fileDownload>
I'm maintaining an MFC app on Windows CE 6.
The app contains a customized property sheet containing 6 property pages. Every page is initialized in OnInitDialog (controls are populated) and contains 2 buttons.
The first property page (i.e. the one that is selected when the property sheet is displayed) is:
Never initialized.
Its buttons don't work.
The sheet handles several events, but no event ever occurs.
If I place the first property page second in the sheet (i.e. swap property pages A and B), then it's B who's not working and A works perfectly.
I've done some hours of trial and error now, and I've got no clue how to fix this. Anybody an idea?
Thanks
Peter
Its hard to diagnose without seeing the property sheet and property pages properties. Refer to this example and see if you are able to figure out the problem: Property Sheets and Property Pages.
Also refer to this MSDN article on property sheets and property pages. Before using any method, please check if the methods are available for WinCE 6.0.