Managing Richfaces DataTable Sorting via Reflection

After a long time, Richfaces 4.0.0 was released aprrox. 2 months ago with its cons and pros.
I really liked the 3.x version and had good expectations for brand new jsf 2 release.
Lately I ve been checking components in detail. What bothers me most is datatable sort feature needs extra code in 4.0. If you are developing application that using so many datatables for data visualizing, this extra sorting code for each column will bother you in the end.

let’s look at an example code snippet from Richfaces showcase below;

  1.          <rich:column sortBy="#{cap.state}" id="state"
  2.                 sortOrder="#{capitalsSortingBean.statesOrder}">
  3.                 <f:facet name="header">
  4.                     <a4j:commandlink value="Sort by State Name" render="table"
  5.                         action="#{capitalsSortingBean.sortByStates}" />
  6.                 </f:facet>
  7.                 <h:outputtext value="#{cap.state}" />
  8.             </rich:column>

u have to define sortOrder attribute and sortBy attribute. But this wont be enought for sorting to work by clicking! You also need a commandlink to apply sorting. Here is the method fired when commandlink is clicked,
Sonraki Sayfa »

Chess game, C# version

Hiya all,
May be u tried my old java chess game.
Recently ,i ve ported java code into c#. it has same features just without a helper window,
and i updated links,
chess in c#
chess in java
in previous versions u had to put the resources in a different folder, now it is embedded .

for C# version , i used V.S. 2010.

some variables are still in Turkish, i wanted to translate into English but i didnt have that much time.

CDI conversation scope and JSF binding

Today i encountered a problem that occurs when i use binding attribute for a jsf component with a conversation scoped bean. it was like this

  1. <rich:tab>
  2.        <ui:include src="/example.xhtml"/>
  3. </rich:tab>

in example.xhtml

  1. <h:inputText binding="#{bean.bindableField}" />

i didnt give all page fragments in the above code.

when u change the scope of the bean. it works. But whent it comes to conversation scope it doesnt.
so i made a quick search about what the problem is?
The problem is, conversation context is not ready during jsf restore-view phase in which components are bounded to binding attributes.
i havent found a CDI workaround for this problem yet.

CDI -Weld 1.0.1 and Weld 1.1 final

hiya all,
I have been pretty busy for a long time, thats why i havent written anything so far.
from now on i will be writing as much as i can about JAVA EE 6 ,particulary JSF , CDI and java itself.
these days we are seeing really so many exciting news about java world (yesterday GF 3.1 released), Java FX 2.0 EA(even i didnt have chance to test ), JDK 7 in progress..
i think java future will be brighter in Oracles hands.
lately i have been busy with designing Enterprise web application. actually we already have one, but oldish session based,submit based no ajax,.etc. And i decided to use JAVA EE 6 stack for it,
when i heard about CDI,I was really excited about it,
so far you wont be able to find a detailed documentation about how to use weld in detail apart from introduction docs at seamframework.org. populer so called guess number example!
yesterday i gave a shot for weld 1.1 final.
Especially i am interested in conversation scope,
i used weld 1.0.1 final before. i just wanted to see any big changes made or not,
After replacing my old weld jar with new one,what i expected was, auto destruction of beans of type of conversation when timeout happens.
But it didnt happen, instead ,it waited for another request to destruct the conversation scoped beans.
yeah it sounds reasonable for data consistency not losing your data cos of a time out.
But we configured and coded our app not in this way!just an unexpected behaviour change for us.
i looked for a parameter to change this behaviour but
no luck yet.
Apart from that i have realized less memory usage, same application uses 20% less memory,

Buggy FlashScope JSF 2

if you are having problems with flash scope in JSF 2 as described on this web site
here just know that flash scope in JSF 2 is buggy.
I tried latest nightly builts but no help, the bug still exists.

Flex Builder & Eclipse Plugin Expired Problem

It happens on nonenglish operation systems. To solve this problem ,What you have to do is very simple,if u have a serial key(generally educational) ,first of all C:\Documents and Settings\[your user directory]\.adobe\Flex\license.properties

delete this file, then if you have standalone builder(included eclipse)  installed, go to your flex builder installation directory ,by default

C:\Program Files\Adobe\Flex Builder 3\

and add these lines in to FlexBuilder.ini file

-Duser.language=en
-Duser.location=us

then start your ide, select trial(if it asks) ,after it opens, help->manage-licences enter your serial key, thats it :)

if you have eclipse plugin , the parameters above must be in the eclipse.ini file that is in the base directory of the eclipse installation.

Some Bugs fixed thanx for bug reports!

i ve fixed some bugs, like when u move ur king near to ur opponents king square the program not seeing it is illegal(cos of sahmibak method)

i fixed it, u can reach the updated program from the links in my other post!

An Essay about JVM from IBM

i have just read an article from IBM website about JVM and its performance compare with C++. Especially they noticed how much java improved its performence on JVM particularly allocation to heap! and garbace collectors, old and young generation.

http://www.ibm.com/developerworks/java/library/j-jtp09275.html

here is the link enjoy man:) may be i can translate this in to Turkish soon. and publish it here.

Simple Chess Game(playable version) in Java (Links here)

While learning the language i decided to write my own playable chess game that will be using 100% my codes and my algorithms. Sonraki Sayfa »

a multiplayer chess program

ive been writing a chess program in java for a while ,just a few final steps left, soon i will give more details,and source code here.

for now just a screen shot of it….

  Sonraki Sayfa »