Trouble binding updated properties to view
Hi Guys,
I have the following code which i want to to populate a combobox based upon the selected item of a treeview.
as depending on what node is chosen will populate the combobox with a different list of report levels.
the combobox is within a user control and i am trying to bind to a dependency property ReportLevel i have in my MainViewModel. if i set the value of the combobox its fine but i want to be able to update it whenever a user choses a different node on the tree.
this is my xaml
<UserControl x:Class="RTHM.ComboboxControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup- compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
xmlns:local ="clr-namespace:RTHM.ViewModels"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
ItemsSource="{Binding Path=Levels}"
IsSynchronizedWithCurrentItem="True"
DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedLevel, Mode=TwoWay}"
IsEnabled="{Binding IsEnabled}"/>
my code behind:
public partial class ComboboxControl1 : UserControl
public ComboboxControl1()
InitializeComponent();
DataContext = new MainViewModel();and in my viewmodelprivate ObservableCollection<ReportLevel> _levels;
public ObservableCollection<ReportLevel> Levels
get
return _levels;
set
_levels = value;
NotifyPropertyChanged("Levels");
}my MainViewModel inherits from a base class which has INotifyProperty changed and an implementationpublic class ViewModelBase : INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
protected void NotifyPropertyChanged(string propertyName)
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}any Ideas on how to update the Comboboxs ItemSource dynamically?Thanks in advance
They are presumably in the same datacontext?
Hmmmm
I wonder if you should really have that combo in a separate usercontrol.
Anyhow.
You've Bound the treeview to a collection of whatever that is bound to.
( You haven't explained a bunch of relevant stuff here mate )
Call that a collection of trees.
A tree presumably has a collection of reportlevels in it.
Vaguely like
public class tree()
public observablecollection<reportlevel> reportlevels [get;set;}
But maybe with some propertychange stuff.
Bind selecteditem of the treeview to selectedtree in your viewmodel.
Bind itemssource of the combo to selectedtree.reportlevels.
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML
Similar Messages
-
Update a maintenance view.
Hi ,
I want to update a maintenance view.
Data is coming from a text file which i am uplaoding.
Which function module should I use to update the maintenence view.
Thanks,
Ram.hi,
use this FM VIEW_MAINTENANCE_CALL
hope it will work.
use this code .
&----& Report Z_TEST_PROGRAM&--*& Demo program for blog http://abap-explorer.blogspot.com/&--
REPORT z_test_program.DATA:i_sellist TYPE STANDARD TABLE OF vimsellist INITIAL SIZE 0,i_header TYPE STANDARD TABLE OF vimdesc INITIAL SIZE 0,i_namtab TYPE STANDARD TABLE OF vimnamtab INITIAL SIZE 0.PARAMETERS: p_view TYPE viewname MATCHCODE OBJECT viewmaint OBLIGATORY.AT SELECTION-SCREEN.CALL FUNCTION 'VIEW_GET_DDIC_INFO' EXPORTING viewname = p_view VARIANT_FOR_SELECTION = ' ' TABLES sellist = i_sellist x_header = i_header x_namtab = i_namtabEXCEPTIONS no_tvdir_entry = 1 table_not_found = 2 OTHERS = 3 .IF sy-subrc <> 0. data: l_message type NATXT. CONCATENATE 'Table/View' p_view INTO l_message SEPARATED BY space. MESSAGE e001(00) WITH l_message ' not in the Dictonary'.ENDIF.START-OF-SELECTION.CALL FUNCTION 'VIEW_MAINTENANCE_CALL' EXPORTING action = 'S' view_name = p_viewEXCEPTIONS client_reference = 1 foreign_lock = 2 invalid_action = 3 no_clientindependent_auth = 4 no_database_function = 5 no_editor_function = 6 no_show_auth = 7 no_tvdir_entry = 8 no_upd_auth = 9 only_show_allowed = 10 system_failure = 11 unknown_field_in_dba_sellist = 12 view_not_found = 13 maintenance_prohibited = 14 OTHERS = 15 .IF sy-subrc <> 0. MESSAGE i001(00) WITH 'Error while calling the view'. LEAVE LIST-PROCESSING.ENDIF.
Edited by: katigiri linganna on Apr 20, 2009 4:31 PM -
Select from table and Update to a view
Hi,
Can anybody let me if this is possible.
I have a Master(single record)/detail(multi record) form. I would want to query/select the details from the base table but when I update/delete I would want to update/delete the details to a view.
Is this doable?
Thanks
KAvithaHi Kavitha,
Solution 1 :-
Why cann't you trap the ON-TRIGGERS (like ON-INSERT /On-update/ON-DELETE) of that block and put your piece of code to update/delete the view.
SOlution 2 (I didn't try this ,so please try)
I am not sure whether it will help you but can try !!Sorry if not working and let me know if you have a solution
Create a package with Insert /Update/Delete sub procedures which does DML on view (as per ur requirement).
Call this Procedure on DML Target Name of Advanced Database .
Regards -
Query and update a table/view
What is the best & fastest way to do this?
1) Put up a query input region for users to enter parameters.
2) Run a query on a table/view using those parameters.
3) Allow the output in (2) to be modified by user (multiple rows at a time) and then Submit the updates back to update th table/view
I can do (1) and (2) easily. How can I do (3)?
ThanksMake a report on the table. Go to the definition of
the report column and change the "Display As" type to
text field or select list or whcih ever is
applicable. Write a process on submit to insert these
values back to the table. You will have control over
which columns the user can modify.Thats a good idea and I was able to start on it. But how can my after submit process tell which rows to modify? i.e. what will my after submit process look like?
for rec in (....)
loop
update my_table set
end loop;
Help? Thanks -
How To Update A Table View From Client Side !!!!
Hi I would like to update a table view from the Client Side. So that the user can keep updating the relevent data on the client and when they have finally finished they can press Save so the entire page is then sent to the Server.
Does anyone know how to do this, I guess u have to use the EPCM, I have just started on it and would really appreciate some Help.
Thanks,
Emmanuel.This is what I found :-
There are a couple of ways to approach this.
1) load the excel spreadsheet into the database "as is". You can use interMedia
text to convert the .xls file into a .htm file (HTML) or use iFS (see
http://technet.oracle.com/
for
more info on that) to parse it as well. InterMedia text will convert your XLS
spreadsheet into a big HTML table (easy to parse out what you need at that
point)
2) Using OLE automation, a program you write can interact with Excel, request
data from a spreadsheet, and insert it. Oracle Forms is capable of doing this
for example as is other languages environments. In this fashion, you can remove
the "manual" and "sqlldr" parts -- your program can automatically insert the
data.
3) You can write a VB script that uses ODBC or Oracle Objects for OLE (OO4O) in
Excel. This VB script would be able to put selected data from the spreadsheet
into the database. We would recommend OO4O. It provides an In-Process COM
Automation Server that provides a set of COM Automation interfaces/objects for
connecting to Oracle database servers, executing queries and managing the
results. OO4O is available from
http://technet.oracle.com -
True about updates through a view
hi frds
i just need the right answer for the choices mentioned below with explanation
plz help me
What is true about updates through a view?
A. You cannot update a view with group functions.
B. When you update a view group functions are automatically computed.
C. When you update a view only the constraints on the underlying table will be in effect.
D. When you update a view the constraints on the views always override the constraints on the underlying tables.And a very tricky only it is.
Peter, you are correct that view constraints are not enforced in the sense of PKs and FKS, but there are two other view constraints that are enforced.
SQL> CREATE TABLE t AS
2 SELECT rownum id, object_name
3 FROM all_objects
4 WHERE rownum < 11;
Table created.
SQL> CREATE VIEW t_read AS
2 SELECT * FROM t
3 WITH READ ONLY;
View created.
SQL> CREATE VIEW t_check AS
2 SELECT * FROM t
3 WHERE mod(id,2) = 0
4 WITH CHECK OPTION;
View created.
SQL> CREATE VIEW t_nocheck AS
2 SELECT * FROM t
3 WHERE MOD(id, 2) = 0;
View created.
SQL> INSERT INTO t_read VALUES (100, 'READ ONLY');
INSERT INTO t_read VALUES (100, 'READ ONLY')
ERROR at line 1:
ORA-01733: virtual column not allowed here
SQL> INSERT INTO t_check VALUES (100, 'EVEN ID');
1 row created.
SQL> INSERT INTO t_check VALUES (101, 'ODD ID');
INSERT INTO t_check VALUES (101, 'ODD ID')
ERROR at line 1:
ORA-01402: view WITH CHECK OPTION where-clause violation
SQL> INSERT INTO t_nocheck VALUES(100, 'EVEN ID');
1 row created.
SQL> INSERT INTO t_nocheck VALUES(101, 'ODD ID');
1 row created.
SQL> UPDATE t_check SET id = 201
2 WHERE id = 2;
UPDATE t_check SET id = 201
ERROR at line 1:
ORA-01402: view WITH CHECK OPTION where-clause violation
SQL> UPDATE t_nocheck SET id = 201
2 WHERE id = 2;
1 row updated.The WITH READ ONLY constraint bars all changes to the view. The WITH CHECK OPTION stops any changes that would make the record invisible to the view. It is essentially a CHECK constraint on the view.
John -
Having trouble with updating some of my apps. You Tube esp.
Apps are tied to the account that downloaded the apps, not to the device that they are on, so any apps that your son downloaded can only be updated via his account and vice versa.
You can sign in and out of accounts via Settings > Store and tapping the account on the right-hand side. If you no longer use the apps that your son downloaded then you could delete them (or if they are free apps you could delete and then download them under you account) - you could always reset to factory settings (Settings > General > Reset > Erase All Content And Setting) and reload just your apps from scratch (apps can be re-downloaded for free : http://support.apple.com/kb/HT2519), which is a 'cleaner' way of doing it -
How to use FM VIEW_MAINTENANCE_NO_DIALOG for updating values in views
Hi all,
I got a scenario to update the maintainenace view V_T001S based on the user inputs through a program.
I'm thinking to use this FM VIEW_MAINTENANCE_NO_DIALOG , but im getting lot of errors.
Please let me know if you have any other solutions for this scenario.
Thanks in Advance.
Best regards,
Sekhar.
Resolved.. thanks
Edited by: Chandrasekhar Raju on Mar 29, 2011 6:55 AMHi,
you could use Dynamic SQL /Execute immediate to run DDL from a stored procedure.
http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/11_dynam.htm
Could you please tell why do you want to create a materialized view in stored procedure ?
How frequently you will runt this procedure . It would is better to create a MV once and use it.
thanks -
Set PDF Document Properties Initial View by Acrobat SDK with C#
Hi,
Here am trying to set the PDF document initial view by the Acrobat SDK with C#.
Here I am show my screen shot which properties I want to set.
For this process I am referred Acrobat SDK and also following Adobe forums they also asked similar question.
http://forums.adobe.com/message/3866361
http://forums.adobe.com/message/4803264
http://livedocs.adobe.com/acrobat_sdk
And also I am used following C# code
Acrobat.AcroPDDocClass doc = new Acrobat.AcroPDDocClass();
doc.Open(@"D:\..\sap.pdf");
doc.SetOpenInfo(1,1,"Fit Width");
doc.SetPageMode(3);
doc.Save(1, @"D:\..\sap.pdf");
doc.Close();
From the above code {doc.SetPageMode(3);} is working for set the page mode.
But I am having problem in following code {doc.SetOpenInfo(1,1,"Fit Width");}
Because it won’t work I do’t known, and there is no clear samples in the SDK reference document.
So please give advice and clear sample code/syntax to meet above needs which are marked in red box.
Document Properties - > Intial View
Document Option
Show: Bookmarks Panel and Page
Page Layout: Continuous
Magnification: Fit Width
Window Options
Show : Document Title
Regards,
Thirusanguraja Venkatesanok thank you Test Screen
I will try and let you know if i am done by automation .
Regard,
Thirusanguraja Venkatesan -
Given the following view table that i created
CREATE OR REPLACE VIEW PO_DETAIL_VIEW ( PAYLOADID,
ORDERNUMBER, LINENUMBER, SHIPPEDITEMQTY, COST,
ORDEREDITEMQTY, ACTION, UOM, DESCRIPTION,
SKU, STATUS, CURRENCY, PLANNEDRECEIPTDATETIME
) AS select extractValue(value(p),'/OrderMessage/MessageHeader/@payloadId'),
extractValue(value(p),'/OrderMessage/Order/@orderNumber'),
extractvalue(value(i),'/OrderLine/@lineNumber'),
extractvalue(value(i),'/OrderLine/@shippedItemQty'),
extractvalue(value(i),'/OrderLine/@cost'),
extractvalue(value(i),'/OrderLine/@orderedItemQty'),
extractvalue(value(i),'/OrderLine/@action'),
extractvalue(value(i),'/OrderLine/@uom'),
extractvalue(value(i),'/OrderLine/@description'),
extractvalue(value(i),'/OrderLine/@sku'),
extractvalue(value(i),'/OrderLine/@status'),
extractvalue(value(i),'/OrderLine/@currency'),
extractvalue(value(i),'/OrderLine/@plannedReceiptDateTime')
from PURCHASEORDER p, table(xmlsequence(extract(value(p),'/OrderMessage/Order/OrderLine'))) i
when i executed the following command:
UPDATE po_detail_view
SET ORDERNUMBER = '500001' where PAYLOADID='1'
I get end of file error which disconnect me from my oracle database.
but when i update my another view table it is fine.
CREATE OR REPLACE VIEW PO_MASTER_VIEW ( VERSION,
PAYLOADID, TIMESTAMP, SENDERNAME, SENDERCOMPONENT,
DOCUMENTREFERENCEID, SINGLETRANSACTION, INDEX0, INDEX1,
INDEX2, INDEX3, CLOSED, ORDERNUMBER,
ORDERTYPE, UNIQUEBUSINESSKEY, HANDLINGCODE, BUYERID,
BUYERPARTYNAME, BUYERROLE ) AS select extractValue(value(p),'/OrderMessage/MessageHeader/@version'),
extractValue(value(p),'/OrderMessage/MessageHeader/@payloadId'),
extractValue(value(p),'/OrderMessage/MessageHeader/@timeStamp'),
extractValue(value(p),'/OrderMessage/MessageHeader/@senderName'),
extractValue(value(p),'/OrderMessage/MessageHeader/@senderComponent'),
extractValue(value(p),'/OrderMessage/MessageHeader/@documentReferenceId'),
extractValue(value(p),'/OrderMessage/MessageHeader/@singleTransaction'),
extractValue(value(p),'/OrderMessage/MessageHeader/HeaderIndexedAttribute[1]/@content'),
extractValue(value(p),'/OrderMessage/MessageHeader/HeaderIndexedAttribute[2]/@content'),
extractValue(value(p),'/OrderMessage/MessageHeader/HeaderIndexedAttribute[3]/@content'),
extractValue(value(p),'/OrderMessage/MessageHeader/HeaderIndexedAttribute[4]/@content'),
extractValue(value(p),'/OrderMessage/Order/@closed'),
extractValue(value(p),'/OrderMessage/Order/@orderNumber'),
extractValue(value(p),'/OrderMessage/Order/@orderType'),
extractValue(value(p),'/OrderMessage/Order/@uniqueBusinessKey'),
extractValue(value(p),'/OrderMessage/Order/@handlingCode'),
extractValue(value(p),'/OrderMessage/Order/Buyer/@Id'),
extractValue(value(p),'/OrderMessage/Order/Buyer/@PartyName'),
extractValue(value(p),'/OrderMessage/Order/Buyer/@Role')
from PURCHASEORDER p
UPDATE po_master_view
SET VERSION = '2.0' where PAYLOADID='1'
i can see that the problem lies with
table(xmlsequence(extract(value(p),'/OrderMessage/Order/OrderLine'))) i
is there any better way or solutions to work ard with it?
Thanks.Thanks Mark,
That's what i suspected the case, will log the itar later when i am free.
Actually my main issue is that I am using forms 9i to view and edit the view tables that are based on the xml schema. Forms is giving me problem in accessing complicating views.
I think my only solution is to:
1)create a custom table updated by the view table.
2)Create my form block based on custom table.
3)update the xml data using updateXML() from the custom table. -
Dynamically Binding to Dynamically Create View
I tried to copy the code of Dynamically Binding to Dynamically Create View object but something is wrong because when I am debbuging it doesnt work after the sentence vo.executeQuery();
I suspect that the reason could be how I created the view..
Your code is running well but not mine.
It shows this error
JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
null
I dont know why because the code is the same.
How did you create the objet view ?
Could you help me?I'd recommend checking out this article on Debugging ADF Applications:
http://www.oracle.com/technology/products/jdev/tips/muench/debugger/index.html
and then reporting here the full stack trace using the tips described in that article. -
How to share a bind variable across multiple view objects?
Hi, Can someone tell me if it's possible to share a bind variable among multiple view objects within an application module? My web page displays data from different VOs on different regions. But all data should be controlled by the same bind variable, which appears in all queries. How can I achieve this?
Please help.Best to state your JDev version, and technology stack (eg. ADF BC) when posting.
I can think of 2 approaches.
1) Create a parent VO based on SELECT :bindVar FROM dual, then create links between your other VOs and the parent
2) Create a AM client interface method that programatically sets the bind variable in each VO.
Can you specify your use case? This one tends to come up when discussing effective from/to dated queries.
CM. -
Declaratively set the value of a bind parameter in a view query
Can I declaratively set that I want the value of the bind parameter in the view query to be the value of a specific field in the current row of a specific iterator in my data bindings? Thanks :D
user11976105 wrote:
Hm I guess I should mention I'm doing the retrieval in Java, using a ValueChangeListenerIn this case, you will still need to bind an ExecuteWithParams action to your page definition and execute it from your ValueChangeListener after supplying its named data.
In the code spinet, the new value from the ValueChangeEvent is passed to the bind variable.
public void yourValidChangeListener(ValueChangeEvent valueChangeEvent) {
// get the ExecuteWithParameters operation binding from the bindings
OperationBinding executeWithParameters = ADFUtils.findOperation("yourExecuteWithParametersBindingId");
// setup bind variable using the new value from the valueChangeEvent
executeWithParameters.getParamsMap().put("yourParameterId", valueChangeEvent.getNewValue());
// execute
executeWithParameters.execute();
// check for errors
if(executeWithParameters.getErrors().size() != 0) {
// error(s) occured
} -
I have trouble while update iphoto, i can install new version of i photo
i have trouble while update iphoto, i can install new version of i photo
What's the problem, exactly?
-
HT5730 Having trouble to update to 10.8.4
I am having trouble to update to 10.8.4 since the time it was required i think 4 months ago and until today I am not able to update it.
Steps I am following:
Clicking on App logo then software update
iTunes opens and i go for the updates and update
It asks me to Restart, I do it and then when it restarts,
iTunes main page opens and i can still see 1 update available, when I check the update I still see the same update is required and on and on again.
Please help me what to do. I am using MacBook Air, Processor 1.7 GHz Intel Core i5 Memory 4 GB 1333 MHz DDR3
Thanks
GebranYou cannot upgrade to Mountain Lion from iTunes. Do the following:
Give this a try:
Repair the Hard Drive and Permissions - Lion/Mountain Lion
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
Repair
When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu. Select Restart from the Apple menu.
After this is completed download and install 10.8.4 Mountain Lion Update v10.8.4 (Combo).
Maybe you are looking for
-
How to export in pdf format a book including the front and back covers?
I am trying to save in pdf format a book created in lightroom but unfortunately the saved file contains only the internal pages but not the covers. Is maybe there any setting to do? Thanks bye, Alberto
-
10.4.6 - delayed_ack = 3 ??
For people familiar with changing the net.inet.tcp.delayed_ack setting from 1 (default) to 0 for better SMB performance, does anyone know what the new default value 3 corresponds to? I use SMB mounts constantly at work and so after the 10.4.6 install
-
Parallel execution of same program with different parameters.
Is it possible to start the same plsql routine parellelly from PLSQL. Begin prog1 1 1000 prog1 1001 2000 prog1 2001 3000 End; I mean to say something like in Unix where in you can prog1 1 1000 & prog1 1001 2000 & prog1 2001 3000 & Thanks.
-
Important files deleted.
Hi. I was planning to sell my macbook and i couldn't find the restore disk so i was trying to manually delete all the files. Well, apparently i deleted some important things, i couldn't find Disk Utility, and you know when you try to click "about thi
-
Greetings: I retired a few years ago. Used Pagemaker happily for about a decade. Now I would like to start using again. You can guess why. Problem is I have PM 7 on my old PC , but now not sure I can transfer to current PC. I might also want to upgra