Friday, December 16, 2005

Java Unicode Support

Check the JSR-204 for java unicode support : JSR-204

Supplementary Character Support Approach
  • Use the primitive type int to represent code points in low-level APIs, such as the static methods of the Character class.

  • Interpret char sequences in all forms (char[], implementations of java.lang.CharSequence, implementations of java.text.CharacterIterator) as UTF-16 sequences, and promote their use in higher-level APIs.

  • Provide APIs to easily convert between various char and code point based representations.


Good blog on unicode support in j2se5 : John Conner blog
Highlights:
# char is a UTF-16 code unit, not a code point
# new low-level APIs use an int to represent a Unicode code point
# high level APIs have been updated to understand surrogate pairs
# a preference towards char sequence APIs instead of char based methods

Java Floating point

Good link for java floating point : http://people.uncw.edu/tompkinsj/133/Numbers/Reals.htm

IEEE 754:
The IEEE 754 Standard uses 1-plus form of the binary normalized fraction (rounded). The fraction part is called the mantissa.
1-plus normalized scientific notation base two is then

N = ± (1.b1b2b3b4 ...)2 x 2+E

The 1 is understood to be there and is not recorded.
The Java primitive data type float is 4 bytes, or 32 bits:

Sign: 0 ® positive, 1 ® negative.

Exponent: excess-127 format for float, excess-1023 format for double.

* Float: Emin = -126, Emax = 127
* Double: Emin = -1022, Emax = 1023
* Consider an 8 bit number which has a range of 0 - 256. We use the formula excess - 127 = E to assign the value of our exponent with excess = 127 representing 0.
* In this manner, excess = 120 is an exponent of -7 since 120 - 127 = -7, and excess = 155 is the exponent +28 since 155 - 127 = +28. Excess values of 0, (Emin - 1), and 255, (Emax + 1), have special meanings which are discussed below.

Mantissa: normalized 1-plus fraction with the 1 to the left of the radix point not recorded, float: b1b2b3b4…b23, double: b1b2b3b4…b52. This value is rounded based on the value of the next least significant bit not recorded (if there is a 1 in b24, b53 respectively, increment the least significant bit).

Thursday, December 15, 2005

Static Method Inheritance

This link : http://java.sun.com/docs/books/tutorial/java/javaOO/override.html explains this issue with details.

For class methods, the runtime system invokes the method defined in the compile-time type of the reference on which the method is called. For instance methods, the runtime system invokes the method defined in the runtime type of the reference on which the method is called.

I paste here the same for easy reference:

public class Animal {
public static void hide() {
System.out.println("The hide method in Animal.");
}
public void override() {
System.out.println("The override method in Animal.");
}
}

The second class, a subclass of Animal, is called Cat:

public class Cat extends Animal {
public static void hide() {
System.out.println("The hide method in Cat.");
}
public void override() {
System.out.println("The override method in Cat.");
}

public static void main(String[] args) {
Cat myCat = new Cat();
Animal myAnimal = (Animal)myCat;
myAnimal.hide();
myAnimal.override();
}
}

The Cat class overrides the instance method in Animal called override and hides the class method in Animal called hide. The main method in this class creates an instance of Cat, casts it to a Animal reference, and then calls both the hide and the override methods on the instance. The output from this program is as follows:

The hide method in Animal.
The override method in Cat.

The version of the hidden method that gets invoked is the one in the superclass, and the version of the overridden method that gets invoked is the one in the subclass. For class methods, the runtime system invokes the method defined in the compile-time type of the reference on which the method is called. In the example, the compile-time type of myAnimal is Animal. Thus, the runtime system invokes the hide method defined in Animal. For instance methods, the runtime system invokes the method defined in the runtime type of the reference on which the method is called. In the example, the runtime type of myAnimal is Cat. Thus, the runtime system invokes the override method defined in Cat.

An instance method cannot override a static method, and a static method cannot hide an instance method.

Saturday, November 19, 2005

Multi-Boot Linux with Windows XP

Installed Fedora and Ubuntu with windows XP. Steps to be taken:
1. Boot from linux CD in CD-Rom
2. During partition, select 'Advanced' checkbox in case of Fedora. In case of Ubuntu use the Guided partitioning option.
3. These install GRUB loaded by default in MBR. But, better option I feel(and did) is to install the GRUB loader in the boot partition of the linux itself and take a copy of the boot part using tool like bootpart and add it to the boot.ini of the windows.

