I'm building Sitecore sheer UI application. The main layout is aspx page NOT XAML, which contains a grid. I added a dropdown list as a ribbon button. When dropdown list changes, it must filter the grid source based on the selected value in dropdown.
When dropdown list changes, my custom command will trigger, but in the command I can't access my grid control so that I can do a filter. So my question is how can I call a method inside my aspx page from command class?
From your post I understand you have build an interface(.aspx page) which opens when user clicks dropdown value from the ribbon.
If this is the case then you can pass dropdown value in aspx page using querystring from your command file
In command file add following code
In execute method retrieve clicked value from CommandContext context:
Item item = context.Items[0];
In run method user SheerResponse to open aspx file:
UrlString urlString = new UrlString("youraspxpage.aspx?id="+(Dropdownvalue));
SheerResponse.ShowModalDialog(urlString.ToString());
In aspx file add following code to access which option you have selected from the
dropdown:
In page_load method access dropdown value from querystring, retrieve dropdown value and load grid:
string dropdownvalue= (Request.QueryString["id"]);
Let me know if the case is different.
Thx.
Related
I am using APEX 21.1. I have a report and a form. The form is dialog And is for creating and editing DEPT table's data. The report for displaying the same table's data. I should be able to open a page in a new tab after the dialog closes and the request was CREATE or SAVE. If the request is DELETE, the page should not open. The code for opening a new page in a new tab is in the report page's Dialog closed dynamic action. For example, run the report> edit a record> the click Apply Changes> the dialog is closed> the page is opened in a new tab. That was case one. Case 2: instead of clicking Apply changes, click delete to delete the record> the dialog closes> nothing happens.
ws= ESLAM_WS
un= forhelp
pwd= Forhelppwd$
app= Help
pages= 2 and 3
Not sure if you can use REQUEST for that. Check the documentation - 2.7.2.27.2 ... The value of REQUEST is available during each phase of the Accept processing. Once an application branches to a different page then REQUEST is set to NULL. So if you perform a DELETE request on the dialog, then the report will not know about that request value if the dialog page is closed. You could set a page item to that request value in the dialog page, return it to the calling page and have your dynamic action listen on change of that item.
So you'd create a page item P3_REQUEST and a process in the dialog page before the "Close Dialog" process to set that item with the request :P3_REQUEST := :REQUEST. Then use the dialog return item attribute to return that value. Create another item in the calling page and a set value dynamic action to set it's value with the request value returned. Then set a client-side condition for the DA that calls the new page in new tab.
I have created a page item P3_REQUEST and a process in the dialog page before the "Close Dialog" process to set that item with the request :P3_REQUEST := :REQUEST; and used the dialog return item attribute to return that value. And created another item in the calling page and a set value dynamic action to set it's value with the request value returned. Then set a client-side condition for the DA that calls the new page in new tab. Your answer was very helpful. Thanks.
I have made a region containing 2 display only items and a button.
The button performs some dynamic action (execute pl/sql query) and the page is refreshed every time the button is pressed (submit page action) .
Is there any way that on click of the button only that particular region gets refreshed instead of the whole page?
Also for the display only items, lets say
item_label ==> item_display_value
how to add this (==>) symbol in between?
If the page is submitted, then it will refresh completely - that is how apex works. But if a submit is not needed, you can add an action of "refresh" to the dynamic action and remove the submit. Make sure the "Behaviour > Action" property of the button is set to "Defined by dynamic action".
Note that not all region types support refresh, but all report types do.
I have a table in retool. I've added an "action" column with buttons and renamed them "edit". What I would like to do on click of the action button is to open a modal with the data in the row populated. A user should be able to see the values of the row, edit them and when he clicks "submit" it will send an update API call for that row's unique id.
We’re working on some new docs for modal components, but until then here’s what you can do:
Drag a modal component onto your canvas. It’s going to appear as a button that opens a model, but don’t worry about that just yet
Create a Javascript query in the query editor that opens the modal. If we’re working with the default names, your query would be modal1.open()
Configure the action button in your table to run that JS query on click
That’s a quick way to open a modal through an action button. In terms of what’s in that modal, you can drag any components you want and reference table properties. So if you wanted to display a user’s email, you could drag a text component into the model and set its value to table1.selectedRow.data.email.
The last thing to deal with is the button, which you probably don’t want since you’re opening the modal via action buttons. You can hide it by clicking on it, heading to the inspector in the right sidebar, and scrolling down to the “display” settings. Just put true into the “Hide when true” field and the button won’t show.
hello stack overflow family this is my first post.
we are facing same issue today so i used one trick for opening a modal in action, i run one query that query name is model_open and in success event i select modal open and this query is triggered in Action edit option ,
i hope my first post help you ... :)
I am using Oracle APEX to build an interactive report, in the edit page, there is a display only field called update time and the value is the last updated time. When I click submit page, I want to update this field to the current sysdate.
What I did is that I created a dynamic action which fires when page uploaded. The action changes the update time field to the current sysdate. However, this doesn't work. I am wondering if there is any other ways to do this? Thanks!
If you have a unique column in your table, you can create a procedure in page processing section and assign it to the submit page button. When you click submit button, procedure will update the update time field.
To make a page processing:
Go to Process section and click create button
Select PL/SQL Code as Process Type
Give a name to your Process
Write your procedure in field. You can assign a fields value like: update table set update_time = sysdate where ID = :P3_ID
You can define success or error message
Define your button to When Button Pressed section
Hope this helps.
I'm trying to display personalized content on a page IF I have clicked on a specific link on a specific page.
Then, on a page that will contain personalization rules, a piece of personalized content will display, but only if I clicked specific link on a specific page If so, then display a piece of content.
I know there is a way to do this using query string parameters, but this would involve some coding. I don't want to do that, I want to see if there is something out of the box that will let me do this.