Embed an icon in a flex panel

Just a quick post to display how to embed an image in a flex panel or title window. I’ve been adding them some to justcars.ie

<code>

<mx:Panel xmlns:mx=”http://www.adobe.com/2006/mxml”  width=”100%”
height=”100%” creationComplete=”initApp();”
xmlns:DataGrid=”com.zeninvent.justcars.flex.DataGrid.*”
xmlns:ns1=”components.*”
title=”Search”
titleIcon=”{ico}”>

<mx:Panel xmlns:mx=”http://www.adobe.com/2006/mxml”  width=”100%”

height=”100%” ”

title=”Search”

titleIcon=”{ico}”>

</code>

Then just add to the action script an ico var noting the icon source:

[Embed(source='iconSearch.png')]

private static const ico:Class;

One thing to bear in mind is that the icon must be in the same dir as the component.

Leave a Comment

Could not instantiate bean class Is it an abstract class?

Ran into an interesting error this afternoon.  I have a base class which is abstract and when i deployed my app I received the above error.

The fix is simple add abstract=”true” to your bean defination:

<bean id=”baseHandler” class=”com.zeninvent.justcars.web.handler.BaseHandler” abstract=”true”>

Hey Presto!

Leave a Comment

The input type of the launch configuration does not exist

Trying to run a JUnit test case & getting this error?

Right click on the folder in which you have located the test case and under build path – select use as source folder

Hey Presto!

Leave a Comment

Required extension “ant” not found Spring 2.0

Having this problem! It’s caused me untold trouble. Anyway the problem is actually in the spring distribution. Unzip the commons-attributes-compiler.jar, open the MANIFEST.MF and remove lines with a space and text.

Example:

ant-Implementation-URL: http://www.ibiblio.org/maven/ant/jars/ant-1.5.
jar

Should be replaced with:

ant-Implementation-URL: http://www.ibiblio.org/maven/ant/jars/ant-1.5.jar

There is quite a few of these to be fixed.

Save the file.

Rezip and ensure the .jar extension

Hey Presto!

Comments (3)

Spring Hibernate hbm2ddl.auto & Annotations

Spent Yesterday and today drawing up a schema for www.justcars.ie Ireland’s newest and hottest place to source your car.

To create this schema I wanted to get hibernate generate it via the POJOs I create. I am using annotations. So here is what i did:

Step One:

Create the POJO:

@Entity
public class Manufacteur {

@Id
private Integer manufacteurlId;

…..

}

Make sure you import javax.persistence.*; & not the more intuitive sounding hibernate one .

Step Two:

I am using a hibernate.cfg.xml for neatness:

<hibernate-configuration>
<session-factory name=”justCarsSessionFactory”>
<property name=”hibernate.connection.driver_class”>org.gjt.mm.mysql.Driver</property>
<property name=”hibernate.connection.password”>yourPassword</property>
<property name=”hibernate.connection.url”>jdbc:mysql://localhost:3306/YourScehma</property>
<property name=”hibernate.connection.username”>YourUsername</property>
<property name=”hibernate.default_schema”>jYourScehma</property>
<property name=”hibernate.dialect”>org.hibernate.dialect.MySQL5Dialect</property>
<property name=”show_sql”>true</property>
<property name=”hibernate.format_sql”>true</property>
<property name=”hibernate.hbm2ddl.auto”>create-drop</property>
<mapping package=”com.zeninvent.justcars.business”/>
<mapping class=”com.zeninvent.justcars.business.Manufacteur”/>
</session-factory>
</hibernate-configuration>

Change the pieces in bold as appropriate.

Step Three servlet:

Ensure your session factory bean if you are using annotations is using the AnnotationSession otherwise you will get an “Annotation Instance required ” exception.

Point the session factory to your hibernate.cfg.xml

<bean id=”sessionFactory” class=”org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean”>

<property name=”configLocation”><value>/WEB-INF/hibernate.cfg.xml</value></property>
<property name=”schemaUpdate”><value>true</value></property>
</bean>

Step Four:

Depoly & hey Presto hibernate is creating your schema! :)

Leave a Comment

Submitted