Issues in installing Ubuntu:
- Installation of ubuntu is in two parts. First base image is installed and then additional packages are installed. After the base images were installed, it made the linux partition as "Active" partition. Thus, it is always going to be the GRUB loader which will load the OS. In order to change it back to the windows loader, need to make the windows partition as "Active". One issue I encountered was that after making the windows partition as active and rebooting the system, the other windows partition became hidden. Setting this partition to "UnHide" using partition manager also didn't solve the problem of unhiding this partition. To solve this problem, the GNU "parted" tool of linux came to my help. Using this, I set the windows partition to unhide. Then did a reboot. Now my windows partition became unhidden. GNU parted helped me to solve this issue which even partition magic cannot fix.

Thursday, October 13, 2005

ADF : Class Casting Exception with ApplicationModule

1. I have written my Base applicationmodule(say, CatalogApplicationModuleImpl) extending ApplicationModuleImpl in my frameworkextension Project.
2. Then in the Model project which is dependent on this fwkextension project, I write my ApplicationModule(say, CatalogServiceImpl) extending CatalogApplicationModuleImpl.
3. Then I expose some of the methods of CatalogServiceImpl through a interface CatalogService to the DataAction classes in controller.
4. Now similar to AM, I've base controller CatalogDataForwardAction in fwkextension project which is extended by the actual dataaction classesin the viewController project. In the base controller i've the utility method:

protected CatalogApplicationModuleImpl getApplicationModule(String dataControlName,DataActionContext ctx)
{DCDataControl dc = ctx.getBindingContext().findDataControl(dataControlName);
if ((dc != null) && dc instanceof DCJboDataControl)
{return (CatalogApplicationModuleImpl) dc.getDataProvider();}
return null;}

5. This is the same method as in Toystore project of SMUENCH. The changeis I'm casting the CatalogServiceImpl(from dc.getDataProvider()) to itsbase class CatalogApplicationModuleImpl, so that I can invoke some methodson the base AM(CatalogApplicationModuleImpl) from the base controller(CatalogDataForwardAction). I need this since I'm writing some methods inthe base controller which need not be replicated in all the controllers implementing this class.
6. The problem is that the above casting fails. I understand that by the above I'm trying to cast a class to a Impl class which is not present in the client side(controller) and hence this exception. If that is the case, what is the wayI can access the methods in the base AM(CatalogApplicationModuleImpl)from the base controller(CatalogDataForwardAction)(these two classesare present in the fwkExtension project). i.e., how can I expose theCatalogApplicationModuleImpl to the controller(should I have to writethis Impl as implementing some interface and use that interface in thebase controller. If so, where should the base interface be created?
Thanks,Krishna.

ADF:Setting of who columns(Audit columns) in the Entity Object

Posted the following question in jdeveloper forum today
I have who columns like created_by, creation_date, last_update_date, last_updated_by etc., in the table(and so the entity object). These need to get set based on the user logged in. Currently, I'm achieving the same by following logic:
1. Wrote my own TransactionImpl extending DBTransactionImpl2 and registeredthe transaction factory to the application module.
2. In my transactionImpl, there is a setter method: public void setUserId(int userId)
3. I've a filter to redirect the user to login page if not logged in. In the filter Istore the userid in the session, if user is authenticated.
4. Everytimein the DataAction PrepareModel phase, I invoke the methodsetUserId on the applicationModule passing the value from the session, whichsets the same in the TransactionImpl. Then in the EntityObject create method,I access this value to set the userId. I call the setter in all theaction class(so that if in the next request I get a different application moduleor a different transaction due to transaction/AM harvesting, the statevariable may be lost and hence in the preparemodel phase i explicity set them). Is this correct or any other way I can achieve the same
5. My next question is : how do I set these last_update_date and last_updated_by when the entity object is queried and changed. I can do thisin SetAttributeInternal Method(with a check that the index is not these twoattributes). However, this logic will then become tied to a particular entityobject. I want this logic to be written in my base class of EntityImpl so thatall EntityImpl extending my base EntityImpl will have this logic incorporatedautomatically.
Please let me know how can I acheive this.
Thanks,Krishna.

Saturday, September 17, 2005

Stock Market Learnings

