Oracle Apex button click it will open new window - oracle

Oracle Apex 5.1, once click the button it will open new window its possible?, any one please provide the sample code

Use the below code
javascript:window.open('f?p=&APP_ID.:1:&SESSION.:::1:P1_ID:'+$v("P844_ID")+','_blank');

In dynamic action : create an on click DA that executes JS
var rowid= this.triggeringElement.id;
vUrl = apex.util.makeApplicationUrl({
//appId: $v("pFlowId"), // default is $v("pFlowId") - current app
pageId:10, // default is $v("pFlowStepId") - current page
//session: $v( "pInstance" ), // default is $v("pInstance") - current session
// request: 'TEST_REQUEST', // default is $v("pRequest") - current request
//debug: 'YES', // default is $v("pdebug") - debug YES/NO
itemNames:['P10_SHP_APPLICATIONS_TBL_ROWID'],
// item names array (no value by default)
itemValues:[rowid] // item values array (no value by default)
//printerFriendly: 'YES' // no value by default
});//console.log(vUrl);
window.open(vUrl);

LMGTFY - Did you try the following
APEX open URL in new window

javascript:window.open('f?p=&APP_ID.:3002:&SESSION.:::3002:P3002_CPY_ID,P3002_RPM_ID,P3002_ACM_ID, P3002_FORMAT,P3002_REPORT_PAGE_NO:'+$v("P1977_CPY_ID")+','+$v("P1977_RPM_ID")+','+$v("P1977_ACM_ID")+',VIEW,1977','_blank');
Use the above code
Click the button and create the dynamic action and select Execute Js and paste the query.. pass the parameter and page no everything.. then try

Flow below step
Go to Button
Go to button Behavior
Action : Redirect to URL
javascript:window.open('f?p=&APP_ID.:1:&SESSION.::NO:1:P1_PID:'+$v("P2_PID")+'');

Related

Set page item value to show in DA confirm message

I'm using Oracle Apex Version: 20.1
I have a page item (:P303_ADJUSTAMOUNT) that has a default value that's set via sql query. When the user presses the submit button, I have a DA confirm action that shows a popup window to confirm the amount the user is trying to adjust. This works if the user doesn't change the page item value after initialization, as the modal window displays the value that was retrieved from the sql query (the item's default value).
I created another DA on the page item itself to set the value of the page item on the "Lose Focus" event (Set Value --> PL/SQL). I want the DA to set the item's value to whatever the user has entered at the time. Yet when my confirmation message pops up, the page item is still set to the default value and the value I entered disappears. Where am I going wrong here?
Set Value Dynamic Action
Confirmation Message
Update on 04/26/2022:
I finally got my message to be able to display the page item's value and not the page item's session state value. But I have a feeling I'm doing a little extra work to get the desired result.
New code for dynamic action
Action: Execute JavaScript Code
Code:
var msg;
var amt;
msg = "Are you sure you want to insert a singleton for $"
amt = apex.item( "P303_ADJUSTAMOUNT" ).getValue();
apex.message.confirm(msg.concat(amt,"?"), function( okPressed ) {
if( okPressed ) {
apex.submit('ADJUST');
}
});
Desired Result: Update Confirmation Message

ORACLE APEX - Set up a Button to populate a textfield

I have a button which I would like to take the Input text field called P7_INPUT and Divide (/) it by 2000 and pop it into the P7_OUTPUT
Users enters say 3000 into P7_INPUT field and pressed the Button then in the P7_OUTPUT is will show the value of 1.5
Right-click on the :P7_INPUT and select Create Dynamic Action. Set the following properties:
Event: Key Release
Selection Type: Items(s)
Item: P7_INPUT
Right-click the dynamic action and select either Create TRUE Action. Set the following properties:
Action: Set Value
Set Type: PL/SQL expression
PL/SQL expression : NVL(:P7_INPUT,0) / 2000
Items to Submit: P7_INPUT
Affected Elements > Selection Type: Item(s)
Affected Elements > Item(s): P7_OUTPUT
You don't even need a button.
create P7_INPUT as a text item; set its "Submit when enter pressed" property to YES
create P7_OUTPUT
create a process which will contain a PL/SQL code:
:P7_OUTPUT := :P7_INPUT / 2000;
That's all; when you enter e.g. 3000 into the input item and press enter, process will do the calculation and display the result in the output item.
If it must be with a button, create it and let it submit the page. Process will look the same, you'd just put P7_BUTTON into process' "Server side condition's" "When button pressed" property.
Since you require the action to occur dynamically when the user clicks a button, I would create a Dynamic Action on button click with a Set Value action for P7_OUTPUT set to a JavaScript expression:
parseFloat($v("P7_INPUT)) / 2000
This avoids a server round-trip.

Auto click on "GO" in smartfilter bar

i am doing cross application navigation from App 1 to another application by passing parameters.
in target application i have Smart Filter bar. i am filtering using "beforeRebindTable" event in smart Table.
my requirement is while i am navigating to target application i want smart Filter bar's "GO" button gets clicks automatically. so that i can view my filtered data on Smart Table without clicking anything.
regards,
Urvish
i have tried
this._oFilterBar._oSearchButton.sId.click() in onInit();
but it is giving me an error.
var b = E.getParameter("bindingParams");
if (this.onCreate().InspectionLot[0] != "" || this.onCreate() != "")
{
var oFilter = new sap.ui.model.Filter("InspectionLot",
sap.ui.model.FilterOperator.EQ, this.onCreate().InspectionLot[0]);
b.filters.push(oFilter);
}
you can enable the automatic data request in the smarttable by using the property
enableAutoBinding="true"
you can also rebind the Table in the on route matched event
thisgetView().byId("YourSmartTable").rebindTable();

Can Sitecore's rich text editor's internal link manager remember your last location?

Question
Is it possible to remember the last item linked and have that one be selected the next time the Insert a Link dialog box is used?
Background
Our Sitecore content editors use the rich text editor (Telerik RadEditor) to edit HTML content on our website. Sometimes they need to create several links on the same page that are in similar areas (e.g. several different related articles). Currently, when they click on the Insert Link button, they are brought to the Insert a Link dialog box with the current item selected in the content tree. They browse to the item they'd like to link and click Link. Then they go to create another link, and it opens the Insert a Link dialog box to the current item again, instead of the item they just linked.
The solution which I found requires changes in Website\sitecore\shell\Controls\Rich Text Editor\RichText Commands.js file and works as long as you don't reload the page. You may easily extend it to work when some other page is edited by storing the information in a cookie instead of using the variable prevId.
First of all you need to define variable at the beginning of your file:
var prevId = null;
We will assign the last chosen item id to this variable every time we insert Sitecore link.
Second step is to extend scInsertSitecoreLink function to assign the prevId variable after the link is chosen:
function scInsertSitecoreLink(sender, returnValue) {
if (!returnValue) {
return;
}
prevId = returnValue.url.match(/id\=[a-fA-F0-9]{32}/g);
if (prevId) {
prevId = prevId[0].substr(3);
}
... rest of the scInsertSitecoreLink goes here
And the last step is to amend RadEditorCommandList["InsertSitecoreLink"] function that it uses the prevId variable value if it is set before it tries to assign scItemID which holds current item id:
RadEditorCommandList["InsertSitecoreLink"] = function(commandName, editor, args) {\
... here goes the original code of the function up to
if (!id) {
... and the code in the bracket
}
... and now we try to assign the prevId which was set after the last link was chosen
if(!id && prevId) {
id = prevId;
}
... and here goes the rest of the function
if (!id) {
id = scItemID;
}

How to switch to another local view from CCoeControl object in Symbian

My GUI application has two views, First view has a ListBox control - Derived from CCoeControl - and from this object I want to switch to the second view, How can I do this ?
In other words, When user click ListBox Item ...the second view appears.
Assuming that your 'views' are derived from CAknView.
Code From this link
const TUid KDemo1ViewId = { 1 }; // UID of the first view
AppUI()->ActivateLocalViewL(KDemo1ViewId); // activate view 1
Also find these links very useful.Getting a pointer to AppUI
Getting a Pointer to a View
Edit :
CYourApplicationAppUi* appui = (static_cast<CYourApplicationAppUi*>(iEikonEnv>AppUi()));
// Get the view you want CSomeView* view = (CSomeView*)appui->View(TUid::Uid(ESomeViewId))

Resources