CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> Java

 Dynamic format pattern

Print topic Send  topic

Author Message
matheus

Posts: 386
Posted: 10/14/2005, 11:23 AM

Hi, in a textbox I need change format pattern with a value from session.

To show It's okay, I change the format pattern no before show from control.

But in validation it use default.

Some tip?
_________________
Matheus Trevizan

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

Posts: 50
Posted: 10/16/2005, 11:03 PM

I resolved such problem some time ago:
it is need to modify com.codecharge.components.Control.setValueFromRequest method and to add following code to it:
if ("sess".equals(this.formatPattern)) {
this.formatPattern = (String) this.getPage().getRequest().getSession().getAttribute(this.name+"Format");
}

after "try {"

I am not sure if it the only place to modify but I get result in my case.

in BeforeShow you write code (I use Control.beforeShow)

e.getControl().setFormatPattern("<yourFormat>");
e.getPage().getRequest().getSession().setAttribute(e.getControl().getName()+"Format", "<yourFormat>");

Note:
1. I use "sess" instead of "session" because "n" is replaced by "m" in format strings during generation for Date formats ("n" - minutes in CCS formats, "m" - the same in Java)
2. In property window you sholud specify "sess" as format for each control with dynamic formats.


_________________
Regards,
Michael
View profile  Send private message
matheus

Posts: 386
Posted: 10/17/2005, 10:27 AM

Thanks, It works.
_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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