CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 can an objects HTMLFormAction be accessed?

Print topic Send  topic

Author Message
r1xliquid

Posts: 41
Posted: 07/10/2007, 8:56 AM

I am trying to use custom code to change the HTMLFormAction porperty of a record.

The event beforeShow is called after the HTMLFormAction is initially set up by codecharge. I thought this would be a good place to attempt to change it. But it is not working for me. The action is still the one generated in the Show() funtion of the record's class.

If anyone has done this i would appreciate some guidance,

thanks, brian
View profile  Send private message
matheus

Posts: 386
Posted: 07/10/2007, 9:45 AM

brian,

I change HTMLFormAction in Java, in Java was a class named View.

It's where {HTMLFormAction} tag was changed with Record value.

Maybe is something like this in ASP.
_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
r1xliquid

Posts: 41
Posted: 07/10/2007, 10:37 AM

Quote matheus:
I change HTMLFormAction in Java, in Java was a class named View.
It's where {HTMLFormAction} tag was changed with Record value.

matheus,
i appreciate your reply. It looks to be a little different is ASP. the HTMLFormAction is a public property of my record's class. [recordClassName].htmlFormAction. So i am not quite sure where the View class comes into play.

From what event did you add the code to make this value change? I have tried from beforeShow with no success.

thanks again
brian
View profile  Send private message
matheus

Posts: 386
Posted: 07/10/2007, 10:59 AM

For me, in Java, HTMLFormAction is a property in Record.

But had a class in Common Files (in this case View.java) that, change all {thiskind} tag for values from components.

I create a ASP project (with Templates I think), I look that doesn't exists a general View class, so I take a create a record and take a look in code.

  
'NewRecord1 Show Method @2-676F0933  
    Sub Show(Tpl)  
  
        If NOT Visible Then Exit Sub  
  
        EditMode = False  
        HTMLFormAction = FileName & "?" & CCAddParam(Request.ServerVariables("QUERY_STRING"), "ccsForm", "NewRecord1" & IIf(EditMode, ":Edit", ""))  
        Set TemplateBlock = Tpl.Block("Record " & ComponentName)  
        TemplateBlock.Variable("HTMLFormName") = ComponentName  
        TemplateBlock.Variable("HTMLFormEnctype") ="application/x-www-form-urlencoded"  
        Set Controls = CCCreateCollection(TemplateBlock, Null, ccsParseOverwrite, _  
            Array(TextBox1, TextBox2, Button_Insert, Button_Update, Button_Delete))  
        If Not FormSubmitted Then  
        End If  
        If FormSubmitted Then  
            With TemplateBlock.Block("Error")  
                .Variable("Error") = ValidatingControls.GetErrors & Errors.ToString  
                .Parse False  
            End With  
        End If  
        TemplateBlock.Variable("Action") = HTMLFormAction  
  
        CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me)  
        If Visible Then Controls.Show  
    End Sub  
'End NewRecord1 Show Method  
  

I change like the first bold block, change TemplateBlock.Variable = YourNewFormAction

I don't think you have visibility to change TemplateBlock.Variable in before show.

Hope this help.

_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
r1xliquid

Posts: 41
Posted: 07/10/2007, 12:31 PM


I am not sure how codeCharge works using java, but with ASP it is not a good idea to change the actual code in the ASP files. Once that code is changed codeCharge will no longer makes updates to that function when you do a simple update in the GUI.

That is why i am attempting to find a way to change this from the _events.asp page.

Thanks
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.