Oracle apex dynamic action on button click - oracle

I have created Oracle apex dynamic action to create text fields dyanmically, but the event fires only once. That is only once the text fields get created.

Not sure i get what you are asking, but I can see to possible meanings:
You are using javascript to create new page items on each click, in which case I strongly advise against - the best practice would be to insert new rows into an interactive grid, which you can latter parse as a collection to do whatever you need
You still intend to create new items, look into the documentation of apex_items:
https://docs.oracle.com/cd/E14373_01/apirefs.32/e13369/apex_item.htm

Related

PL/SQL INSERT DATA TO TABLE IN ORACLE APEX

I created a blank page and inserted textfields and button which will serve as a form. I want to display the inserted data from user once the button save is clicked, and the data will also show on the interactive grid below the page. Please help me on this.
I'd suggest another approach: use the Wizard to create Report with a Form on a table. It will create an Interactive Report (and you'll use it to review data stored into a table) and a Form (you'll use to insert new records and to update/delete existing ones).
Apex does everything for you; you'll only have to make it pretty because it'll work "as is". With your approach, you'll have to program everything yourself.

Oracle Application Express empty edit page

I'm new to APEX. When I create pages in my app the edit pages that generate automatically work for some pages but not for others - they are blank except for the Create, Delete, Cancel buttons and the PK item (but that one's "Hidden"). There are no other items. I tried to add them manually but they don't connect to the respective rows - when I try to edit a row in the app it displays empty lines
Consequentially, I also can't delete any rows. I tried to compare everything in the settings of pages that have working edit pages but nothing worked
From my point of view, the simplest option is to create either
a form on a table with report whose wizard will create
an interactive report you'd use to view data; enable you to modify existing records using the "edit" icon at the beginning of each row; create new records using the Create button
a form used to modify and create new records
a tabular form (or an interactive grid) that enables you do do everything (insert, update delete) on the same page
If you create a form by yourself, you should create required processes which do different actions. I'm lazy to do it manually, so I always let the Wizard do the dirty job.
From your description, it seems that you created a form, included several items, possibly set them to be database items, but Apex doesn't know how to retrieve existing records (something like execute query in Oracle Forms). Therefore, try to use one of options I suggested and see how they behave.

Auto Populate ADF Form from ADF Table

I have an ADF table which has to populate a form after redirecting to a new page.
Basically I have to implement the Edit functionality for a record selected in the table.
I have made the following iterator bindings to the fields but am not sure of how the values will be fetched from the database. I am unable to debug the bindings as the page does not render when redirected to.
Here is a snippet of the pageDef created
<attributeValues id="sedol" IterBinding="findD1ByCaIdIter">
<AttrNames>
<Item Value="sedol"/>
</AttrNames>
</attributeValues>
Any help/tutorial/guide would be much appreciated
Hopefully you are using a data control. If so, then use the data control to populate the table. Make sure to turn on single row selection.
Then on the Edit page, add the same data control as a form. ADF's built-in row concurrency will set the selected table row to be the "current row" in the iterator and bound VO Rowset. Then, when the Edit page is displayed, it will retrieve the "current row" from the iterator and it should be the selected row from the table.
Since you seem to be new to ADF, I suggest you learn a bit more, here, here and you can try to google "oracle adf table and form edit" -> some ideas here, here, here.
Basic info like what is your data source (ADF BC or JPA) and are you familiar with ADF Data Controls and what version of ADF are you using are very helpful with questions like these.
Add a column in table in the end. drop on button (ADFfaces) and in its actionlistener add the following code:
public void editData() {
DCBindingContainer contxt = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter = contxt.findIteratorBinding("TestView1Iterator");
ViewObject testVo = iter.getViewObject();
Row selectedRow = testVo.getCurrentRow();
}

Why is my Oracle APEX DML Form stuck in edit mode and not going back to create mode?

I have created a page based on "Form & Report" template. So there is the Report page on which there is the create button. That create button leads to the form page which contains.
It is pretty simple. I don't know if there is a cache memory not emptying itself or if there is a setting that I have not properly set.
When I want to create a new database record, Oracle Apex behaves as if I asked it to update a record (though it still presents me with empty text fields).
Below the image of what's happening.
Create button of the Report
Buttons for edit are shown when I click the create button
Those edit buttons are shown instead of the buttons below => This means that the Apex software is behaving like I asked to edit a record not to insert a record.
Why is this happening?
You need to take a look at your create button. Is it passing a value to the form? If so, you probably don't want that. Is it clearing the cache of the form? If not, you probably want to clear it.
Also, on the form page take a look at your processes.. specifically the Automated Row Fetch (ARF) process.. what's the primary key that this process is using?
Also, take a look at the conditions for each button on your form. For the delete/save buttons you likely want a condition type of "value of item / column in expression 1 Is NOT NULL".
For your create button you would want the opposite.. "value of item /... IS NULL".
In both cases for the expression 1 you'd want to use the item that your ARF is leveraging.
#Bloomberg58 if you used the wizard that should not have anyway try to validate the create button in report page and the server-side validation of create and save button in form page

How to add a new item to a dropdownlist in a create form in MVC 3?

I have a Form to create a new model object and persist it. That form is displayed in a lightbox or popup.
Some fields are dropdownlist showing related info that lives in another table (other model object related to the main model).
What I need to achieve is without leaving the creation form, create a new item of the related type and update the DropDownList in order to continue filling fields and finaly submit the form.
I have done this in winforms but not really sure which is the best approach in MVC 3:
Trigger another popup with a small form?
Use some kind of editable dropdownlist?
Place a small hidden form right next/after the DDL to allow entering the info to create an item in DDL (and to DB also)?
What do you thing is the best option?
Thanks!
There is no editable dropdown list in HTML. There are some toolkits that simulate it, but in general these are clumbsy and really complex. It's a lot easier to stick with basic controls.
You would proably do best to have a small + sign next to the field, and then popup an editing field that inserts the element into the combobox and sends it to the controller via ajax to add to the database.
An alternative to a second pop up is having a toggle add button. When toggled, then show a small area where you can enter the name. Using ajax, save the name, and then refresh your dropdown. This works well if you only have a few attributes to fill in.

Resources