You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Marco Schoolenberg <Ma...@MaXware.nl> on 2001/11/23 14:08:07 UTC

Intake service, Velocity, Pull Service, mode's.

Hi there,


First of all sorry if I this question is a bit of the long nature.

I am working on A turbine app using the intake tool 
, the Pull service with the following settings
services.PullService.tools.per.request.refresh=true
And Velocity.

The intake tool finds the intake.xml and the intake.dtd 
The vm I am having trouble with (MyForm.vm) should be able to be displayed in 4 modes. 
(Search, New, View, Edit) .
The screen should Inet act with 3 tables from a DataBase(mysql using peer System).
MyTable being the table I want to validate the input fields from. the other two Table's I want to use to set a few fields belonging to the Object I want to display from MyTable. The Search 

calling the modes like "$link.setPage("MyFrom.vm").addQueryData("mode", "search")" 

The trouble now is that when I enter a value in the input search field and click the button Search (execute the rewritten doSearch()in the generated MyFormAction class) It doesn't seem to reach the methode at all. I have linked the action class to the screen by "$link.setPage("MyForm.vm").setAction("MyFormAction") " in the html Form tag 

When the page is rerendered, the "intake required field messages" for the fields that where invalid (and are not allowed to be empty according to intake.xml)  I am a bit new to Intake but I susspect the intake service is checking the input field for their validity before sending it to the Action class ?? 

I have looked at the flux admin tool to see if I can find an example of how to get around intake validation for this one mode for the MyForm.vm.  
But my version of the Admin tool doesn't use the intake. Can anyone give me some good Ideas to tacle this ?

So what I want is to use this one template for the 4 modes 
the Edit View and New modes must check the intake (on doBuildTemplate methode ) and the Search mode (on doBuildTemplate methode )  should only check and display intake info if the MyFormAction.eventsubmit_doSearch()  returns invalid field from the Database. 
I am able to view insert and update a record in the database in MyForm.vm using the intake DB.


Is the way to do this change the doBuildTemplate methode in MyForm.class to check for the mode given and build the screen without the intake stuff if the mode is search. I can't imagine that it hasn't been done yet. It seems to me that in my vm I will have to do something like 
#if(mode != "search")
    #set ( $group = $intake.MyTable.Default )
#else

#end
But this I don't want to do this since then I have to write all of the Display name's in the HTML manually which doesn't make the whole thing very generic. just think of the languages support 

I hope someone can direct me to the best way to tacle this.

Greetings Marco.Schoolenberg@Maxware.nl