Jump to content


I would like to personalize a xml file


  • Please log in to reply
10 replies to this topic

#1 Guest_FBSVGR_*

Guest_FBSVGR_*
  • Guests

Posted 06 June 2006 - 06:56 AM

I have already post a message in the 'general discussion'. So, I well understand, I can modify an xml file somewhere to obtain an application with list. Isn't it ?
So, for that, I have to use the program 'template ide' I think.
So I have read the documentation. And, at this page : C:\Program Files\TierDeveloper .Net 5.2\Docs\TemplateIDE\html\index.html I see that a template 'WinXML: Meant to generate XML file for the WinForm GUI.
' exist. I think that I have to modify this template to obtain what I want, no ?
But I can't open this sample by copying an existing sample because it don't exist. Is it normal? How can I modify the file wich is name '<projectNameWin>.xml' ?

Thanks you very much for your help...

#2 Guest_Paul_*

Guest_Paul_*
  • Guests

Posted 06 June 2006 - 07:51 AM

So, I well understand, I can modify an xml file somewhere to obtain an application with list. Isn't it ?

Yes, your understanding is right.

So, for that, I have to use the program 'template ide' I think.

No, you don't need TemplateIDE to modify the xml file

Actually "<projectName>Win.xml" is an xml file that is generated when you generate WinForm application for your project. Suppose you create a tier developer project that has name "MyProject". When you generate WinForm application for your project from Project->WinForm Application->Generate menu, an xml file will be generated alongwith your WinForm project that has the name "MyProjectWin.xml". You can find this file at the following path:

$root path$\MyProject\UI

If you want to have listbox in your WinForm application, then you can modify the file "MyProjectWin.xml" as discussed in:
http://www.alachisof...p?showtopic=692

#3 Guest_FBSVGR_*

Guest_FBSVGR_*
  • Guests

Posted 06 June 2006 - 07:58 AM

Yes, it's ok for that.
But I have a data base with 94 tables. And I would like to have a list for any table. I think that it is possible to do that just by modify a template, no? I have to change at the hand the xml for each table ? It will be very long... i really can't modify the file wich will generate my application ?

#4 Guest_Paul_*

Guest_Paul_*
  • Guests

Posted 06 June 2006 - 09:11 AM

Yes, it is possible to modify the template for this purpose. You need to modify "win_xml.ts" template found at the following path:

$root path$\TierDeveloper .Net 5.2\Patterns\Private\WinXML\Source

Please read TemplateIDE Help to get an insight how to modify templates.

#5 Guest_FBSVGR_*

Guest_FBSVGR_*
  • Guests

Posted 06 June 2006 - 11:49 PM

Thanks a lot. I will try to find how and where I can do that change (cause I have see that the file is very long).

#6 Guest_Paul_*

Guest_Paul_*
  • Guests

Posted 07 June 2006 - 03:30 AM

You are welcome FBSVGR. You can also mail me your queries at support@alachisoft.com

#7 Guest_FBSVGR_*

Guest_FBSVGR_*
  • Guests

Posted 07 June 2006 - 06:13 AM

I have all the documentation this morning, but I don't understand how I can do a list for all my foreigns keys... I have only see that it's near the line 219 that I have to change some lines, but what is the line that I have to write, I don't understand...

#8 Guest_FBSVGR_*

Guest_FBSVGR_*
  • Guests

Posted 08 June 2006 - 12:20 AM

Ok, after a night of reflexion, I have obtain this idea:
What I want is to modify all controls for foreign keys from control="text" to control="list". So, can you explain me how can I test if a line is a foreign key?

#9 Guest_Paul_*

Guest_Paul_*
  • Guests

Posted 08 June 2006 - 04:11 AM

Try this line to modify all controls for foreign keys from control="text" to control="list".

control='<%if(Attr.IsForeignKey){%>List<%}else{%>Text<%}%>'

Please also add the <DBLookUp> tag which will populate the listbox by fetching the data from the database.

#10 Guest_FBSVGR_*

Guest_FBSVGR_*
  • Guests

Posted 09 June 2006 - 12:26 AM

ok, for the 'control', all is good.
But after, for the dblookup, I have always some questions:
thanks to if(Attr.IsForeignKey) I am able to repear a foreign key.
But after?
for dataobject:
How can I know on what table is linked the FK?

for method:
How can I know what is the name of the query that list all the table?

for display:
here i think that it is necessary to complete this field at the hand cause td can't find alone the field that is the good if there is more than 2 fields in the table...

#11 Guest_Paul_*

Guest_Paul_*
  • Guests

Posted 09 June 2006 - 09:36 AM

How can I know on what table is linked the FK?
For this purpose, you need to traverse all the objects in the project. "Project.Objects" gives you all the objects in the project. "Project.Objects.Count" gives you the total number of objects in the project. You need to figure out how many objects are related to your current object. Once you figure out the related objects, you can match which related object has a primary key with the same name as this foreign key, you need to use the name of that object in the dataobject.

How can I know what is the name of the query that list all the table?
Normally the 'ShowAll' query is the name of the query that list all the table.

For display, I agree with you that that it is necessary to complete this field at the hand.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users