Technical Analysis
1. Bar Chart
A single vertical line with opening price on the left side and the closing price on the right side. The advantage of using a bar chart over a straight line graph is that it shows the high, low, open and close for each particular day.
2. CandleStick Charting
A vertical line with a cylindrical body. Body is black or red if stock closed lower. Body is white or green if stock closed higher.
Patterns :
  • Bullish : cylindrical equispaced between low and high,

  • Bearish : cylindrical portion more at the bottom of the line.

  • Hammer : small cylindrical portion at the top of the line : indicate the reveral in downtrend is in the works

  • Star : a single horizontal line at the center of a vertical line - stock going to change its course


3. Point and Figure Chart
Mainly for intraday charting.
increases are represented by a rising stack of "X"s, while decreases are represented by a declining stack of "O"s.
4. Moving Average Chart
Average value of price over a period of time. 50 day average chart->average of 50 days closing price. The most commonly used moving averages are of 20, 30, 50, 100 and 200 days.Typically, when a stock price moves below its moving average it is a bad sign because the stock is moving on a negative trend. The opposite is true for stocks that exceed their moving average - in this case, hold on for the ride.
5. The Relative Strength Index
RSI = 100 - [100/(1 + RS)]
where:
RS = (Avg. of n-day up closes)/(Avg. of n-day down closes)
n= days (most analysts use 9 - 15 day RSI)
At around 70, stock is overbought. Better to sell at this point. In a bullish market, wait till 80
At around 30, stock is oversold. Better to buy at this point. In a bearish market, wait till 20
6. The Money Flow Index
Average price for the day:

Average Price = (Day High + Day Low + Close ) / 3
Now we need the Money Flow:
Money Flow = Average Price x Day's Volume
If the price was up in a particular day, this is considered to be "positive money flow". If the price closed down, it is considered to be "negative money flow".
Money Flow Ratio = (Positive Money Flow ) / (Negative Money Flow)
Other Methods

  • Support and Resistance

  • Bollinger Bands

Friday, September 02, 2005

Struts html checkbox : unchecked is not getting posted

Recently posted a question in oracle jdeveloper forum :
If a struts html checkbox is unchecked, then when submitting this form containing this checkbox, the checkbox value is not getting posted. Hence, the same is not getting reflected in themodel. So, to post the unchecked value also, what should I do?
Got the reply:
Read the Struts newbie FAQ : http://struts.apache.org/faqs/newbie.html#checkbox

Thursday, August 25, 2005

The UTF-8 encoding rules

1. Characters U+0000 to U+007F (ASCII) are encoded simply as bytes 0x00 to 0x7F (ASCII compatibility). This means that files and strings which contain only 7-bit ASCII characters have the same encoding under both ASCII and UTF-8. A single byte is needed for any of these characters!
2. All characters >U+007F are encoded as a sequence of several bytes, each of which has the most significant bit set. Therefore, no ASCII byte (0x00-0x7F) can appear as part of any other character.
3. The first byte of a multibyte sequence that represents a non-ASCII character is always in the range 0xC0 to 0xFD and it indicates how many bytes follow for this character. All further bytes in a multibyte sequence are in the range 0x80 to 0xBF. This allows easy resynchronization andmakes the encoding stateless and robust against missing bytes
4. All possible 231 UCS codes can be encoded
5. UTF-8 encoded characters may theoretically be up to six bytes long, however 16-bit characters (the ones implicitly supported in the UCS-2 encoding, and by Str Library) are only up to three bytes long
6. The sorting order of Bigendian UCS-4 byte strings is preserved
7. The bytes 0xFE and 0xFF are never used in this encoding

The following byte sequences are used to represent a character:

U-00000000 - U-0000007F: 0xxxxxxx
U-00000080 - U-000007FF: 110xxxxx 10xxxxxx
U-00000800 - U-0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx
U-00010000 - U-001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
U-00200000 - U-03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
U-04000000 - U-7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx

The xxx bit positions are filled with the bits of the character code number in binary representation. The rightmost x bit is the least-significant bit. Only the shortest possible multibyte sequence which can represent the code number of the character can be used. Note that in multibyte sequences, the number of leading 1 bits in the first byte is identical to the number of bytes in the entire sequence.

Wednesday, August 24, 2005

Form Submission

