I have display only item -> where I am printing error message of database with error code
Following is the name of my display only item : P1_NEW
My code :
Exception
when others then
v_code := SQLCODE;
v_errm := SQLERRM;
:P1_NEW := '<h1 style="text-align:center"> Database error occured </h1>' v_code || v_errm ;
But the issue here is my error code and error message not getting center align
Only my Database error occurred is getting center align
My need is to center align my custom text + error code + error message
Displaying some information to the user as part of a page but not as part of a form can be done with a region as well. Create a region of type "static" and reference your item with the &ITEM. syntax. This gives you a lot more control over the look and feel of the message.
Related
I am feed up with this Oracle APEX application , their is no proper videos or documentation
I have a Text area field and button
On button click I have written a PL/SQL code to send mail
Is their any way I can populate error / success message on screen
If text area is empty does not have any data then display error message on screen as Text area field is empty
My code :
BEGIN
if (:textarea1 is not null ) then
APEX_MAIL.SEND(p_from => 'alice#example.com',
p_to => 'bob#example.com',
p_subj => 'Email from Oracle Autonomous Database',
p_body => 'Sent using APEX_MAIL');
else
--popup error message on my screen -> `textarea` filed cannot be empty
end if;
END;
The following package of ADD_ERROR.ADD_ERROR does not exist at my end
If text area is empty does not have any data then display error message on screen
You don't need your own validation for that; just set that item's Value required property ON.
Additionally, you can even set process' Server side condition to
When button pressed: pick the button you use to send an e-mail
Type: Item is not null; pick the text area item
You commented that it isn't working. Well, it is. If it doesn't for you, then you did something wrong (although, I can't imagine what would that be, regarding the fact that it is just one property you had to set).
So: if I leave the text area empty and push the button, error message is here:
As of a video with demonstration: I don't have any. Google for it, if you desperately need it.
Created an report with checkbox using apex_item and when checked more than one check box i will display alert message "not to check more than one checkbox with ok button " after clicking ok it should be unchecked . please find my JavaScript code that displays alert message
if($("input[type=checkbox]:checked").length > 1)
{
var msg = alert('You are not allowed to select more than one employee');
}
It's best to use the APEX JavaScript APIs for this type of thing. You can find them here: https://apex.oracle.com/jsapi
If you're getting started with JavaScript and APEX, you may find these slides useful: https://www.slideshare.net/DanielMcGhan/getting-started-with-javascript-for-apex-developers
Here's a solution that should work for you (just change the name of the item to match yours):
var cbItem = apex.item('P1_CHECKBOX');
if (cbItem.getValue().length > 1) {
alert('You are not allowed to select more than one employee');
cbItem.setValue(); // Passing nothing to clear the value
}
I'm displaying a word document in QAxWidget.
QAxWidget *axWidget = new QAxWidget;
axWidget->setControl(changelogTempFile->fileName());
axWidget->setFixedSize(400,300);
axWidget->show();
However eventough the whole document does not fit in the viewport I have no scrollbars.
I even tried to use Frameset object to explicitly add scrollbars but it was in vain.
QAxObject *frame = ui->axW_singleChl_doc->querySubObject("Frameset");
if( frame )
frame->setProperty("FrameScrollbarType","wdScrollBarTypeYes");
I received following error message:
QAxBase: Error calling IDispatch member Frameset: Exception thrown by server
Code : 6027
Source : Microsoft Word
Description: Die Eigenschaft Document.Frameset ist nur verf?gbar, wenn Document.Type WdFrameset entspricht
Help : wdmain11.chm [25507]
Connect to the exception(int,QString,QString,QString) signal to catch this exception
Description translated means, that property Document.Frameset is only available if Document.type is WdFrameSet
How can this be achieved? Many thanks in advance,
James
I am using following code to scroll the page and follow the users on quora (Link to the page : http://www.quora.com/Kevin-Rose/followers), certain number of users are loaded after scrolling down, i am using the code given below :
# find all the follow buttons that are loaded
button = driver.find_elements_by_xpath("//a[contains(text(), 'Follow')]")
#number of users loaded
no_of_followers = len(button)
#execute the code till all the users are followed
while(no_of_followers > 0):
count = 0
#follow all the users loaded by clicking follow button in a loop
while(count < no_of_followers):
button[count].click()
time.sleep(30)
print count
count = count + 1
#scroll down
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
time.sleep(30)'
#find newly loaded users
button = driver.find_elements_by_xpath("//a[contains(text(), 'Follow')]")
time.sleep(30)
#tracking no of users left unfollowed
no_of_followers = len(button)
I am getting following error:
StaleElementReferenceException: Message: u'Element is no longer attached to the DOM' ; Stacktrace:
Edit 1: I tried using find_element_by_link _text, but apparently output object of the function is not a list of links which can be iterated.
The possible problem is # button[count].click().
I suggest you to use a for loop instead of while and increament that with an iterator.
Do something like
//you basically need to click on the first item all the time. The iterator should only control the number of iteration
Driver.FindElement(By.Xpath("Your Xpath")).Click();
Sorry, not an expert on python.
I have an dialog window with Gtk::TreeView. This dialod shows main filesystem tree
and provides option to select folders on the disk. When user selects some folder, I am
adding an Gtk::Stock image to the row that represents that folder.
To do this, I have created an Gtk::CellRendererPixbuf associated with the last column of my tree:
//appending columns
directory_tree.append_column("Folder List", dir_columns.name);
Gtk::TreeViewColumn *column = directory_tree.get_column(0);
if(column) column->set_expand(true);
Gtk::CellRendererPixbuf *cell = Gtk::manage(new Gtk::CellRendererPixbuf);
directory_tree.append_column("", *cell);
column = directory_tree.get_column(1);
if(column) column->add_attribute(cell->property_stock_id(), dir_columns.stock_id);
Link to this bit of code: https://github.com/mc-suchecki/Imagine/blob/master/gui/dialogs.cpp#L47
Gtk::CellRendererPixbuf 'translates' Gtk::StockId found in 'dir_columns.stock_id'
to an image located in tree. When I add image to row like this:
//selecting folder
(*folder)[fs_columns.stock_id] = Gtk::StockID(Gtk::Stock::FIND).get_string();
(*folder)[fs_columns.included] = true;
everything is ok, but when I try to delete the image this way:
//unselecting folder
(*folder)[fs_columns.stock_id] = "";
(*folder)[fs_columns.included] = false;
the image correctly disappears, but there are some errors in command line like this (this is not the exact message, I will post it when I will be able to launch my application):
(imagine:9376): Gtk-WARNING **: Gtk StockId not found
Of course the reason of the warning is obvious (there is no StockId item associated with blank name), however my question is: Is there a way to delete an image from Gtk::TreeView row which would not generate any Gtk warnings?
Code where i deselect folder is here:
https://github.com/mc-suchecki/Imagine/blob/master/core/core.cpp#L207
Thank you very much in advance and sorry for my English.
Change the visible property to false if you want to get rid of the image, instead of the stock-id property.