I have an interesting situation. Working on an 11.1.1.3 ADF Application.
I have an editable table, which uses an LOV. The respective LOV has a maintenance page, where we populate a database table with data that the LOV uses.
If i'm inserting new records into the LOV Database Table, the corresponding LOV does not get those changes. However, if there is an UPDATE of existing records, it seems to work ok.
It appears the iterator is not updating. Because if i start up a new application session in a new browser window, i'll see the new changes.
The LOV doesn't have it's own iterator in the Page Bindings (Its using a View Accessor in my view object), so i'm not sure how to tell the iterator to refresh or executeQuery()...
Thank you!
Right now, my only solution is this. I don't like it, but it works...
Exposed View Row Impl class, and included accessors on my Editable ADF Table's View Object. This way i have programmatic access to my accessors that run the LOV.
Then i located my view accessor, getter method. And told it to re-execute the query. Worked like a charm:
public RowSet getAllSmsModules() {
RowSet rs = (RowSet)getAttributeInternal(SMSMODULESALL);
rs.executeQuery();
return rs;
//return (RowSet)getAttributeInternal(ALLSMSMODULES);
}
Related
Normally, if we update an attribute in a View row, we can easily see the updated value in the Entity row as changes are propagated down the hierarchy.
My question is if we instead update an attribute on the Entity level, is there a way that we can get the new value on a current View row of a View object that was built using that Entity.
If you update an attribute on EO level, it will automatically update the VO attribute as well. It goes both ways.
Seeing you are asking this makes me think you tried it and it didn’t look like working. If that’s the case, you are probably having a Partial Refresh problem in your screen. You can try using a partialTrigger.
I have a jsff page inside a bounded task flow. It displays a table. Each row of table has an edit icon. on click of which a new jsff page opens containing the information of the selected row ready to be edited.
Here user can update and save the information and check the information back on the first page by clicking a Done button on second page.Pretty much simple.
The problem is I have some complex implementation due to which I should not update the row information through ADF way. I take the information entered by the user and pass it to plane java file. There in the plane java file I instantiate an AM and update the information through this AM.
The problem with this approach is that when I click the Done button to come back on table page to check the saved data, the data on the table is stale.
This seems as If the table is being updated outside the ADF framework and so it is not aware of the underlying the data change hence the ADF UI table is not synced with physical table automatically.
JDev : 11.1.1.7.11
Options tried : Upon click of Done button I tried to requery the VO of ADF table by
1) Clearing the VO cache row and repopulating it
2) Re executing the iterator binding
3) Re executing the iterator binding programatically.
Thanks
Hello I have a View Object "Validationerrortallygroupsview" In this VO I have a calculated attribute that is generated by a join in the query. The calculated attribute is RuleName1 (RULE_NAME alias).
Here is where I show the attributes:
The SQL query that backs this View Object has a join with another table and this join is what generates this extra RULE_NAME attribute:
The SQL Query tests fine and everything but when I go to my JSPX page to actually reference this attribute using EL, the new attribute doesn't show up in the variable.
I have a row variable that is simply used to iterate through the bindings for a table Control, ruleName1 is not an element that I can choose off of that variable, I can only choose the Attributes that were defined originally as part of the Entity:
Can you check the tree binding whether the attribute "RuleName1" is present or not ? If not , you may need to refresh the data control once and add it to attribute list of the tree binding .
Drag&Drop that property from your DataControl, or better the whole form/table in a clean page to see what is going on.
I have a class, DataBaseManager, that use EF 4.1 to access to data base. This class hava a method search that search information in the data base. The resume version is that:
public ObservableCollecion<Authors> searchAuthtors()
{
_Context.Authors.SqlQuery("select * from authors").ToList<Authors>();
ColectionAuthors = _Context.Authors.Local;
return ColectionAuthros;
}
Also, this class has a property, _colAuthors, public, that I use to link external classes with this data manager. The idea it's, in WPF, use this _colAuthors to binding a dataGrid.
Well, in my ViewModel, in which I have a property Authors, which I use to binding the dataGrid of the View, in the constructor I do this:
public myViewModel()
{
_dataManager = new DataBaseManager();
Authors = _dataManager.ColectionAuthors;
}
I have the view, with a dataGrid, a button to update the changes and a button to search authors.
If first I search Authors, if in the dataGrid I delete, add or modifed items and later I click the button to update changes, it's works fine, add, delete or update the information and if I search again, I can see the correct information.
However, if I don't do a first search, I only add a register, because I don't have in the dataGrid registers to modify or delete. Well, if I add register and I click the update button, the changes has not been saved in the data base.
I think that this is because the context.Authors.Local is not been "create" until I make a first search, so when I do Authors = _dataManager.ColectionAuthors; I can't add the element to local, so when I do the savechanges() there is no elements in local to save in the data base.
I am right? is there any way to add elements to the context before doing the first search?
Thanks.
Daimroc.
I have following requirement.
Display data in a table
Clicking on checkbox filter out currently displayed rows by some condition
Clicking on checkbox once again return data appearance to it's previous state
To achieve this I've ovverided method rowQualifies in my ViewObject which is simple SQL based view object to apply my custom filter logic.
When user clicks on checkbox I refresh view object data to apply filter
viewObject.setDoFiltering(true);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
viewObject.executeQuery();
It works perfectly, data set updates without interacting with database and my custom filter logic applies as well.
But when I need to cancel filter it wouldn't work because iterator doesn't contain anymore previous rows, and I can only load them from database but it means that I can lose my changes already made to view object rows.
So, when I do
viewObject.setDoFiltering(false);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
viewObject.executeQuery();
It will return me those rows that were displayed previous time.
If I do
viewObject.setDoFiltering(true);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES);
viewObject.executeQuery();
It will return me all rows, but I will lost my changes already made to view object rows.
My questions is how to avoid it? Maybe there is another way of doing this? Maybe it is possible to do something with RichTable to tell it how to filter rows in memory.
Any advices are warmly appricated!
I believe this can be done using ViewCriteria, to filter means to apply a ViewCriteria, and then disable it to view all your data