Regular exression for matching function declarations or calls
Hi guys,
I used a regular expression like \\w + (\\s*) \\( .*\\) (\\s*) [\\{;] to match function
declarations.This regular expression works fine for all the declarations of the form init_queue(TREE **NODE) { and even for declarations of the form
init_queue (TREE **NODE)
But the problem occurs when i have a declaration of the form
init_queue(TREE **NODE ,
int size ) {
when i have a declaration of this form my regular expression doesnt parse function names.The regular expression . (DOT) means it recognizes anything except for line terminators.So i used the DOTALL option in pattern matching so that .(DOT) matches even line terminators.But using this has a negative effect like i am not able to match declarations of the form
init_queue(TREE **NODE) {
can anyone help me out in solving this
Thank you,
Akash
multipost: http://forum.java.sun.com/thread.jspa?threadID=5168705
Similar Messages
-
How to form a regular expression for matching the xml tag?
hi i wanted to find the and match the xml tag for that i required to write the regex.
for exmple i have a string[] str={"<data>abc</data>"};
i want this string has to be splitted like this <data>, abc and </data>. so that i can read the splitted string value.
the above is for a small excercise but the tagname and value can be of combination of chars/digits/spl symbols like wise.
so please help me to write the regular expression for the above requirementyour suggestion is most appreciable if u can give the startup like how to do this. which parser is to be used and stuff like that
-
Regular Expression for Match Pattern (string) Function
I need to find a variable length string enclosed by brackets and
within a string. Can't seem to get the regular expression right for
the Match Pattern function. I'm able to get the job done using the
Token function, but it's not as slick or tight as I'd like. Does
anybody out there have the expression for this?Jean-Pierre Drolet wrote in message news:<[email protected]>...
> The regular expression is "\[[~\]]*\]" which means:
> look for a bracket "\[" (\ is the escape char)
> followed by a string not containing a closing bracket "[~\]]*"
> followed by a closing bracket "\]". The match string include the
> brackets
>
> You can also read "Scan from String" with the following format:
> "%[^\[]\[%[^\[\]]" and read the 2nd output. The brackets are removed
> from the scanned string.
Thanks, Jean_Pierre
I did some more experimenting after posting and found that \[.*\] also
works with the match pattern function. Thanks for your input.
sm -
Urgent!!! Problem in regular expression for matching braces
Hi,
For the example below, can I write a regular expression to store getting key, value pairs.
example: ((abc def) (ghi jkl) (a ((b c) (d e))) (mno pqr) (a ((abc def))))
in the above example
abc is key & def is value
ghi is key & jkl is value
a is key & ((b c) (d e)) is value
and so on.
can anybody pls help me in resolving this problem using regular expressions...
Thanks in advance"((key1 value1) (key2 value2) (key3 ((key4 value4)
(key5 value5))) (key6 value6) (key7 ((key8 value8)
(key9 value9))))"
I want to write a regular expression in java to parse
the above string and store the result in hash table
as below
key1 value1
key2 value2
key3 ((key4 value4) (key5 value5))
key4 value4
key5 value5
key6 value6
key7 ((key8 value8) (key9 value9))
key8 value8
key9 value9
please let me know, if it is not possible with
regular expressions the effective way of solving itYes, it is possible with a recursive regular expression.
Unfortunately Java does not provide a recursive regular expression construct.
$_ = "((key1 value1) (key2 value2) (key3 ((key4 value4) (key5 value5))) (key6 value6) (key7 ((key8 value8) (key9 value9))))";
my $paren;
$paren = qr/
[^()]+ # Not parens
|
(??{ $paren }) # Another balanced group (not interpolated yet)
/x;
my $r = qr/^(.*?)\((\w+?) (\w+?|(??{$paren}))\)\s*(.*?)$/;
while ($_) {
match()
# operates on $_
sub match {
my @v;
@v = m/$r/;
if (defined $v[3]) {
$_ = $v[2];
while (/\(/) {
match();
print "\"",$v[1],"\" \"",$v[2],"\"";
$_ = $v[0].$v[3];
else { $_ = ""; }
C:\usr\schodtt\src\java\forum\n00b\regex>perl recurse.pl
"key1" "value1"
"key2" "value2"
"key4" "value4"
"key5" "value5"
"key3" "((key4 value4) (key5 value5))"
"key6" "value6"
"key8" "value8"
"key9" "value9"
"key7" "((key8 value8) (key9 value9))"
C:\usr\schodtt\src\java\forum\n00b\regex> -
Regular Expression for match pattern
Hi guys, I need some help.
In one part of my test system, I give to the program a sequence of temperatures, which are numbers separated by a comma. Due to a possible error, the user can forget the coma, and the program gets unexpected values.
For example, "20, 70, -10" is a right value, whereas "20 70, -10" would be a wrong one.
Which regular expression will detect this comma absence?
Thanx in advance.OK, makes it more difficult (and more fun )
My original version failed also when the space was forgotten. DOH!
Try this version. It get's complicated cause the scan from string likes ignoring spaces... So we change the spaces
Hope this helps
Shane.
PS The ideas given by others are still a better solution, but if you're stuck........
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Attachments:
Check input string with commas(array).vi 39 KB -
Regular expressions for matching file path
Could someone give me idea that how can i compare a fixed path, with the paths user gives using regular expressions?
My fixed path is : src\com\sample\demo\work\gui\.**
and user may give like src\com\sample\demo\work\gui\test.jsp, src\com\sample\demo\work\gui\init.jsp etc.
Any ideas are appreciated and thanks in advance....and if you insist on using regexes, you'll have to double-escape the backslashes: if ( userString.matches("src\\\\com\\\\sample\\\\demo\\\\work\\\\gui\\\\.*") ) { Whether you use regexes or not, you'll save yourself a lot of hassle by converting all backslashes to forward slashes before you do anything with the strings: userString = userString.replace('\\', '/');
if ( userString.matches("src/com/sample/demo/work/gui/.*") ) {
// or...
if ( userString.startsWith("src/com/sample/demo/work/gui/") ) { -
Hello,
I'm using the Forte Developer 6 Update 2 C++ compiler and standard library on Solaris 9 SPARC. I've installed the recommended patch set for C++ (both the workshop and platform patches).
In my code, I have a STL set with some elements that I want to modify, say:
typedef set<SomeClass> MySet;
typedef MySet::iterator MySetIter;
I'm trying to look for an element, then update some of its fields:
MySet theSet;
SomeClass sci;
MySetIter it = theSet.find(sci);
if (it != theSet.end()) {
it->update_some_fields();
The above code fails with the following error (some details scrapped):
Error: Non-const function SomeClass::update_some_fields() called for const object
Which is weird, since set::find() seems to return a set<...>::iterator, not a set<...>::const_iterator!
If I try a workaround, like this:
if (it != theSet.end()) {
SomeClass &tmp = *it;
tmp->update_some_fields();
I get this other error:
Initializing SomeClass& requires an lvalue.
Is there some way to convince the Forte compiler to work around this situation (most likely a compiler / library bug)?This was fixed, too, by replacing the set with a map. It seems that the issue was related to the fact that any change made to a set member is supposed to not modify the elements that make up the key (the elements that are used in the comparison function to determine the ordering). The Windows (dinkumware) implementation of the STL allows set modifications, though I don't know how they check that the key fields are not modified. The Solaris implementation (and the GNU implementation, too) disallows any modifications made to set members. At least that's what a person more knowledgeable of C++ in our office found out. So I don't think the issue was related to template constructors or any unimplemented features after all.
-
Call statistics for customer functions (CMOD)
Hi experts,
I wonder, whether R/3 4.6C provides an option to generate a call statistics for customer functions (w/o adding additional logging code in the ZX-includes).
This would be beneficial to identify customer functions called frequently (and to check/improve the performance of these subsequently).
I am aware of a similar feature for BAdIs as well as the coverage analyzer (in NW'04s).
Regards
ThomasHello Thomas
On a 4.6c release I would use the following approach:
(1) Identify the transactions which pass user-exits
(2) Analyze transaction log
Regards
Uwe -
Help with Regular Expression for field validation
I'm fairly new to using regular expressions and using Acrobat. This is probably a simple question, but I've been unable to figure it out.
I have a text field on a PDF that I would like to be 9 characters in length. The first 2 characters can only be alphanumeric, the last 7 characters can only be numeric.
At first I was using the following, which allows all the characters to be alphanumeric:
var re = /^[A-Za-z0-9 :\\_]$/;
if (event.change.length >0) {
if (event.willCommit == false) {
if (!re.test(event.change)) {
event.rc = false
That works fine, but it's not quite what I needed. With some assistance I changed it (see below) to fit what I was looking for. However, this didn't work; it prevents anything from being entered in the field:
var re = /^[A-Za-z0-9]{2}\d{7}$/;
if (event.change.length >0) {
if (event.willCommit == false) {
if (!re.test(event.change)) {
event.rc = false
Any help would be greatly appreciated.
Thanks...Here's a function you can call form the field's custom Format script. It should be placed in a document-level JavaScript:
function custom_ks1() {
// Define non-commited regular expression
var re = /^[A-Za-z0-9]{0,2}([0-9]{0,7})?$/;
// Get all of the characters the user has entered
var value = AFMergeChange(event);
// Allow field to be cleared
if(!value) return;
if (event.willCommit) {
// Define commited regular expression
var re = /^[A-Za-z0-9]{2}[0-9]{7}$/;
if (!re.test(value)) { // If final value doesn't match, alert user
app.alert("Your error message goes here.");
// event.rc = false
} else { // not commited
// Only allow characters that match the regular expression
event.rc = re.test(value);
Call it like this:
// Custom Keystroke script
custom1_ks(); -
Trying to create a Histogram type/object for aggregate functions
Hi,
I am trying to create an aggregate function that will return a histogram
type.
It doesn't have to be an object that is returned, I don't mind returning
a string but I would like to keep the associative array (or something
else indexed by varchar2) as a static variable between iterations.
I started out with the SecondMax example in
http://www.csis.gvsu.edu/GeneralInfo/Oracle/appdev.920/a96595/dci11agg.htm#1004821
But even seems that even a simpler aggregate function like one strCat
below (which works) has problems because I get multiple permutations for
every combination. The natural way to solve this would be to create an
associative array as a static variable as part of the Histogram (see
code below). However, apparently Oracle refuses to accept associate
arrays in this context (PLS-00355 use of pl/sql table not allowed in
this context).
If there is no easy way to do the histogram quickly can we at least get
something like strCat to work in a specific order with a "partition by
... order by clause"? It seems that even with "PARALLEL_ENABLE"
commented out strCat still calls merge for function calls like:
select hr,qtr, count(tzrwy) rwys,
noam.strCat(cnt) rwycnt,
noam.strCat(tzrwy) config,
sum(cnt) cnt, min(minscore) minscore, max(maxscore) maxscore from
ordrwys group by hr,qtr
Not only does this create duplicate entries in the query result like
"A,B,C" and "A,C,B" it seems that the order in rwycnt and config are not
always the same so a user can not match the results based on their
order.
The difference between my functions and functions like sum and the
secondMax demonstrated in the documentation is that secondMax does not
care about the order in which it gets its arguments and does not need to
maintain an ordered set in order to return the correct results. A good
example of a built in oracle function that does care about all its
arguments and probably has to maintain a similar data structure to the
one I want is the PERCTILE_DISC function. If you can find the code for
that function (or something like it) and forward a reference to me that
in itself would be very helpful.
Thanks,
K.Dingle
CREATE OR REPLACE type Histogram as object
-- TYPE Hist10 IS TABLE OF pls_integer INDEX BY varchar2(10),
-- retval hist10;
-- retval number,
retval noam.const.hist10,
static function ODCIAggregateInitialize (sctx IN OUT Histogram)
return number,
member function ODCIAggregateIterate (self IN OUT Histogram,
value IN varchar2) return number,
member function ODCIAggregateTerminate (self IN Histogram,
returnValue OUT varchar2,
flags IN number) return number,
member function ODCIAggregateMerge (self IN OUT Histogram,
ctx2 IN Histogram) return number
CREATE OR REPLACE type body Histogram is
static function ODCIAggregateInitialize(sctx IN OUT Histogram) return
number is
begin
sctx := const.Hist10();
return ODCIConst.Success;
end;
member function ODCIAggregateIterate(self IN OUT Histogram, value IN
varchar2)
return number is
begin
if self.retval.exist(value)
then self.retval(value):=self.retval(value)+1;
else self.retval(value):=1;
end if;
return ODCIConst.Success;
end;
member function ODCIAggregateTerminate(self IN Histogram,
returnValue OUT varchar2,
flags IN number)
return number is
begin
returnValue := self.retval;
return ODCIConst.Success;
end;
member function ODCIAggregateMerge(self IN OUT Histogram,
ctx2 IN Histogram) return number is
begin
i := ctx2.FIRST; -- get subscript of first element
WHILE i IS NOT NULL LOOP
if self.retval.exist(ctx2(i))
then self.retval(i):=self.retval(i)+ctx2.retval(i);
else self.retval(value):=ctx2.retval(i);
end if;
i := ctx2.NEXT(i); -- get subscript of next element
END LOOP;
return ODCIConst.Success;
end;
end;
CREATE OR REPLACE type stringCat as object
retval varchar2(16383), -- concat of all value to now varchar2, --
highest value seen so far
static function ODCIAggregateInitialize (sctx IN OUT stringCat)
return number,
member function ODCIAggregateIterate (self IN OUT stringCat,
value IN varchar2) return number,
member function ODCIAggregateTerminate (self IN stringCat,
returnValue OUT varchar2,
flags IN number) return number,
member function ODCIAggregateMerge (self IN OUT stringCat,
ctx2 IN stringCat) return number
CREATE OR REPLACE type body stringCat is
static function ODCIAggregateInitialize(sctx IN OUT stringCat) return
number is
begin
sctx := stringCat('');
return ODCIConst.Success;
end;
member function ODCIAggregateIterate(self IN OUT stringCat, value IN
varchar2)
return number is
begin
if self.retval is null
then self.retval:=value;
else self.retval:=self.retval || ',' || value;
end if;
return ODCIConst.Success;
end;
member function ODCIAggregateTerminate(self IN stringCat,
returnValue OUT varchar2,
flags IN number)
return number is
begin
returnValue := self.retval;
return ODCIConst.Success;
end;
member function ODCIAggregateMerge(self IN OUT stringCat,
ctx2 IN stringCat) return number is
begin
self.retval := self.retval || ctx2.retval;
return ODCIConst.Success;
end;
end;
CREATE OR REPLACE FUNCTION StrCat (input varchar2) RETURN varchar2
-- PARALLEL_ENABLE
AGGREGATE USING StringCat;GraphicsConfiguration is an abstract class. You would need to subclass it. From the line of code you posted, it seems like you are going about things the wrong way. What are you trying to accomplish? Shouldn't this question be posted in the Swing or AWT forum?
-
How to use Exceptions for a function module
Hi folks,
I have created a new function module.Its working fine, but i am not aware of using exceptions for a function module. I hav just declared an exception in the 'exception' tab. Could any body explain me how to use that in my FM source code....Thanks...Hi Shyam,
Have a look at this,
START-OF-SELECTION.
gd_file = p_infile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gd_file
has_field_separator = 'X' "file is TAB delimited
TABLES
data_tab = it_record
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc NE 0.
write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.
skip.
endif.
Regards,
Sai -
How can I get an execution plan for a Function in oracle 10g
Hi
I have:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Solaris: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
I would like to know if is possible to get an EXECUTION PLAN for a FUNCTION if so, how can I get it ?
RegardsYou can query the AWR data if your interesting SQL consumes enough resources.
Here is a SQL*Plus script I call MostCPUIntensiveSQLDuringInterval.sql (nice name eh?)
You'll need to know the AWR snap_id numbers for the time period of interest, then run it like this to show the top 20 SQLs during the interval:
@MostCPUIntensiveSQLDuringInterval 20The script outputs a statement to run when you are interested in looking at the plan for an interesting looking statement.
-- MostCPUintesticeSQLDuringInterval: Report on the top n SQL statements during an AWR snapshot interval.
-- The top statements are ranked by CPU usage
col inst_no format 999 heading 'RAC|Node'
col sql_id format a16 heading 'SQL_ID'
col plan_hash_value format 999999999999 heading 'Plan|hash_value'
col parsing_schema_name format a12 heading 'Parsing|Schema'
col module format a10 heading 'Module'
col pct_of_total format 999.99 heading '% Total'
col cpu_time format 999,999,999 heading 'CPU |Time (ms)'
col elapsed_time format 999,999,999 heading 'Elapsed |Time (ms)'
col lios format 9,999,999,999 heading 'Logical|Reads'
col pios format 999,999,999 heading 'Physical|Reads'
col execs format 99,999,999 heading 'Executions'
col fetches format 99,999,999 heading 'Fetches'
col sorts format 999,999 heading 'Sorts'
col parse_calls format 999,999 heading 'Parse|Calls'
col rows_processed format 999,999,999 heading 'Rows|Processed'
col iowaits format 999,999,999,999 heading 'iowaits'
set lines 195
set pages 75
PROMPT Top &&1 SQL statements during interval
SELECT diff.*
FROM (SELECT e.instance_number inst_no
,e.sql_id
,e.plan_hash_value
,e.parsing_schema_name
,substr(trim(e.module),1,10) module
,ratio_to_report(e.cpu_time_total - b.cpu_time_total) over (partition by 1) * 100 pct_of_total
,(e.cpu_time_total - b.cpu_time_total)/1000 cpu_time
,(e.elapsed_time_total - b.elapsed_time_total)/1000 elapsed_time
,e.buffer_gets_total - b.buffer_gets_total lios
,e.disk_reads_total - b.disk_reads_total pios
,e.executions_total - b.executions_total execs
,e.fetches_total - b.fetches_total fetches
,e.sorts_total - b.sorts_total sorts
,e.parse_calls_total - b.parse_calls_total parse_calls
,e.rows_processed_total - b.rows_processed_total rows_processed
-- ,e.iowait_total - b.iowait_total iowaits
-- ,e.plsexec_time_total - b.plsexec_time_total plsql_time
FROM dba_hist_sqlstat b -- begining snap
,dba_hist_sqlstat e -- ending snap
WHERE b.sql_id = e.sql_id
AND b.dbid = e.dbid
AND b.instance_number = e.instance_number
and b.plan_hash_value = e.plan_hash_value
AND b.snap_id = &LowSnapID
AND e.snap_id = &HighSnapID
ORDER BY e.cpu_time_total - b.cpu_time_total DESC
) diff
WHERE ROWNUM <=&&1
set define off
prompt to get the text of the SQL run the following:
prompt @id2sql &SQL_id
prompt .
prompt to obtain the execution plan for a session run the following:
prompt select * from table(DBMS_XPLAN.DISPLAY_AWR('&SQL_ID'));
prompt or
prompt select * from table(DBMS_XPLAN.DISPLAY_AWR('&SQL_ID',NULL,NULL,'ALL'));
prompt .
set define on
undefine LowSnapID
undefine HighSnapIDI guess you'll need the companion script id2sql.sql, so here it is:
set lines 190
set verify off
declare
maxDisplayLine NUMBER := 150; --max linesize to display the SQL
WorkingLine VARCHAR2(32000);
CurrentLine VARCHAR2(64);
LineBreak NUMBER;
cursor ddl_cur is
select sql_id
,sql_text
from v$sqltext_with_newlines
where sql_id='&1'
order by piece
ddlRec ddl_cur%ROWTYPE;
begin
WorkingLine :='.';
OPEN ddl_cur;
LOOP
FETCH ddl_cur INTO ddlRec;
EXIT WHEN ddl_cur%NOTFOUND;
IF ddl_cur%ROWCOUNT = 1 THEN
dbms_output.put_line('.');
dbms_output.put_line(' sql_id: '||ddlRec.sql_id);
dbms_output.put_line('.');
dbms_output.put_line('.');
dbms_output.put_line('SQL Text');
dbms_output.put_line('----------------------------------------------------------------');
END IF;
CurrentLine := ddlRec.sql_text;
WHILE LENGTH(CurrentLine) > 1 LOOP
IF INSTR(CurrentLine,CHR(10)) > 0 THEN -- if the current line has an embeded newline
WorkingLine := WorkingLine||SUBSTR(CurrentLine,1,INSTR(CurrentLine,CHR(10))-1); -- append up to new line
CurrentLine := SUBSTR(CurrentLine,INSTR(CurrentLine,CHR(10))+1); -- strip off up through new line character
dbms_output.put_line(WorkingLine); -- print the WorkingLine
WorkingLine :=''; -- reset the working line
ELSE
WorkingLine := WorkingLine||CurrentLine; -- append the current line
CurrentLine :=''; -- the rest of the line has been processed
IF LENGTH(WorkingLine) > maxDisplayLine THEN -- the line is morethan the display limit
LineBreak := instr(substr(WorkingLine,1,maxDisplayLine),' ',-1); --find the last space before the display limit
IF LineBreak = 0 THEN -- there is no space, so look for a comma instead
LineBreak := substr(WorkingLine,instr(substr(WorkingLine,1,maxDisplayLine),',',-1));
END IF;
IF LineBreak = 0 THEN -- no space or comma, so force the line break at maxDisplayLine
LineBreak := maxDisplayLine;
END IF;
dbms_output.put_line(substr(WorkingLine,1,LineBreak));
WorkingLine:=substr(WorkingLine,LineBreak);
END IF;
END IF;
END LOOP;
--dbms_output.put(ddlRec.sql_text);
END LOOP;
dbms_output.put_line(WorkingLine);
dbms_output.put_line('----------------------------------------------------------------');
CLOSE ddl_cur;
END;
/ -
Overriding a javascript delivered function but then calling the original
I have a tabular form (updateable report) and am on Apex 3.2.
On this particular form, I have the updateable report set to "partial page refresh = yes". When doing so, it appears to want to call a javascript function called $a_report to paginate from one set of rows to another. I have my pagination set to select-list with row ranges.
Before repagination continues, I would like to do some validation (specifically, see if the user selected any of the checkbox row selectors) and warn them via Javascript's "confirm" box that continuing will make them lose their selections.
I have no issue so far in determining if at least one checkbox is checked and no problem popping up the confirmation box. However, the real issue is that I want to pop up the confirm box and then continue only if the user says they want to continue.
Apex generates this report with the select-list and links to paginate by calling a function in Javascript called "$a_report". Since this is in the library, I cannot really get to it; it's a "black box" to me at runtime. So ideally what I'd like to do is create a local (on my page) javascript function of the same name (since I can't change what the select-list for pagination calls) accepting the same four parameters, do my checkbox validation and warning, and then effectively call the $a_report in the library to do the pagination if the user wants to continue.
As it is right now I got a copy of the code for the function and put it local on my page and then added in my own logic, but of course this means that if $a_report changes in future versions, my local copy might break and would have to be updated. Ideally, I would like to somehow create a locally-named function called $a_report, do my validation and ask for confirmation, and if the user chooses "OK" to continue, call the library one in sort of a "super" or "parent" way to do the pagination.
Is this possible with javascript to create some sort of OOP-like inheritance or some sort of sense of scope so that I can have a local copy and then call the one in the library?
Thanks!Hi Kramis,
Let's start with a simple example
class OriginalClass
public void doSomething( )
System.out.println("This is the Original class's doSomething( ) ");
class InheritedClass extends OriginalClass
public void doSomething( )
super.doSonething( );//Watch here you are calling the original method that was declared in OriginalClass
//Now you are adding some codes of your choice
System.out.println("This is Inherited class's doSomething( ) ");
Explanation :
When you create an object of type InheritedClass and you call the method doSomething( ) then the original method gets executed first and later the rest of the code written in the InheritedClass 's doSomething( ) method gets executed.I hope this works for you. If you do not want the original to be executed just remove the super.doSomething( ) call. -
Save Point for Cancel Functionality
Hi all,
I followed Frank's document below on how to implement the Cancel functionality using "Explicit ADFm Save Points in ADF Taskflows":
http://www.oracle.com/technology/products/jdev/tips/fnimphius/cancelform/cancelForm_wsp.html
However when running the application with logging turned on, there was this warning message:
*******WARNING*****: createSavepoint not supported for DCBeanDataControl.*
Upon some digging, I found that the createSavePoint method in DCBeanDataControl returns null, while its base class DCJboDataControl calls the application module's passivateStateForUndo() method.
I hope to implement the save point functionality declaratively, can someone tell me how to obtain the DCJboDataControl class instead of DCBeanDataControl so that the createSavePoint method works?
Thanks!
Hai LiangJohn,
I think there might be a problem with our view project not "knowing" that the model layer is using ADF BC. The situation is like this, we first built the ADF BC model project (the EOs, VOs and AMs). Then we went on to create a viewController project (in the same Application workspace). Because the Applications Modules from the model project appear in the Application > Data Controls tab, we just used the AMs there and assumed that the viewController project is aware that it is using ADF BC components.
Is there some setting we have to define inside the viewController project to make it "aware" that the model layer utilizes ADF BC and thus enable the "savepoint cancel" functionality?
Thanks!
Hai Liang -
Unable To Use Regular Expression To Find Function Names
Hi,
I am trying to create a regular expression to find function and procedure names without the static designation and the parameter list. Sample source document:
static function test
static function test(i,j)
function test
function test(i,j)
static procedure test
static procedure test(i,j)
procedure test
procedure test(i,j)
For each of the above samples, I would like only the word "test" to be found.
ThanksI suggest starting with this expression:
^\s*(static\s+)?(function|procedure)\s+(?<NAME>\w+)
Programmatically, the name can be extracted from the group called “NAME”.
The expression can be improved.
Maybe you are looking for
-
what is the purpose of DTOs in N-tire architecture using J2EE?
-
Can't get EarPods remote and mic to work with my iPad 3. Anyone else having this problem and, if so, how did they fix it?
-
AppleScript support broken in CS5!
Following the 'Changes to Photoshop CS5 and Applescript' thread. I'd like to emphasis that AppleScript support is way broken in CS5. We have compiled scripts which fail to execute properly. Once this happens, every AppleScript command then fails incl
-
Is there any A/B testing setup code in dreamweaver?
I am trying to setup A/B testing. I am not a coder but I know there are solutions in Wordpress. How do you setup A/B testing using php code?
-
Random display of images!!
Hi I'm following the previous post and accordingly i was able to display a image on the iView. Now I've a list of images say image1.jpg, image2.jpg, image3.jpg and so on.. Now i want to pick any one of them and display any one of them. how do i go