Facing new challenges everyday

JBoss Seam and Richfaces

December 25th, 2008

Yesterday I started a small application using JBoss Seam and Richfaces, after some hours fixing configuration issues and incompatibilities I could finally get a simple crud working.

One of the problems that I had while trying to get the application running was a redirect loop when using seam with myfaces tomahawk, once I removed myfaces tomahawk libs and configuration entries in web.xml the error gone.

Now I have another problem related with Richfaces calendar component, the popup button image isn’t displayed and the javascript for calendar component isn’t loaded too.

Post to Twitter

Objective-C number formatting with NSNumberFormatter

December 11th, 2008

Today I finished an article to a local magazine about mobile development, this article gives a small introduction on iPhone development with iPhone SDK, this article covers the development of a simple application that perform some meansure conversion. One of learned things was how to do number formatting with NSNumberFormatter like we have below:

1
2
3
4
5
6
7
8
NSNumber *result = [NSNumber numberWithFloat: 0.0];

NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
[numberFormatter setDecimalSeparator:@","];
[numberFormatter setFormat:@"0.00000;0.00000;-0.00000"];
   
NSString resultText = [[[numberFormatter stringFromNumber:result];

In this example I’m setting the number format to show a float number with 5 decimal positions and using comma as decimal separator since this is the brazilian decimal separator. I could convert and format a NSNumber by just passing it as argument to stringFromNumber method of NSNumberFormatter instance. Not so different from Java, right?

Post to Twitter

What you must avoid in LINQ to SQL one to many associations

December 8th, 2008

Last saturday I spent few hours trying to figure out the reason of a very annoying bug that was happening with my WCF Service, for several times if got the same error: “The underlying connection was closed: The connection was closed unexpectedly.”.

The root cause of this bug was a LINQ to SQL query in my WCF service that was retuning a large list of objects, I tried to set maxItemsInObjectGraph of dataContractSerializer, but with no success. My LINQ model contains some onetomany associations that was generating both child and parent properties, this setting was causing the generation of infinite number of object references in my LINQ resultset, after disabling the generation of child property of all onetomany associations the error gone.

Post to Twitter

Flexbuilder versus Silverlight Tools for Visual Studio 2008

December 1st, 2008

Last weekend I spent few hours trying to create only the interface of a timesheet application, I made two versions, one using silverlight and other using flex. For Flex I used Flexbuilder as a tool and for Silverlight I used Silverlight Tools for Visual Studio Web Developer Express 2008.

In many aspects Flexbuilder is much more better than Silverlight Tools, one of then is your design time editor, Flexbuilder has a good design editor, you can easily create your application interface by just drag and drop components inside application container, in other hand, silverlight tools doensn’t have the same facility, you must drag and drop directly in xaml code, horrible! But, but, you can solve it easily if you buy the xaml specific editor called Expression Blend. Now you have two tools to work on one technology. :D

Another big issue on silverlight tools is related with the code pane and preview pane, this two panes takes half of screen each, well, there’s a way to collapse, anyway, when you type something on code pane your editor freezes for few seconds before preview pane is updated, if you don’t want it just collapse preview pane.

Both tools lacks the same feature, a kind of context sensitive menu for each component, one of these context sensitive menus could be applied on a component like Flex grid and could be used to help on merge of cells or rows on a grid.

Click here to load Silverlight version of Timesheet.

Click here to load Flex version of Timesheet.

Post to Twitter

Visitors Around the World

Polls

How Is My Site?

View Results

Loading ... Loading ...

Categories

Meta

Links

hosted by easy2use.net