There are two dropdowns and one is dependent on other. All things are working well but after changing the value of first dropdown, i want to clear the bootstrap table data and then after changing the value of dependent dropdown, load new data.
Related
I created a report and a form separately rather than creating a "report with form" in my Oracle Apex application. Because of this there are no update buttons that appear on the left of every row in the report like it does when creating "report with form". How can I add these buttons such that I can use same form, which I am currently using just to create new records, to also update records?
I am assuming the report is in Interactive Report type.
Those are the ones which are normally created for report with form.
In which case if you go under the reports attributes the first one is Link,
by default it should be set to Exclude Link column. You should set it to Link to Custom Target, then define the link to go to your page and set the Primary key item.
And on your form page you also need to set an After Header process to fetch the row and fill the page items based on the filled Primary key. Or you can do something custom here, whatever floats your boat.
I've been designing a new app in ApEx 19.1 and one of the form/reports which I have created will not save a specific column when I click CREATE (SQL Insert action). Debug data shows that the data is in the session state when the CREATE request is being processed. I have verified that the value is not inserted with the other columns by querying the table in SQL Developer.
When I click to edit the item, the page item is blank and the value is not in the session state. I can then choose a value, and it saves correctly (SQL Update action).
I have several other 19.1 form/reports in the app which do not have this problem.
Details:
-ApEx 19.1
-Modal Form page on an Interactive Report
-New Form Region, not legacy DML setup
-DATETIME column type, Date Picker item type
-Required column, Value Required = Yes (and errors occur correctly if left blank)
-The biggest difference between this page and others is that rather than navigating directly from the report page to this form dialog on Create, there is a different modal dialog form that must be filled, and then the user navigates to the form in question.
All of the other fields insert data correctly to their corresponding columns, and I haven't changed any of the Source settings after creation, so I'm not sure what is causing the issue. I've even deleted the pages and rebuilt them with the same results.
The issue had nothing to do with ApEx, and everything to do with poor DB & app design.
There was an insert trigger on the table which inserted a value to the column in question from an application item which had not been set.
I'll definitely clear that up to avoid future confusion.
I am trying to set a default selected item in a semantic-ui-react dropdown. If I select an item from the dropdown, when I reopen the dropdown it opens on the correct item. However, this item is persisted, and when I refresh the page, the correct items are displayed on the dropdown, but it does not open on the correct item.
Please advise.
Matt, it sounds like you are only using the internal component state. Whatever your components initialize with, they will always start that same way. Your entire React application works this way. If you are expecting your data to be persistent, it needs to be stored somewhere. When you refresh you are starting over again. If the state of your application is not being put elsewhere, you lose that state every single time you refresh because the only copy of state is in your client browser.
Basically you currently only have a frontend application that is not storing data anywhere. Depending on your needs, you could do this in a lot of different ways. A REST API. A GraphQL API. One simple way to accomplish this if you are just creating a simple website would be to use a headless CMS. That will give you a database to store your application data. There are a lot of interesting ones out there that you can explore based on your needs.
I am developing an app where there is a huge list of items, loaded from the server by ember-data. This lists can be filtered by different fields, like date.
When you load this route for the first time, it is filtered by date: it only loads the current year items. However, the user can change those filters.
When you transition to another route and come back, the visible filters are the same as when you left, ember seems to remember them. However, since the model is loaded by the route before the controller exists and the filters are available, it loads all the current year ones.
Therefore, the result is that the user is seeing a list of all current-year items, and a set of filters that may not match.
What I would love is for the route to not reload the model if it is already available, so to save time and network; but any solution would be appreciated.
You could move the GET to the controller which will not be regenerated on route change, if the controller is already present all your previous models and filters are still present
Get the last selected filter options from the controller in beforeModel:... or model:... method to load your data via query (if possible)
If you´re sure all the data is already loaded use peekRecords to avoid a new network request
How do bind a DropLink using a custom dataprovider?
More info:
I am trying to build a product catalogue site using Sitecore. Each product in the sitecore content tree can have a star rating and short text review attached to it (which will be linked to a user extended with a profile provider but that is another question).
I am planning to store the review information in an external database and reference it using a custom dataprovider. I have downloaded the NorthwindDataProvider from the Shared Source (here) and have altered it to use a table which contains the rating, text and a uniqueidentifier field to store the ID of the product from in sitecore the review is attached to.
The template field is a droplink and the datasource is set to the products in the catalogue.
When I edit a review in the custom dataprovider using the sitecore content editor, the droplink states 'Value not in selection list' even if I select one of the populated products and save using sitecore.
It is saving the ID in the database but if I look at the raw value it displays the id without the curly brackets. Working droplink fields' raw values appear to contain the brackets.
To create a review, I am using a jquery post to a webservice which writes to the database using an external datacontext. Should I be using some Sitecore API to use the custom dataprovider instead?
Any information using custom dataproviders would be helpful. The documentation I've been able to find has all stated what can be done but I'm struggling to find actual implementation.
So the first thing is that you have a template field and you're using droplink which is going to store the guid for the item selected. I'm not quite clear on whether or not you're pointing the datasource to a Sitecore item or not.. but that's essential if you're using droplink. Here's what I would suggest instead for the most straight forward way to do this:
Create a template that you add fields to handle the logic dealing with your catalog items. How you do that is your choice and Sitecore doesn't care since its only going to deal with the item and all it cares about is finding an item... you write business logic to manipulate the external data.
Once you have a folder that stores your catalog items, you could easily write a script to be triggered by the Rules engine in Sitecore or a Sitecore task that runs regularly to get your catalog items to add/update or remove the corresponding list of Sitecore items.
Also, another option that is more complex to implement, but if you have multiple data sources on your site, is a valid approach, is to use an object framework (like the Entity framework) as a data object layer that allows you to create and populate common objects with from any data source.
Hope this is helpful!