Dynamically assign value to bind variable in a view object before pageload
I found that it is extreamely hard to find an example to assign the bind variable in View object at runtime using a data attribute defined in Human task activity. Most of the available samples use a Literal value to do the assignment. In my case, I want to dynamically display the content by assigning the data attribute in Human task to the bind variable in view object before a pageload.
I do not want to bind the view object to some command component to click a button or link in order to make it work (Unnecessary components in my page).
The issue is how to access the data attribute in Human task in the java code of client interface in AppModule? or is there a way that I can access the data attribute in Groovy script expression of the bind variable? or if I can access the process data object defined in my BPM process to do the assignment at runtime?
Really need help on the issue, and I cannot believe that it is so hard to accomplish.
Thank you very much,
chk this
Passing default value to bind variable on page load.
http://adfcodebits.blogspot.com/2010/03/bit-2-setting-bind-variable-value.html
Similar Messages
-
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. -
Setting bind variable for a view object from the Managed Bean
Hi,
i am using JDeveloper 11g, i have to create LOV in the JSF. To show the LOV, it has to populate data using View object and its query parameter need to be sent from the Managed Bean.
For the View object i want to set the bind variable parameter from the managed bean value. bename is stored in a managed bean (session scope)
#{beantest.bename}
But it gives the following exception.
JBO-29000: Unexpected exception caught:
org.codehaus.groovy.control.MultipleCompilationErrorsException,msg=startup failed, Script1.groovy: 1: expecting '!',found '{'@ line1, column 2.
I have followed the link http://kr.forums.oracle.com/forums/thread.jspa?threadID=615474 like Frank wrote on 8.2.2008:
But steps are not clear.
How to input the VO bind parameter with Managed bean variable?
Any Help
Regards
Raj
Edited by: user9928180 on Dec 17, 2008 9:51 AMHi,
a bind variable in a VO needs to be exposed as an executeWithParams operation in the pageDef file. Just add a new action binding to the pageDef file (context menu) and select the executeWithParams operation on teh VO. Then in the argument field, reference the managed bean property for the value
Frank -
Can we assign value to a variable in PL/SQL Loop
Hi
Can we assign value to a variable in PL/SQL Loops?
DECLARE
V_Num NUMBER;
BEGIN
LOOP
V_Num := 10;
DBMS_OUTPUT.put_line(V_num);
V_Num := V_Num - 1;
EXIT WHEN V_Num = 0;
END LOOP;
END;
In the above program, Can we assign V_num with a value 10????????
Thanks & Regards,
Hari Babu
Edited by: 1004977 on Jun 5, 2013 2:40 AMHi,
1004977 wrote:
Hi
Can we assign value to a variable in PL/SQL Loops?
DECLARE
V_Num NUMBER;
BEGIN
LOOP
V_Num := 10;
DBMS_OUTPUT.put_line(V_num);
V_Num := V_Num - 1;
EXIT WHEN V_Num = 0;
END LOOP;
END;
In the above program, Can we assign V_num with a value 10????????Yes; the example you posted does that.
When the loop starts, the value 10 is assigned to v_num. You should see that value displayed by the put_line statement.
After that, v_num is set to 10 - 1 = 9.
Next, the EXIT condition is evaluated. At this point, v_num is 9, not 0, so the loop runs again. V_num is set to 10 again, and the loop continues forever (or, in some versions, until the dbms_output buffer is filled and an error occurs.) -
Dynamically assign value to a column in ALV LIST Display
Hi all,
How can I dynamically assign value to a column in ALV LIST Display without using classes and methods?
Thanks,
RidhimaHi Vikranth,
I am displaying one ALV list say with columns A and B.
I have value in A but not in B. Now at runtime user selects one row, clicks on push button in application toolbar, then i have to display value in column B in the already displayed list.
I searched and came to know it can be done with oops concept. but i am not using classes and methods.
so how can i do this?
Thanks,
Ridhima. -
Passing value to bind variable of another table from one table
hi,
I have a multi select table. When one row is selected from this table (no button is clicked, only selection is done), an attribute from that selected row (say userid) should be passed to the bind variable of another table and the corresponding details of that particular userid should be displayed in the other table. When more than one row is selected, the other table should display no rows.
My main problem is what code has to be written to pass value to bind variable and where it should be written.
Please give me a detailed explaination as soon as possible.
Thank you.Sorry, didnot add this. The table is multi select table.
-
Assigning value to a variable.
i have one doubt.
we can assign value to a variable either in declaration section or in exectuion section.
so please explain when and wherer should we assign value to a variable.
thank you very much.I think the best way to look at it is...
If you don't want your variable(s) to have default values that are NULL, assign a value in the declaration section, otherwise assign it where you feel like.
If you take an example of:
declare
v_sum number := 0; -- default variable to 0
cursor cur_test is
begin
for i in cur_test
loop
v_sum := 0; -- set variable to 0 before the loop
loop
exit when .. some condition ..
v_sum := v_sum + ..
end loop;
end loop;
end;
/.. we have a need to set the variable v_sum to 0 before each iteration of the internal loop, so there's little point in having it defaulted to 0 in the declaration section, hence I wouldn't typically default it there and would typically have the code as..
declare
v_sum number; -- no point in defaulting it
cursor cur_test is
begin
for i in cur_test
loop
v_sum := 0; -- set variable to 0 before the loop
loop
exit when .. some condition ..
v_sum := v_sum + ..
end loop;
end loop;
end;
/It all depends on what you're doing and what seems the most logical or preferred option.
Defaulting values in the declaration section can let you see clearly what the starting values are for things, but only if you really need to do it. -
Assign value to ODI variable from Jython
Hello Experts,
I have a procedure where I'm using Jython code. I want to assign a value to an ODI project variable from a Jython function:
Example:
#COUNTER = len(v_jythonList) ---> being #COUNTER the ODI project variable and len() the jython function
Now, i noticed that using ODI variables adds # sign which is use for comments in Jython code. Is there a way to assign values to ODI variables from Jython script?
Please help!.
Thanks.
Pablo.Hi,
Does this post help you :- How to assign value for a ODI variable from Jython Script
Doc id 424579.1 on metalink should help.
Cheers
John
http://john-goodwin.blogspot.com/ -
How to pass pageFlowScope variable value as bind variable for VO
Hi,
I have one fixed lov (not based on datasource), if i select any value in that lov i want to pass this value to a pageFlowScope variable.
After this i want to use this value as bind variable for VO. whenever the vo executes thereafter this bind variable should filter that vo results.
My jdev version: 11.1.0.0
Thanks in advance,
SANsan-717,
can you elaborate on the use case instead of the implementation you don't get done? I understand you have data displayed in a tree: so lets assume the tree structure is Locations, Departments and Employees according to the Oracle HR sample schema.
1. What is the LOV supposed to do ?
2. Where is the LOV located ?
3. What values does the LOV show ?
4. Is the LOV a select choice component or a real LOV (with search dialog)
5. Where is the bind variable used ?
To me it sounds like you want to filter the tree data based on the select choice value. However, you wont do this by passing the bind parameter to all View Objects involved as they may not have the attribute in their query. So your use case is important to answer the question
Frank -
How can i dynamically assign values to the tld file
How can i dynamically assign values to the tld file
In the tld you write for the tag handler mention the following sub tags in the attribute
<attribute>
<name>xyz</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
import the packagejavax.servlet.jsp.tagext.DynammicAttributes;
add the method
public void setDynamicAttribute(String rui, String localname, Object value) throws JspException
<Your Required task>
Its better if you SimpleTagSupport class to be extended. -
How to use List of values with bind variables on item?
Hi
I made a dynamic list of values with a bind variable as a provider. I tried to run the list, and it worked fine - i filled inn the bind variable when asked for, and i got a list of values to choose from.
I would very much like to use this list of values as an attribute on a custom made item. My wish is that when creating the item you someplace write the bind variable, and the list will then turn up as wanted. (I could f.ex add the variable as an attribute on the page type)
I tried to create a custom attribute and assign the list of values to it. It created an error when I then tried to add the attribute to the item.
Does anyone have any idea on how to solve this?
Any help appreciated!
Maja R. AnjerHi
i am getting error as
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT meaning, lookup_code,lookup_type
FROM fnd_lookup_values
WHERE view_application_id = 200) QRSLT WHERE (lookup_type=:1 AND ( UPPER(MEANING) like :2 AND (MEANING like :3 OR MEANING like :4 OR MEANING like :5 OR MEANING like :6)))
Thanks
Mateti -
About dynamically setting bind variable in LOV View
Hi,
I have a LOV VO for an af:SelectOneChoice field in the page.
The LOV is depended on an SQL statement in which there is a bind variable in the where clause.
When I open the page, I set the bind variable by using VO.setNamedWhereClauseParam in the prepareSession method in the application module, followed by VO.executeQuery();
The problem is, the af:SelectOneChoice is blank. Why?
If I do not use the bind variable in the SQL, I can see rows in the af:SelectOneChoice field.
When is the proper time to populate the LOV? And where should I put the code for populating the LOV?
I am sure that the VO is populated, because after I executeQuery, there are many rows in the VO.
Thanks
Stephen
nullHi Franky,
Yes, when I set a default value for the bind variable, everything is OK.
But I want the bind variable dynamically be set when the AM is initiated. Is there a way to do that?
Stephen -
The new value of bind variable does not show up after changed by PL/SQL
Hi,
I am running APEX 3.2. I use PL/SQL process to assign a new value to a bind variable, say, :P2_TEST := 123. The new value does not show up on the page although I can see it in the Session status.
How can I make the new value to be displayed on the page immediately after the process is run?
Kind regards,
TeeMaybe you could use an ajax routine to refresh the item in your pl/sql routine?
Thank you,
Tony Miller
Webster, TX -
Cannot assign value to a Variable of Complex Type beyond index 1
Hello:
I have a variable defined as a complex type as followed. I tried to assign a value to each of the two elements but it only allows me to assign to the 'element#1.
This statement that tries to assign a value into element#2 will not work, if I assign with '[1]' for the first element it will work:
<copy> <---- THIS WORKS
<from expression="'John'"/>
<to variable="My_Variable"
part="My_Collection"
query="/ns9:My_Collection/ns9:Collection/ns9:Collection_Item[1]/ns9:pname"/>
</copy>
<copy> <---- THIS DOES NOT WORK
<from expression="'John'"/>
<to variable="My_Variable"
part="My_Collection"
query="/ns9:My_Collection/ns9:Collection/ns9:Collection_Item[2]/ns9:pname"/>
</copy>
Is there something wrong with my definition below that allows only element#1 to be refererenced but not element#2???? Am I missing some kind of initialization that is needed to initialize both elements????
Here are my message and Complex Type definitions:
<variable name="My_Variable" messageType="ns8:args_out_msg"/>
<message name="args_out_msg">
<part name="My_Collection" element="db:My_Collection"/>
</message>
<element name="My_Collection">
<complexType>
<sequence>
<element name="Collection" type="db:Collection_Type" db:index="2" db:type="Array" minOccurs="0" nillable="true"/>
<element name="Ret" type="string" db:index="3" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
</sequence>
</complexType>
</element>
<complexType name="Collection_Type">
<sequence>
<element name="Collection_Item" type="db:Collection_Type_Struct" db:type="Struct" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</sequence>
</complexType>
<complexType name="Collection_Type_Struct">
<sequence>
<element name="pname" db:type="VARCHAR2" minOccurs="0" nillable="true">
<simpleType>
<restriction base="string">
<maxLength value="25"/>
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
The error msg it gives me is as followed:
[2010/09/04 00:47:59] Error in <assign> expression: <to> value is empty at line "254". The XPath expression : "" returns zero node, when applied to document shown below:less
oracle.xml.parser.v2.XMLElement@1fa7874
[2010/09/04 00:47:59] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
-<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
-<part name="summary">
<summary>
XPath query string returns zero node.
According to BPEL4WS spec 1.1 section 14.3, The assign activity <to> part query should not return zero node.
Please check the BPEL source at line number "254" and verify the <to> part xpath query.
</summary>
</part>
</selectionFailure>
Thanks
NewbieHello:
Base on the suggestion to use 'append' instead of 'copy', I tried to define a 'singleNode' which is of type 'Collection_Type_Struct' so I can append this individual 'struct' into my array (i.e. as the 2nd. element of my array "/ns9:My_Collection/ns9:Collection/ns9:Collection_Item"), but I am getting an error in defining this variable as:
<variable name="singleNode" element="Collection_Type_Struct"/> <--- error
Can someone tell me how should I define "singleNode" so I can put a value in it and then append this 'singleNode' into the array:
<variable name="singleNode" element=" how to define this????"/>
<assign>
<copy>
<frem expression="'Element2Value'"/>
<to variable="singleNode"
part="My_Collection"
query="/ns9:My_Collection/ns9:Collection/ns9:Collection_Item/ns9:pname"/>
</copy>
</assign>
<bpelx:assign>
<bpelx:append>
<from variable="singleNode" query="/ns9:My_Collection/ns9:Collection/ns9:Collection_Item"/>
<to variable="My_Variable"
"part="My_Collection"
query="/ns9:My_Collection/ns9:Collection"/>
</bpelx:append>
</bpelx:assign>
Again here is my definition in my .xsd file:
<element name="My_Collection">
<complexType>
<sequence>
<element name="Collection" type="db:Collection_Type" db:index="2" db:type="Array" minOccurs="0" nillable="true"/>
<element name="Ret" type="string" db:index="3" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
</sequence>
</complexType>
</element>
<complexType name="Collection_Type">
<sequence>
<element name="Collection_Item" type="db:Collection_Type_Struct" db:type="Struct" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</sequence>
</complexType>
<complexType name="Collection_Type_Struct">
<sequence>
<element name="pname" db:type="VARCHAR2" minOccurs="0" nillable="true">
<simpleType>
<restriction base="string">
<maxLength value="25"/>
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
Thanks for any help!!!! -
Error in assigning value to local variable
i am writing a stored procedure in which i have pass parameter if parameter value is zero then i assign a previously declared variable null else that value
syntax is this
create or replace
PROCEDURE usp_Add_Update_Insurance
p_CityID IN NUMBER DEFAULT NULL
as
v_CityID number(10,0);
begin
IF p_CityID = 0 THEN
BEGIN
v_CityID := NULL;-----giving error in this line
else
v_CityID:=p_CityID;
END;
END IF;
end
begin
///some query
end
please help someoneI think there is no added value by putting those Begin/End.
The simplest solution is just remove them
Create Or Replace
Procedure Usp_Add_Update_Insurance (
P_Cityid In Number Default Null
) As
V_Cityid Number(10,0);
Begin
If P_Cityid = 0 Then
V_Cityid := Null;
Else
V_Cityid:=P_Cityid;
End If;
-- do something with V_Cityid
End; The only reason for having Begin/End is if you want to catch some exceptions or perform some strange local variable declarations. But it does not seems to be case here.
MJ
Maybe you are looking for
-
Hyperion HFM Classic Applications not showing up in Calcuation Manager
Hello, 11.1.2.2 HFM Classic applications are not showing up in Calculation Manager. The following error is generated- "There was an error retrieving the list of classic applications. Please see the Calculation Manager log for more information" I see
-
X300 Port Replicator & External Monitor - response from LENOVO requested
Will LENOVO please provide an indication as to when the X300 and external monitor limitation will be resolved. I refer to http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-69755 Extract from this document:- "External monitor With a
-
Metrics for Super User Programs
Does anyone out there have any metrics that they have used successfully to measure the effectiveness of their Super User program? I'm looking for tangible ways to quantify/qualify the business benefits that Super Users drive other than the numerous a
-
HI Can anybody plz send the T.codes of Customers & vendors Outstanding and Outstanding Advances of Vendors & Customers.
-
Is there a way to lower the volume on the themes with a soundtrack?
Hi, Is there a way to lower the volume on the themes with soundtracks? The volume of my video is lower than the soundtrack on the theme. Thank you