Form content types
The enctype attribute of the FORM element specifies the content type used to encode the form data set for submission to the server. User agents must support the content types listed below. Behavior for other content types is unspecified.
Please also consult the section on
escaping ampersands in URI attribute values.
application/x-www-form-urlencoded
This is the default content type. Forms submitted with this content type must be encoded as follows:
Control names and values are escaped. Space characters are replaced by
`+', and then reserved characters are escaped as described in [RFC1738], section 2.2: Non-alphanumeric characters are replaced by `%HH', a percent sign and two hexadecimal digits representing the ASCII code of the character. Line breaks are represented as "CR LF" pairs (i.e., `%0D%0A').
The control names/values are listed in the order they appear in the document. The name is separated from the value by
`=' and name/value pairs are separated from each other by `&'.
multipart/form-data
Note. Please consult
[RFC2388] for additional information about file uploads, including backwards compatibility issues, the relationship between "multipart/form-data" and other content types, performance issues, etc.
Please consult the appendix for information about
security issues for forms.
The content type "application/x-www-form-urlencoded" is inefficient for sending large quantities of binary data or text containing non-ASCII characters. The content type "multipart/form-data" should be used for submitting forms that contain files, non-ASCII data, and binary data.
The content "multipart/form-data" follows the rules of all multipart MIME data streams as outlined in
[RFC2045]. The definition of "multipart/form-data" is available at the [IANA] registry.
A "multipart/form-data" message contains a series of parts, each representing a
successful control. The parts are sent to the processing agent in the same order the corresponding controls appear in the document stream. Part boundaries should not occur in any of the data; how this is done lies outside the scope of this specification.
As with all multipart MIME types, each part has an optional "Content-Type" header that defaults to "text/plain". User agents should supply the "Content-Type" header, accompanied by a "charset" parameter.
Each part is expected to contain:
a "Content-Disposition" header whose value is "form-data".
a name attribute specifying the
control name of the corresponding control. Control names originally encoded in non-ASCII character sets may be encoded using the method outlined in [RFC2045].
Thus, for example, for a control named "mycontrol", the corresponding part would be specified:

