A place for users and developers of the Xataface to discuss and receive support.
by tbabinszki » Sun Jul 08, 2007 7:07 am
Dear Forum,
I am in the process of setting up a complex application, and while reading the documentation, I came up with a bunch of questions which I cannot solve, probably due to my limited programming experience. I have some knowledge of PHP, MYSQL and HTML.
The application is the following:
It is a list of institutions. Users should be able to add an institution, name, country, state, city, and the type of institution. I was able to do this, the different options are drawn from select tables, such as a separate table contains the list of countries.
Depending which institution the user picks, there will be a table assigned to each, detailing more data about the institution, but these are different, such as banks or restaurants. So, one table will contain banks, one institutions, and the connection is the main record id.
Also, users can enter comments about the institution, like a blog, where a table will be set up, common key is main record id, and one comment per one institution, but in this case, this table can contain all the different institutions.
So, what I would like to achieve is the following:
I would like to list and browse the different institutions, which I believe I can do.
From here, I?m lost? I would like to set up a separate column, with buttons instead of data, where the user can get either the detailed data about the institution and the blog.
Also, the users should be able to add records.
The way I imagine this, is they can add the main record of the institution, at the end select the type of institution. Based on that selection, bank for example. Once user submits the form, the next for would pop up to collect the info about the certain bank.
I will have separate users, admin, guest, etc. I was able to set that up. For the regular user, I would like to keep the screen as simple as possible.
My other question, as I was testing some things, is that I?m not able to display two tables in one. For example, one table has recordid, name and countryid, the second has id, country name, capital. I would like a table where the order of columns is name, country, capital. I managed to do it in SQL, but when I tried adding an SQL statement to the fields.ini table, only the info from the first table came up.
Do you have any ideas for me how to get started?
Thank you:
Tamas
-
tbabinszki
-
- Posts: 6
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Tue Jul 10, 2007 12:11 am
Hi Tamas, This situation is currently a little bit more difficult to deal with than I would like. The situation that I am referring to is horizontal partitioning of entities so as to minimize null fields (i.e. using multiple tables all keyed on the same primary key to achieve inheritance). Separating the data about institutions into multiple tables is generally good database design, however it makes it a little bit more complicated to deal with. Luckily you appear to have some realistic expectations as to the user interaction for this system. As with anything there are many ways to achieve your goals. But I will try to offer some suggestions: I would like to set up a separate column, with buttons instead of data, You can use the %fieldname%__renderCell() method to customize how a cell is rendered for a particular field so that it displays your buttons as desired. If you don't want to render these buttons in any existing cell, you can set up a dummy field using the __sql__ directive of the fields.ini file, then implement the renderCell method for that field. (These instructions may be vague... if you do some searching in the forum and read the how tos, you'll should be able to piece it together as these concepts have been discussed). The way I imagine this, is they can add the main record of the institution, at the end select the type of institution. Based on that selection, bank for example. Once user submits the form, the next for would pop up to collect the info about the certain bank. You can use 'after action' triggers to cause the browser to automatically forward to the correct form when one form is completed. http://framework.weblite.ca/documentation/how-to/after_action_triggers(Once again sorry for the brevity of this.. if you get stuck, let me know and I can try to elaborate). My other question, as I was testing some things, is that I?m not able to display two tables in one. For example, one table has recordid, name and countryid, the second has id, country name, capital. I would like a table where the order of columns is name, country, capital. I managed to do it in SQL, but when I tried adding an SQL statement to the fields.ini table, only the info from the first table came up. The method you used should work. Another user has pointed out that there is a bug in the current version that prevents these "calculated" fields from showing up in details view, though they still show up in list view. ( http://framework.weblite.ca/forum/dataface-users/319248671). Even with the fix, you won't be able to edit fields from different tables on a single form. The next version of dataface (still under development) includes many features to help handle situations like this with greater ease... but until then, I'm sure there are workarounds.. Hope this helps a little. -Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by tbabinszki » Tue Jul 10, 2007 12:58 pm
Thank you Steve, this will help me continue on the project, I'll let you know if I have more questions, I sure will. For now, I would like to ask you if you have a roadmap for DataFace. I would like to know when the next version will be out, and what are the expected changes in the foreseeable future. With this project, I'm looking into a longer term development, so I wonder if I should start inventing something you are doing, for example, the forms vizard.
Thank you for your help:
Tamas
-
tbabinszki
-
- Posts: 6
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Tue Jul 10, 2007 5:12 pm
Hi Tamas,
I tried to put together a road map a while back, but the nature of the development made it tough to stick to. Development is driven by my clients' needs so it is hard to say long term what is on the agenda - that will depend on what my clients need. However I am committed to backward compatibility - i.e. new versions should not break old applications.
As far as the next version goes I have been focusing on restructuring the code to make it more modular and easier to maintain. A few key ones include: 1. A custom widget API. It will be easier to create custom widgets for use in Dataface. 2. Semantic Abstraction API (Ontologies). A method of working with data in a generic way. You will be able to create generic templates that treats records as particular types of records. For example you could create a calendar view to show the records of a table as if they were events, in a generic way. This will pave the way to having more generic actions and templates that will work for any application. 3. Inline AJAX editing. If you have "Edit" permissions, you can click on any content and edit it right there, without having to visit the "Edit" tab. 4. A Grid component. Now you can edit multiple rows of data in an edit form. Good for editing related records on the edit form. 5. Auto-complete widget. 6. Tabbed edit form. You can now separate fields of an edit form into multiple sections or tabs. 7. Related field editing. You can now edit related fields on an edit form. 8. Compound forms. You can now create forms to edit records in more than one table.
There are probably a few more features I will be adding too before the release, but these are the major ones.
No plans for a form wizard at this time.
Best regards
Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by datajunkie » Sat Oct 06, 2007 7:05 am
Hi Steve,
sounds encouraging! For me most interesting: When will Inline AJAX editing be avaiable? Also Grid component and Related field editing?
Thanks
Markus
-
datajunkie
-
- Posts: 6
- Joined: Wed Dec 31, 1969 5:00 pm
by datajunkie » Mon Oct 08, 2007 7:04 am
I've found the autocomplete feature. Nice, but with more then one possible hit not satisfying. Is there something similar avaiable in dataface to build a "google-suggest-like" search-inputfield?
Thanks
Markus
-
datajunkie
-
- Posts: 6
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Mon Oct 08, 2007 9:53 am
Ah... the next version (I know you're tired of hearing that probably) has this feature.... still not ready to release it though -Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by datajunkie » Mon Oct 08, 2007 11:46 am
Thanks, and i'm not tired to hear that. Dataface is one of the hottest candidates for use as my preferred framework for building database driven applications, so i'm still curious when the next releases with some more cool features will be avaiable.
Greetings
Markus
-
datajunkie
-
- Posts: 6
- Joined: Wed Dec 31, 1969 5:00 pm
by datajunkie » Tue Oct 16, 2007 4:50 pm
Hi Steve,
actually i have a standalone project where i use jQuery for some autocompleters. Would it be possible for me to integrate jQuery in dataface?
-
datajunkie
-
- Posts: 6
- Joined: Wed Dec 31, 1969 5:00 pm
by datajunkie » Wed Oct 17, 2007 8:17 am
Hi,
Martin PrŸss told me to include jQuery scripts in Dataface_Main_Template.html, so i'll give it a try.
-
datajunkie
-
- Posts: 6
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Wed Oct 17, 2007 10:24 pm
Yes you can do it that way. Generally it is better practice to not alter any of the dataface templates directly though.
You can: a) include your javascripts in one of the slots (e.g. the custom_javascripts slot) or b) override the Dataface_Main_Template.html file by copying it into your application's templates directory and making changes to that version.
I usually do option a as it is more precise.
-Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
Return to Xataface Users
Who is online
Users browsing this forum: No registered users and 2 guests
|