Creating users in a XEO Application

When building any web application, one of the first requirements is to have the concept of a user who can login to the application. In order create users in a new XEO Application you can do the following:

If you only need a user without any application-specific attributes, you can use Ebo_Perf instances (a model that comes bundled with the XEO Framework). To create users, login with the SYUSER with the XEO Administration Profile and click on the “Users” menu.  It will list the current users and let you create new ones.

Now, if you want to create new users, but you want them to have application-specific attributes? XEO comes bundled with an interface iXEOUser.ixeomodel that you can implement in your models. Whenever a Model implements the iXEOUser interface its instances become a user (the iXEOUser interface provides a username and password attribute).

So, how do you implement an Interface? In Eclipse, open the Model that you want to make a user from and under the “general” section click the “edit” button. In the right pane find the implemented interfaces section and click the plus button, save and build.

Interfaces

Interfaces

After this you should probably use the Scaffolding tool to generate (or re-generate) the list/edit viewer for this Model (don’t forget to check the “Include attributes from interfaces”). Create a new instance, give it a username and password and save. Logout and login with the newly created username

Happy coding!

Books

One of the things I really enjoy is reading. I enjoy reading technical books and non-technical books (as you may have seen in my “Goal for the year” posts.

Since I like to know what other people are reading (I used to follow a few friends In Amazon’s now extinct Linkedin Reading List app) I decided that I should share my readings with everyone and since I recently found out about Amazon’s Shelfari I thought I could share my favorite books with everyone (you can see them in the right side bar of the blog)

I hope to keep adding books that I read and hopefully also adding some reviews 😉

Happy coding!

Chrome 25 Bug – ExtJS 2.2 DatePicker extreme width

Hi everyone,

Chrome 25 was released just a few days ago and apparently it has an issue with CSS rendering. I couldn’t find much more on this, but there are some people complaining I’ve found out about this because of an issue with the DatePicker widget in ExtJS 2.2 (the version XEO ships with). I went on and tested Chrome with ExtJS 3 and 4 but the issue it not present.

This is what happens when you click on the DatePicker widget with Chrome 25

Chrome 25 DatePicker

Chrome 25 DatePicker

What happens is that when doing width calculations, there are some issues when width:100% is used, I can’t pin-point the situation exactly, but basically the DatePicket gets a width of more than 10.000 px wide. I found this to solve my problems with the DatePicker, so if you suffer from the same problem, use it:

/* Chrome25 Bug fix, 100% width causes issues with the date picker, replaced with a fixed width*/
table.x-date-inner {
   width:200px !important; /* original was width : 100% */
}

Just add this to a CSS your application uses, or replace the one in ExtJS. Hope it helps, I had to dig a lot in ExtJS source (and debugging in Google Chrome) to find out what was happening to produce a such a strange effect (that was not present in version 24).

Happy coding!