Content-Disposition: form-data; name="mycontrol"
As with all MIME transmissions, "CR LF" (i.e., `%0D%0A') is used to separate lines of data.
Each part may be encoded and the "Content-Transfer-Encoding" header supplied if the value of that part does not conform to the default (7BIT) encoding (see
[RFC2045], section 6)
If the contents of a file are submitted with a form, the file input should be identified by the appropriate
content type (e.g., "application/octet-stream"). If multiple files are to be returned as the result of a single form entry, they should be returned as "multipart/mixed" embedded within the "multipart/form-data".
The user agent should attempt to supply a file name for each submitted file. The file name may be specified with the "filename" parameter of the 'Content-Disposition: form-data' header, or, in the case of multiple files, in a 'Content-Disposition: file' header of the subpart. If the file name of the client's operating system is not in US-ASCII, the file name might be approximated or encoded using the method of
[RFC2045]. This is convenient for those cases where, for example, the uploaded files might contain references to each other (e.g., a TeX file and its ".sty" auxiliary style description).
The following example illustrates "multipart/form-data" encoding. Suppose we have the following form:

enctype="multipart/form-data"
method="post">


What is your name?

What files are you sending?



If the user enters "Larry" in the text input, and selects the text file "file1.txt", the user agent might send back the following data:
Content-Type: multipart/form-data; boundary=AaB03x

--AaB03x
Content-Disposition: form-data; name="submit-name"

Larry
--AaB03x
Content-Disposition: form-data; name="files"; filename="file1.txt"
Content-Type: text/plain

... contents of file1.txt ...
--AaB03x--

If the user selected a second (image) file "file2.gif", the user agent might construct the parts as follows:
Content-Type: multipart/form-data; boundary=AaB03x

--AaB03x
Content-Disposition: form-data; name="submit-name"

Larry
--AaB03x
Content-Disposition: form-data; name="files"
Content-Type: multipart/mixed; boundary=BbC04y

--BbC04y
Content-Disposition: file; filename="file1.txt"
Content-Type: text/plain

... contents of file1.txt ...
--BbC04y
Content-Disposition: file; filename="file2.gif"
Content-Type: image/gif
Content-Transfer-Encoding: binary

...contents of file2.gif...
--BbC04y--
--AaB03x--

Friday, July 22, 2005

ADF Event handling precedence

When an event named YourEvent fires, then...

If you have apublic void onYourEvent(DataActionContext ctx) method in the data action class handling the request, it will be invoked to handle the event with custom code.
If you have an action binding in the current binding container named YourEvent, it will be invoked.

When used in combination with 1, your event-handler code needs to explicitly invoke the default action for the current event by using code like:

if (ctx.getEventActionBinding() != null) ctx.getEventActionBinding().doIt();
If you have a Struts forward named YourEvent, it will be used to determine the next page to forward control to.

When used in combination with 1, if your event-handling code invokes ctx.setActionForward(), then your programmatically set forward takes precedence.

Thursday, July 21, 2005

ADF : Creating PreparedStatements

While creating preparedStatement from Application Module, it is better to not close them in a finally block. But, close them in the overridden remove() method of the AM by calling some method which will close all the local statements. Thus, will improve performance.

Saturday, July 02, 2005

Vector or ArrayList

Checked this site : Vector or ArrayList. Vectors are synchronized, while ArrayList is unsynchronized(making them not thread-safe). A Vector defaults to doubling the size of its array, while the ArrayList increases its array size by 50 percent(when full)...

Thursday, June 23, 2005

Raaga Player not working after RealPlayer 10.5 Upgrade

After upgrading to real player 10, cannot play songs from raaga.com. This was due to the firewall issue. Did the following things to make it work again.
1. Uninstalled the real player 10 and installed the real player 8
2. Set the RNSP setting and PNA setting in the Transport tab of preferences to "Use HTTP only".
3. Now it works.(The step.2 done in real player 10 still doesn't allow to play songs..don't know yy)

Note: For my laptop, even realplayer 8 had some problem. So, installed realoneplayer version 2(realplayer20) and did the above settings. It worked.

Sunday, May 22, 2005

Steps to dynamically bind a dynamically created view object

1. Expose the method recreateDynamicViewObjectWithNewQuery(String newSQL) to the client in the AM. This method will basically find the view object, remove it, create a new instance of vo from the query and executes the query:
findViewObject(DYNAMIC_VO_NAME).remove();
ViewObject vo = createViewObjectFromQueryStmt(DYNAMIC_VO_NAME,newSQL);
vo.executeQuery();
2. In the Client side(controller), override the prepareModel. The overriden method should
- unset the tokenvalidation through : ctx.getBindingContainer().setEnableTokenValidation(false);
- Unbind the rowsetIterator from the dynamicqueryiteratorbinding through : ctx.getBindingContainer(). findIteratorBinding(DYNAMIC_VO_ITER_NAME).bindRowSetIterator(null,false);
- call the method exposed by AM to bind the newSQL to the view object.
- remove the control binding by name. removeControlBinding(ctx,DYNAMIC_VO_RANGE);(basically remove the control binding from the iterator binding list and remove it from the binding container).
removeControlBinding:
---------------------------
DCBindingContainer bc = ctx.getBindingContainer();
DCControlBinding binding = bc.findCtrlBinding(name);
binding.getDCIteratorBinding().removeValueBinding(binding);
bc.removeControlBinding(binding);
- recreate the control binding and add it to the binding container:addDynamicRangeBinding(ctx,DYNAMIC_VO_RANGE, DYNAMIC_VO_ITER_NAME);
addDynamicRangeBinding
-------------------------------
DCBindingContainer bc = ctx.getBindingContainer();
JUCtrlRangeBinding dynamicRangeBinding =
new JUCtrlRangeBinding(null,bc.findIteratorBinding(iterName),null);
bc.addControlBinding(bindingName,dynamicRangeBinding);
- Execute super.prepareModel(ctx);
- Reset the tokenvalidation through : ctx.getBindingContainer().setEnableTokenValidation(true);

ADF - Dynamic rendering of UI irrespective of dataobjects

The following code in the view layer will render the dataobjects without any change in the view layer even though the view object gets re-constructed in the transaction.

<pre>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<c:forEach var="attributeLabel" items="${bindings.(voname).labelSet">
<th>
<c:out value="${attributeLable}" />
</th>
</c:forEach>
</tr>
<c:forEach var="Row" items="${bindings.(voname).rangeSet">
<tr>
<c:forEach var="attrValue" items="${Row.attributeValues}" >
<td>
<c:out value="${attrValue}" />
</td>
</c:forEach>
</tr>
</c:forEach>
</table>
</pre>

Basically the above code makes use of the labelSet and rangeSet properties of the VO object in the bindings and loop through them and print the same.

Open new window in UIX

Had a question on how to open new window in UIX using javascript. Then got the following link which explains clearly how the javascript support is provided in UIX.
Look out the LovXXXX components demo in uix.
See <script> demo of component guide. This should help you clearly understand the functionalities.
See documentation of above UIX components

Like providing handlers to HTML elements, you can attach event handlers to UIX components too. You can attach event handlers on onClick, onMouseOver,... on UIX components just as you would do in HTML.

Personalizing google home page

check this link http://www.google.com/ig to start personalizing your own Google home page.

Thursday, May 19, 2005

JBO-30003

Getting this error:
oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003: The application pool (model.AppModuleLocal) failed to checkout an application module due to the following exception:
Solution:
- May be the database is down. Bring it up.

Tuesday, May 17, 2005

Master-Detail design using ADF in uix page

In case the view layer is using UIX page, this requirement can even be simplified by dragging the child view object in view link with the option of Master to Detail(many to many). This will automatically take care of synchronization between master and details during navigation.

Simplest way to design Master-detail tables using ADF

Simplese way to design a master-detail table using ADF,
1. Create the master and detail entity objects. Create the appropriate association objects and view links.
2. Using the master view object in data control, create the master table.
3. Using the detail view object(present in view link) and create a child table
4. In the master table, add a column with ADF operation: setCurrentRowWithKey
that's it... now run the page, clicking on the select link in master will automatically refresh the child table(vo gets refreshed automatically by viewlink).

Conditional display of table data

This code snippet makes use of JSTL core taglib to display no data found if the table contains no records, else it display the records.

------------------------------------
<table border="1" width="100%">
<tr>
<th> </th>
<th>
<c:out value="${bindings.DummyView1.labels['Field1']}"/>
</th>
<th>
<c:out value="${bindings.DummyView1.labels['Field2']}"/>
</th>
<th>
<c:out value="${bindings.DummyView1.labels['Field3']}"/>
</th>
</tr>
<c:choose>
<c:when test="${bindings.DummyView1Iterator.estimatedRowCount>0}">
<c:forEach var="Row" items="${bindings.DummyView1.rangeSet}">
<tr>
<td>
<c:out value="${Row.currencyString}"/>
</td>
<td>
<c:out value="${Row['Field1']}"/> 
</td>
<td>
<c:out value="${Row['Field2']}"/> 
</td>
<td>
<c:out value="${Row['Field3']}"/> 
</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td colspan="4">no data found</td>
</tr>
</c:otherwise>
</c:choose>
</table>

Saturday, May 14, 2005

Question in ADF

I got this question: In a multi-page data entry flow where all the pages share the same underlying Entity Object, how should the entity level validation(validateEntity) be prevented until the user navigates to the final review and submit page. So, posted this question in a forum and got the response:
We have this SAME question.

We were thinking of:
1. add an attribute to the entity (not persistent) called pagenum

2. Expose this in the view

3. Expose in page as hidden value with the page# filled in

In validation methods (in EO) say:
public boolean validateEOfield1()
{
if thisFieldNeedsValidateOnPage( "field", getPageNum() )
{
// perform the validation logic here...
if ( thisFieldInError( "field" ) )
return false;
else
return true;
}

// if not on this page, then ...
// everything is ok
return true;

}

I haven't gotten very far with this idea and wanted to post a question, but I don't receive much feedback on my posts, so I wasn't sure what to do with it...

My Reply:
The above suggestion resolves the issue where the field validation is manually written by me in the EO. But, in case of declarative validations which I specify through Jdeveloper, how can I control the field validations.

One question here: model layer validations should be independent of the view layer right(either single/multi step). In this case, are n't we mixing the page flow logic
in our entity objects, which is a violation of MVC.

Instead, is it possible to get all the validation exceptions for all the EO's in the current transaction in the controller and check whether these exception can happen in the current page. If so, we will display these exceptions. Else, we will silently disregard these validation exceptions.

BC4J Entity States

Entity States in BC4J are as follows:
STATUS_INITIALIZED = -1
STATUS_NEW = 0
STATUS_UNMODIFIED = 1
STATUS_MODIFIED = 2
STATUS_DELETED = 3
STATUS_DEAD = 4

Sunday, April 10, 2005

UseNet site

Found this usenet site very useful. Particularly the comp.lang.c section was very good.

Wednesday, April 06, 2005


Procurement PQE Team Posted by Hello

Graphics Tutorial - SDL

Some of the tips to successfully compile and link the projects in the tutorial GFX with SDL
1. Change the directory in Project workspace file
2. Add libmingw32.a, libsdlmain.a and libsdl.a in the linker options.
3. libsdlmain.a should be added before libsdl.a
4. inlcude <iostream.h> and <string.h>