Access the modelReference value
If I add a modelReference to a command_button like in the following code:
<h:command_button id="b" label="Click" commandName="Click" modelReference="UserBean.name">
</h:command_button>and if I catch the request at the ApplicationHanlder like this:
if (formEvent.getCommandName().equals("Click")) {
UIComponent c = formEvent.getComponent();
String model = c.getModelReference();
treeId = ... //and so on
...So my question. Is it possible to get the "real" value of the modelReference. I mean if call the methode .getModelReference() I get the string "UserBean.name"! But I want to get the value!!!
Any Suggestions??
I thought, modelReference was replaced by valueRef (and maybe actionRef)
am i wrong?
if i am, when do i have to use which of the 3 attributes ?
Similar Messages
-
How can I access the Attribute Values from the Search Region
Hi all,
I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
I don't know how can I access the data from the Search Region.
Please Help.
Regards,
Ranjithyou could access the parameters entered in search region by the user as follows:
You can get handle to the value entered by the user using queryListener method in af:query.
You can intercept the values entered as described
public void onQueryList(QueryEvent queryEvent) {
// The generated QueryListener replaced by this method
//#{bindings.ImplicitViewCriteriaQuery.processQuery}
QueryDescriptor qdes = queryEvent.getDescriptor();
//get the name of the QueryCriteria
System.out.println("NAME "+qdes.getName());
List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
for ( Criterion c : searchList) {
if (c instanceof AttributeCriterion ) {
AttributeCriterion a = (AttributeCriterion) c;
a.getValues();
for ( Object o : a.getValues()){
System.out.println(o.toString());
//call default Query Event
invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
public void onQueryTable(QueryEvent queryEvent) {
// The generated QueryListener replaced by this method
//#{bindings.ImplicitViewCriteriaQuery.processQuery}
QueryDescriptor qdes = queryEvent.getDescriptor();
//get the name of the QueryCriteria
System.out.println("NAME "+qdes.getName());
invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
FacesContext fctx = FacesContext.getCurrentInstance();
ELContext elctx = fctx.getELContext();
ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
me.invoke(elctx, new Object[]{queryEvent});
Thanks,
Navaneeth -
To get the count of records and able to access the column value in a single
Hi
Is there any way to get the number of records in the query and access the column values
e.g
select count(*)
from
(SELECT department, COUNT(*) as "Number of employees"
FROM employees
WHERE salary > 25000
GROUP BY department ) a
This wil only get the Count, if i want to access each row from the inline view how can i do that.Your question is not clear.
Are you looking for total record count as well as count by department ?
Something like this?
SQL>
SQL> with temp as
2 (
3 select 1 dept ,10000 sal from dual union
4 select 1 dept ,25100 sal from dual union
5 select 1 dept ,30000 sal from dual union
6 select 1 dept ,40000 sal from dual union
7 select 2 dept ,10000 sal from dual union
8 select 2 dept ,25100 sal from dual union
9 select 2 dept ,30000 sal from dual union
10 select 2 dept ,40000 sal from dual )
11 select count(*) over( partition by 1 ) total_count,dept,
12 count(*) over(partition by dept) dept_cnt from temp
13 where sal>25000;
TOTAL_COUNT DEPT DEPT_CNT
6 1 3
6 1 3
6 1 3
6 2 3
6 2 3
6 2 3
6 rows selected
SQL> -
How to Access the Return Value of a Function
Hi,
How do I access the return value when calling an Oracle function from .NET using Oracle.DataAccess.Client? The function returns an integer of 0, 1 or 99.
Dim db_command_oracle As New OracleCommand()
db_command_oracle.Connection = db_connection_oracle
db_command_oracle.CommandType = CommandType.StoredProcedure
db_command_oracle.CommandText = "swsarsi.import_appointments"
Dim ret_value As New OracleParameter()
ret_value.OracleDbType = OracleDbType.Int32
ret_value.Direction = ParameterDirection.ReturnValue
ret_value.Size = 2
ret_value.OracleDbType = OracleDbType.Int32
db_command_oracle.Parameters.Add(ret_value)
Dim IN_student_id As New OracleParameter()
IN_student_id.OracleDbType = OracleDbType.Varchar2
IN_student_id.Direction = ParameterDirection.Input
IN_student_id.Size = 10
IN_student_id.Value = student_id
db_command_oracle.Parameters.Add(IN_student_id)
db_command_oracle.ExecuteNonQuery()
messagebox.show(ret_value) ?????Your ODP.NET code looks correct. What error are you seeing?
One thing that will definitely generate an error is that .NET message boxes require that strings be displayed. ret_value is a parameter object. You need to access its value and convert it to a string. At a minimum, you need to change that. -
Accessing the field values in different fields for calculation
Hi,
I am creating a report in which I have used breaks for grouping the customers by their category. I have used summary on the amount field to calculate the sum in the individual category and also for total amount.
Now, I also want to add an column which could display the percentages of individual contributions.
So, its like I have to write a query accessing the total percentage, categorized percentage and individual amount.
My question: How can I access the various fields values in the query of some other field specifically sum and total sum( because it shows the sum([Amount]) for category sum and total sum both)
-BOBJuserHmmm, I assume you are talking about WebIntelligence here...
Ok, so let's go: you can access every "object" in the report simply by it's name. Every cell contains either a constant value (e.g. some text) or a formula, the simplest one can be just the value of an "object" from the query.
There is a formula bar on top which you can activate, where you can easily see the content of a specific cell and also copy/paste the formula from the cell, as well as access all the built-in functions.
WebI has a built-in calculator which works very similar to a "micro" olap engine, so you can access every sort of aggregate (of a measure) via a correspondig formula, irrelevant in which cell you are using it.
Nevertheless, there is a "computation context" which depends on the place where you put the formula, e.g. summary row, detail row, etc.
for more info: see the manual )
hth, Walter -
Accessing the "outcome" value used in the navigation case
I would like to dynamically create a view based on the outcome value used in the navigation case.
How can I reference the outcome value from a backing bean?
For example assume that a page (mypage.faces) can be accessed via outcomeA and outcomeB. I want to know which outcome was used in the navigation case.Not without implementing a custom navigationhandler.
Alternatively you can also set the known outcome in a bean property and use it instead.
public String submit() {
this.outcome = "foo";
return this.outcome;
<h:outputText value="Outcome was: #{bean.outcome}" /> -
Cluster of control references: want to access the control value
I want to be able to save and set control values that are saved (XML). I have my controls on about 5 sub vi's. So I thought it'd be a good idea
to put all the control references in a cluster from the several sub vi's and save and read from one point.
I can get the cluster values (i.e. the references to the controls), but how to proceed from here? If somebody has a better idea it is very welcome.
I have also read Ben's nugget here, but it deals with references to controls in a cluster, not references to a reference of a control in a clusterThank you for reading that Nugget!
I use a GUI Controller in many apps so I can grab refs in sub-VI's.
Here are some screen shots of them in use.
The first "GUI Cnt" is a wrapper around the AE and invokes the action "Set Analysis mode" then another call let me get a cluster of the refs so I can choose based on the name.
This image shows what that action does.
THis is what happens when going into collection mode.
That is a small set of what you will find in my image gallery Feel free to browse (yes I know there is a lot of Olivia in there ) and ask if anything catches your interest.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
Accessing the email value from the iPhone AddressBook
Need some help getting the email value from the AddressBook. This is what I have so far ...
Used to open up the picker and limit to email only
-(void) browseButtonPressed:(id)sender
ABPeoplePickerNavigationController* controller = [[ABPeoplePickerNavigationController alloc] init];
controller.peoplePickerDelegate = self;
NSNumber* emailProp = [NSNumber numberWithInt:kABPersonEmailProperty];
controller.displayedProperties = [NSArray arrayWithObject:emailProp];
controller.navigationBar.tintColor = [UIColor blackColor];
[self presentModalViewController:controller animated:YES];
The delegate method in the same class
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person
property:(ABPropertyID)property
identifier:(ABMultiValueIdentifier)identifier
NSString *email = (NSString *)ABRecordCopyValue(person, kABPersonEmailProperty);
NSLog(@"selected person: %@", email);
[[peoplePicker parentViewController] dismissModalViewControllerAnimated:YES];
return NO;
The NSLog prints the following ...
selected person: <NSCFType: 0x1d81c0>
Any idea why it's not printing a string rather I am getting NSCFType ?Great Post. One of the few times that I was able to come to a conclusion about the code I need. Here is an example of the delegate method in reference to getting the email address.
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
ABMultiValueRef emails = ABRecordCopyValue(person, property);
CFStringRef email = ABMultiValueCopyValueAtIndex(emails, identifier);
NSLog( (NSString *) email);
self.receiverEmail.text = (NSString *) email;
[self.tabBarController dismissModalViewControllerAnimated:YES];
return NO;
} -
Access the TNS_ADMIN value in Oracle through Command Prompt
I am trying to get the TNS_ADMIN value but I m an not getting Expected Results . My tnsNames.Ora are located at the following locations : -
1) C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN
2) C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
As you can see from the belowcode, TNS_ADMIN is not displaying the correct location. Please correct me where I am going wrong.
C:\>set TNS_ADMIN=%ORACLE_HOME%\network\admin
C:\>echo %TNS_ADMIN%
%ORACLE_HOME%\network\admin
C:\>echo %ORACLE_SID%
%ORACLE_SID%
C:\>user8980683 wrote:
I am trying to get the TNS_ADMIN value but I m an not getting Expected Results . My tnsNames.Ora are located at the following locations : -
1) C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN
2) C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
As you can see from the belowcode, TNS_ADMIN is not displaying the correct location. Please correct me where I am going wrong.
C:\>set TNS_ADMIN=%ORACLE_HOME%\network\admin
C:\>echo %TNS_ADMIN%
%ORACLE_HOME%\network\admin
C:\>echo %ORACLE_SID%
%ORACLE_SID%
C:\>
Neither ORACLE_SID nor ORACLE_HOME have been set in the command window session it looks like. -
Access the selected values from grid
I want to select vendor from the list.For this I have loaded vendor list in grid.How to get the value of selected vendor into variable ? For this I have used following code-
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
Dim dtgGrid As SAPbouiCOM.Grid
Dim strVendorCode As String
Dim strVendorName As String
Dim dtgRows As SAPbouiCOM.GridRows
Dim dtgColumns As SAPbouiCOM.GridColumns
Try
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK And pVal.Before_Action = True And pVal.ItemUID = "dtgGrid" Then
dtgGrid = SBO_Application.Forms.ActiveForm.Items.Item("dtgGrid").Specific
dtgGrid.Rows.SelectedRows.Add(pVal.Row)
strVendorCode = dtgGrid.Rows.SelectedRows.Item(1, SAPbouiCOM.BoOrderType.ot_RowOrder)
strVendorName = dtgGrid.Rows.SelectedRows.Item(1, SAPbouiCOM.BoOrderType.ot_SelectionOrder)
End If
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End Sub
But I could not get the value in the variable strVendorName .Hi,
i would access value with the datatable
something like:
oForm = SBOApplication.Forms.Item(FormUID)
oGrid = oForm.Items.Item("grid").Specific
oGrid.DataTable.Columns.Item("insertthecolumnname").Cells.Item(i).Value
regards
David -
Accessing the tax value of a marketing document row before it is written to
I am creating sales invoices using the DI and I need to check the valu of the tax as calculated by the system so that I can compare it to the value supplied on the data provided and check for rounding errors.
My problem is that none of the fields in document lines that hold the value of tax e.g. priceaftervat, nettaxamount seem to be updated before the record is written. It looks like the value is calculated as the record is written.
Does anyone know if this is the case or am I missing something?
Regards
GordonYes, this is the case. If you want to check it before adding, create invoice draft first, then with getbykey load it to document object, check the values you want and if is everything ok, create invoice from the draft.
-
Can I force the Outook not to access the SCP value?
I am using SRV record for autodiscover. However, I still receive certificate mismatch issue. After some research, I found the issue is related to the SCP that Outlook always try to access. My question is, is there a way to told Outlook not to connect to
SCP?
DaveHello,
If you use outlook in domain, the SCP object is used to locate the Autodiscover service. Thus, you need to apply a new certificate that includes your CAS server FQDN or you can change AutodiscoverServiceInternalUri, EWS InternalUrl, oab InternalUrl and so
on.
Here is the article for your reference.
http://support.microsoft.com/kb/940726
If outlook is started on a client that is not domain-connected, it first tries to locate the Autodiscover service by looking up the SCP object in Active Directory. Because the client is unable to contact Active Directory, it tries to locate the Autodiscover
service by using Domain Name System (DNS).
Here is the article for your reference.
http://technet.microsoft.com/en-us/library/jj591328(v=exchg.141).aspx
Cara Chen
TechNet Community Support -
Hello,
I am having some trouble trying to programmatically write the contents of a container into my HTML report header. The container contains a series of strings and numbers. These are saved into StaionGlobals.
Note that I am performing all of these operations in a statment step inside the sequence editor of TestStand
I used the following method to access the correct property, which sits inside a for loop. Now this seems to work fine as Locals.PropertyObj contains the element which I wish to access. In the following Locals.PropertyObj is an object. TestSetup is the name of my setup information container
Locals.PropertyObj = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)
I can access the Name of the parameter simply by using the following code (where Locals.Name is a string):
Locals.Name = StationGlobals.GetNthSubPropertyName("TestSetup", StationGlobals.ForIterator, 0)
However when I try to access the actual value of the parameter I get an error or the wrong information. The following line gives me back the value "PropertyObject, IID = {8D87....}" which is not the value I am trying to get to.
Locals.Val = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)
I must be doing something wrong, and have tried various methods to do this but cannot get my head around the problem. I tried to use the following also, but it resulted in an error:
Locals.PropertyObj.AsPropertyObject.GetFormattedValue((Locals.PropertyObj.AsPropertyObject).Name, 0, "", False, "")
Note that the following line works fine:
(Locals.PropertyObj.AsPropertyObject).Name
Also can you tell me why the lookup string needs to be defined in Locals.PropertyObj.AsPropertyObject.GetValueString(), is there a way to not require the lookup string as you are already have the correct property, and just the value is needed to be gotten.
One last thing, in Evaluate() how do I make it work with dots, for example the following line (another attempt to get the value) did not work due to the presence of the . character
Evaluate("StationGlobals.TestSetup." + (Locals.PropertyObj.AsPropertyObject).Name)
Many thanks in advance of your response,
Ben Lawler
ps. hope that I am not being stupid and missed something very obviousBen,
Just a few comments;
[Locals.PropertyObj = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)]
This should give you a PropertyObject for the 1st subproperty of StationGlobals.TestSetup if StationGlobals.ForIterator = 0
[Locals.Name = StationGlobals.GetNthSubPropertyName("TestSetup", StationGlobals.ForIterator, 0)]
This should give you the name of the 1st subProperty of StationGlobals.TestSetup if StationGlobals.ForIterator = 0
[Locals.Val = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)]
This is going to return the 1st subproperty of StationGlobals.TestSetup if StationGlobals.ForIterator = 0 as a PropertyObject reference
and Locals.Val should be an ActiveX Reference type which I am guessing it isn't.
[Locals.PropertyObj.AsPropertyObject.GetFormattedValue((Locals.PropertyObj.AsPropertyObject).Name, 0, "", False, "")]
I think this should be Locals.PropertyObj.GetFormattedValue("", 0, "", False, ""), you dont need to specify the lookup string because you have obtained a reference to the actual sub-PropertyObject.
and therefore
Locals.Val = Locals.PropertyObj.GetFormattedValue("", 0, "", False, "")
should give you the value of the 1st subproperty of StationGlobals.TestSetup if Locals.PropertyObj was obtained as above.
I will try to check out your sequencefile later when I have access to TestStand 4.x.
Regards
Ray Farmer
Regards
Ray Farmer -
How can I access the Oracle CEP from the a simple java code
I want to access the current values in coherence cache and show those in a screen. So for that I want to create a java class which can access the Coherence cache of the CEP application and get the current values in the Cache.
Do anyone had any sample code for this, or any idea how to do this.As mentioned, you can use Spring to pass a reference to your cache to an event bean as shown below.
Once you have a reference to the cache you can use whatever Coherence APIs you need.
For example: get an object based on the key, perform an invoke, or a query to get the values that you want to display.
Here's some sample code:
IN EPN
<wlevs:caching-system id="CoherenceCachingSystem" provider="coherence" />
<wlevs:cache id="TransactionCache" caching-system="CoherenceCachingSystem"
value-type="TransactionAmount" key-class="com.oracle.poc.event.TransactionAmountKey">
</wlevs:cache>
<wlevs:event-bean id="TransactionCacheQuery" class="com.oracle.cep.eventbeans.TransactionCacheQuery">
<wlevs:listener ref="P1TotalChannel" />
<wlevs:instance-property name="transactionCache" ref="TransactionCache" />
</wlevs:event-bean>
EVENT BEAN:
import com.tangosol.net.NamedCache;
import com.tangosol.util.aggregator.DoubleSum;
import com.tangosol.util.filter.EqualsFilter;
public class TransactionCacheQuery implements StreamSource, StreamSink {
private StreamSender streamSender_;
@SuppressWarnings("unchecked")
private Map transactionCache;
@SuppressWarnings("unchecked")
public void setTransactionCache(Map transactionCache) {
this.transactionCache = transactionCache;
public void setEventSender(StreamSender sender) {
streamSender_ = sender;
public void onInsertEvent(Object event) throws EventRejectedException {
if (event != null){
if (event instanceof MyEvent){
MyEvent my = (MyEvent)event ;
NamedCache cache = (NamedCache)transactionCache ;
Object totalAmount = cache.aggregate(
new EqualsFilter("getACCT_NUMBER", my.getACCT_NUMBER()),
new DoubleSum("getAmount"));
double transactionsTotal = 0.00 ;
if (totalAmount instanceof Double){
transactionsTotal = ((Double)totalAmount).doubleValue();
my.setTransactionsTotal(transactionsTotal);
// send new event to the processor
streamSender_.sendInsertEvent(my);
} -
Refresh a Snapshot while accessing the "old" data
Hi folks!
I've got a problem with my materialized view. I want that the view is refreshed every day, but during the refresh process (refresh complete) i still want to access the old values. Is there a possibility to refresh in the background and then switch to the "new" values.
kind regards, IngoI'm not aware of any builtin functionality like this (other than something like fast refresh which you seemed to dismiss). You could easily do it manually using 2 materialized views and switching out a synonym for which one is current.
Richard
Maybe you are looking for
-
Need help on smartform spool generation for payslips
Hi Experts, My development of Payslip form is done, its all fine. Here is some clarification I need on the spool generation: First time I run the program for 2 employees, I get 2 pages one for each employee, as expected. When I again run the program
-
ITunes failing to correctly organise some tracks
OK, I just spent the morning editing the info on my library, so I could organise all the free stuff I had downloaded over the past year from various places into tidy and easily accessible folders (albums), instead of random tracks appearing all over
-
How to change a selected cell background color in JTable?
Hi all, I am trying to change the background color of a selected cell by clicking on that particular cell. DefaultTableCellRenderer class provides setBackground(Color c) to change the background color of unselected cells. Is there a way to change a s
-
Filtering of Grouped data in Advanced DataGrid
I want to display the Hierarchical Data (groped data) in Advance DataGrid and at the same time I want the filtering functionality as well. The problem is if I want grouped view then I have to provide GroupingCollection to the dataprovider ( that has
-
Imagee besides title of a frame
How do you get an image besides the title of a frame?Please help?