Well that’s it for now.. the project submitted here is the photo evidence…

http://dgca400.wordpress.com/2008/05/02/may-2nd-submission/

Comments (1)

Another Day Closer

Had a torrid morning with build problems on the laptop. When the build environment isn’t setup correctly it really gets very ugly. Needed to integrate David’s latest work into my build aswell just to add some spice.

In the afternoon did some more bug fixing on the CMS we’re over 90 of them now.. but i hope we’re almost there! :)

David started re-working the shopfront GUI to give it a more professional look and feel and has achieved some instant results in that department.

Was speaking with the other brokerage firm again today and they were impressed by the presentation we sent them. I’d said we would be in touch mid May to setup a meeting for the end of May to give them a demo of what can be done.

Looking forward to tomorrow and starting a fresh all n all I’ve produced a pretty measly output these past couple of days and am looking forward to having a more enjoyable and productive day tomorrow

Leave a Comment

The Development Envioroment

Just finished setting up the complete development on my laptop we’re back in business

Leave a Comment

An Intresting Day

in terms of code productivity I think we can put today in the write off bin. Hardware failure this morning on the sharepoint server caused me to spend the morning migrating from the backup data to here. There should also now be a noticeable improvement in access times! ;)

 We managed to fix our broken build from Monda. Turned out the acegi application context was missing the FileContent POJO.

 Dermot called to say he couldn’t do Thursday so we have had to re-schedule to next Tuesday evening.

 Then we recieved a call from Sean at Best Advice one of his customers is looking to implement an online purchase system similar to what we are currently implementing for Dermot. 

 Spent the evening Zen Invent-ing a power point presentation that David drew up of our quote and purchase system available here:

Zen Invent Quote & Purchase System

Then I was talking with Mark a manager of mine at Morgan Stanley in the summer. A friend of his is setting up a business which quieres streaming content over an SSL connection so we’ve gotten in touch with him about prototyping from the end of May onwards. His timescale those is short(isn’t everyones! ;) so it may not work – ut we would like to make it to.

 Setup mysql on the laptop this evening I’m going to shift development off the pc until the hardware problems are resloved.

 An Intresting if un-productive day in terms of code output anyway…

  

Leave a Comment

More Testing & Bug Fixing

Well had a big scare this morning.. arrived on the bridge of the star ship enterprise and was greeted by silence! .. Server was off and when I tried to power it back on there was no life.. So called up trusty Dell. Took the machine apart and put it back together brought it back to life! – It was a tense time!

With all the source backed up in the remote repo and the databases backed up each night it wouldn’t have been the end of the world – still it almost felt like it!

So lost the morning to that problem in the afternoon I carried on testing in particular I focused on preparing test cases 08 & 09 and their children for UAT. 08,09 refer to adding & updating client information & adding and updating client partner relationships.

I have now added validation to appropriate fields on the customer input forms and put in place some basic error handling for invalid client keys(for adding client partners) etc. Discovered an interesting issue with our Spring, Hibernate Transaction management architecture. While working on attempting to send back some meaningful error information to the flex client in the event of an exception being thrown I implemented some catchers. However, once an exception is caught we loose hibernate rolling back the transaction. So in the end I’ve just let an un-interesting error message be sent back to the flex client. It is something we need to flag as a future issue to look into. However, it is probably outside of our current scope due time constraints.

We’ve topped 60+ bugs now in the issue tracker which I am delighted to see.

Had quite a number of envious looks over at the work David was doing today, he is generating pdf views using Spring it looks really fantastic.. I’m quite jealous :)

Here is a screenshot of the ready for UAT customer details tab:

http://gaffneykev.no-ip.info/ca400blog/Docs/UATCustomerDetail.JPG

You might notice I have disabled the RIPs(residential investment property) text boxes. This is because if time allows I want to move this section to a separate tab and allow for any number of client RIPs to be added to a client record. Currently there is no such facility.

We finally managed to sort at another meeting with Dermot for Thursday evening.

We’re loosing another project day tomorrow as finishing our compiler assignment is on the agenda so we’re at t-minus 18 man days each left on the project.

Comments (1)

Older Posts »