Re: required fields formatting BEFORE validation

2008-03-16 Thread petros

What java class must the IValidationDelegate extend.
Should it be placed under the components package
How can we use this new validator in our pages

Petros


Martino Piccinato wrote:
> 
> Ok,
> 
> I reply to myself hoping this would be of any help for somebody else.
> Is as simple as to make your own IValidationDelegate and override
> (exemple)
> this method:
> 
> public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle,
> IFormComponent component, IValidator validator) {
> // If the form component represents a required field
> // it adds the required field class
> super.writeAttributes(writer, cycle,component,  validator);
> if (component.isRequired()) {
> writer.appendAttribute("class", "requiredField");
> }
> }
> 
> obviously then you have to use your IValidationDelegate in your
> pages/components.
> 
> 
> 
> On 3/23/07, Martino Piccinato <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> is there a "standard" way to define common formatting for required fields
>> BEFORE client/server side validation happens?
>> It's always a good thing for users to know compulsory fields before
>> starting data insertion.
>>
>> I know the issue is easy to solve just by adding few things but it would
>> be good to have this in componentes that accept "required" validator.
>>
>> Martino
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/required-fields-formatting-BEFORE-validation-tp9631849p16088778.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 ioc eager load with more than one module

2008-03-16 Thread Howard Lewis Ship
The order of operations for EagerLoad is not determined.

This could be a bug if it is reproducible.  It should apply to all
services across all modules.

On Sun, Mar 16, 2008 at 4:30 PM, Martijn Brinkers
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I'm using Tapestry 5 IOC stand alone (ie not using the web stuff). I
>  have two modules for building my services. Some services need to be
>  eager loaded so I have added the @EagerLoad annotation and call
>  performRegistryStartup() after RegistryBuilder.build().
>
>  The problem I face is that only the services from one module are eager
>  loaded but both modules have services that need to be eager loaded. It
>  seems that after eager loading the services of one module eager loading
>  just stops scanning other modules.
>
>  Is this by design or is this a bug?
>
>  Martijn Brinkers
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5 ioc eager load with more than one module

2008-03-16 Thread Martijn Brinkers
Hi,

I'm using Tapestry 5 IOC stand alone (ie not using the web stuff). I
have two modules for building my services. Some services need to be
eager loaded so I have added the @EagerLoad annotation and call
performRegistryStartup() after RegistryBuilder.build(). 

The problem I face is that only the services from one module are eager
loaded but both modules have services that need to be eager loaded. It
seems that after eager loading the services of one module eager loading
just stops scanning other modules.

Is this by design or is this a bug?

Martijn Brinkers  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax chart service

2008-03-16 Thread bioye

I'm using T4?  Will this work in tapestry 4.1.3.  And if necessary, can you
provide links or sample code on how to handle this in t4?  Thanks.


Davor Hrg wrote:
> 
> you need not ajax here,
> 
> just change src of the image,
> 
> first create an action link that can produce an image
> then use javascript to switch urls for the image...
> 
> http://wiki.apache.org/tapestry/Tapestry5HowToCreatePieChartsInAPage
> 
> Davor Hrg
> 
> On Sun, Mar 16, 2008 at 11:07 PM, bioye <[EMAIL PROTECTED]> wrote:
>>
>>  I have a service that generates images for using jfreechart.  I want to
>>  convert this service to ajax so that the chart image can load without
>>  reloading the whole page.  I have played around with div's and
>>  updateComponent and ResponseBuilder.  The ajax response seems to be
>>  generated but the image is never updated.  What is the problem?  Do I
>> need
>>  to find a way to include Javascript to load the image via scripting?  My
>>  ajax works for raw text but not for image services.
>>  --
>>  View this message in context:
>> http://www.nabble.com/Ajax-chart-service-tp16084794p16084794.html
>>  Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Ajax-chart-service-tp16084794p16085295.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax chart service

2008-03-16 Thread Renat Zubairov
IMHO you don't need AJAX for that, becuase AJAX require XML HTTP Request to
client, you don't really need to do that in case you know how your image URL
should looks like. For example if you implementing a zooming functionality
you just need a javascrtip to select an area of the image, then you
calculate (in javascript) coordinate of rendered graph (as subsect of
original image) and just replace the image's URL inside javascript. That's
all, browser will make a request to the server and refreshes the
image.Basically
it's something like

document.getElementById('im').src='img1.jpg'


I'm sure you will find a good replacement in Prototype for "
document.getElement...".

Renat

On 16/03/2008, bioye <[EMAIL PROTECTED]> wrote:
>
>
> I have a service that generates images for using jfreechart.  I want to
> convert this service to ajax so that the chart image can load without
> reloading the whole page.  I have played around with div's and
> updateComponent and ResponseBuilder.  The ajax response seems to be
> generated but the image is never updated.  What is the problem?  Do I need
> to find a way to include Javascript to load the image via scripting?  My
> ajax works for raw text but not for image services.
>
> --
> View this message in context:
> http://www.nabble.com/Ajax-chart-service-tp16084794p16084794.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Best regards,
Renat Zubairov


Re: Ajax chart service

2008-03-16 Thread Davor Hrg
you need not ajax here,

just change src of the image,

first create an action link that can produce an image
then use javascript to switch urls for the image...

http://wiki.apache.org/tapestry/Tapestry5HowToCreatePieChartsInAPage

Davor Hrg

On Sun, Mar 16, 2008 at 11:07 PM, bioye <[EMAIL PROTECTED]> wrote:
>
>  I have a service that generates images for using jfreechart.  I want to
>  convert this service to ajax so that the chart image can load without
>  reloading the whole page.  I have played around with div's and
>  updateComponent and ResponseBuilder.  The ajax response seems to be
>  generated but the image is never updated.  What is the problem?  Do I need
>  to find a way to include Javascript to load the image via scripting?  My
>  ajax works for raw text but not for image services.
>  --
>  View this message in context: 
> http://www.nabble.com/Ajax-chart-service-tp16084794p16084794.html
>  Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5, newbie: Grid use w dynamic columns

2008-03-16 Thread Alec Leamas

One of these days... it works to add a property to a BeanModel. If I
-  RTFM i. e., the javadocs.
- Provide a PropertyConduit to add().  (I missed that)

Sorry for wasting bandwidth

--alec.


Michael Kolmodin wrote:

Thanks for taking time for silly me :-)

Should have said that, but I tried to add a property to a BeanModel. 
However, this seems to fail if the class which was fed to the model's 
constructor doesn't have the property getter. As I understand it, I 
can enable/disable existing properties on a bean, but not create new 
ones?!


-
BeanModel model  =  beanModelSource.create( LdapRow.getClass(), false, 
componentResources);

model.add( "orvar");   -> Exception:

Error: Render queue error in SetupRender[ReportPage:grid]: Failure 
reading parameter 'model' of component ReportPage:grid: Class 
net.kln.yalt.pages.ReportPage$LdapRow does not contain a property 
named 'orvar' (within property expression 'orvar'). Available 
properties: class.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ajax chart service

2008-03-16 Thread bioye

I have a service that generates images for using jfreechart.  I want to
convert this service to ajax so that the chart image can load without
reloading the whole page.  I have played around with div's and
updateComponent and ResponseBuilder.  The ajax response seems to be
generated but the image is never updated.  What is the problem?  Do I need
to find a way to include Javascript to load the image via scripting?  My
ajax works for raw text but not for image services.
-- 
View this message in context: 
http://www.nabble.com/Ajax-chart-service-tp16084794p16084794.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5, newbie: Grid use w dynamic columns

2008-03-16 Thread Michael Kolmodin

Thanks for taking time for silly me :-)

Should have said that, but I tried to add a property to a BeanModel. 
However, this seems to fail if the class which was fed to the model's 
constructor doesn't have the property getter. As I understand it, I can 
enable/disable existing properties on a bean, but not create new ones?!


-
BeanModel model  =  beanModelSource.create( LdapRow.getClass(), false, 
componentResources);

model.add( "orvar");   -> Exception:

Error: Render queue error in SetupRender[ReportPage:grid]: Failure 
reading parameter 'model' of component ReportPage:grid: Class 
net.kln.yalt.pages.ReportPage$LdapRow does not contain a property named 
'orvar' (within property expression 'orvar'). Available properties: class.






Davor Hrg wrote:

Grid uses BeanModel, no need to mess with javassist

you can create default one by
injecting BeanModelSource and create it with it
after that you can play with the model.

or you can provide a list of columns to the grid to include/exclude



--
--
Michael KolmodinFredsgatan 2
Phone:  +46 920 269413  S-972 35 Lulea
Mobile  +46 70 551 6507 Sweden

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5, newbie: Grid use w dynamic columns

2008-03-16 Thread Davor Hrg
Grid uses BeanModel, no need to mess with javassist

you can create default one by
injecting BeanModelSource and create it with it
after that you can play with the model.

or you can provide a list of columns to the grid to include/exclude

Davor Hrg

On Sun, Mar 16, 2008 at 4:47 PM, Alec Leamas <[EMAIL PROTECTED]> wrote:
> Trying the hard parts first, I'm trying to create a table where the
>  columns are not known until runtime. The application is basically a
>  viewer, and the underlying database schema varies from time to time.
>
>  My question: is it somehow possible to define what columns to use in the
>  Grid component in runtime?  The T4 variant accepts a list, so it's no
>  problem. The T5 variant uses a bean to define the columns, and this is
>  trickier.
>
>  I've tried to use javassist to modify a a bean dynamically, but the Grid
>  complains that it cannot find the source for the getter method I added
>  to the bean.  This might just be the wrong way to do it, something wrong
>  with my first attemps to use javassist, or some problem with the idea to
>  use these kind of modified beans as source for the Grid.
>
>  Thanks for any help...
>
>  --Alec
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 : How to access to a Component Body ?

2008-03-16 Thread Francois Armand

Howard Lewis Ship wrote:

You should think not of the Tabs conponent "controlling" the Tab
components, but of all of them working together.

The Tabs component can place an object into the Environment.

The Tab components can retrieve that object, to "register" themselves
so that the Tabs can render the correct markup.

This is the relationship between Form and TextField (and friends).

  


A long time ago, I proposed this kind of solution, with component 
registering themselves to a master component (it was also for a tab-like 
component). It was for an old version of t5, but the code should be 
relevant :

http://markmail.org/search/list:org.apache.tapestry.users#query:list%3Aorg.apache.tapestry.users%20date%3A200708%20order%3Adate-forward+page:1+mid:qgywhbudcryvz2ks+state:results

--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5, newbie: Grid use w dynamic columns

2008-03-16 Thread Alec Leamas
Trying the hard parts first, I'm trying to create a table where the 
columns are not known until runtime. The application is basically a 
viewer, and the underlying database schema varies from time to time.


My question: is it somehow possible to define what columns to use in the 
Grid component in runtime?  The T4 variant accepts a list, so it's no 
problem. The T5 variant uses a bean to define the columns, and this is 
trickier.


I've tried to use javassist to modify a a bean dynamically, but the Grid 
complains that it cannot find the source for the getter method I added 
to the bean.  This might just be the wrong way to do it, something wrong 
with my first attemps to use javassist, or some problem with the idea to 
use these kind of modified beans as source for the Grid.


Thanks for any help...

--Alec

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: How to remove default.css?not replace

2008-03-16 Thread Kevin Menard
My guess is that he meant a valid CSS file that simply has no styling rules
in it.

-- 
Kevin


On 3/16/08 8:29 AM, "jimlaren" <[EMAIL PROTECTED]> wrote:

> I notice the TAPESTRY-2161 which is about this problem, Christian said
> "I would close this issue because you can override the default CSS with
> an empty one (which is in fact the same as disabling it).",but I try
> empty string and null both do not work,what is the meaning of empty one,
> thanks!
> 
> jim


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: How to remove default.css?not replace

2008-03-16 Thread jimlaren
I notice the TAPESTRY-2161 which is about this problem, Christian said 
"I would close this issue because you can override the default CSS with 
an empty one (which is in fact the same as disabling it).",but I try 
empty string and null both do not work,what is the meaning of empty one,

thanks!

jim
jimlaren wrote:

I would like to remove the default.css.I developed a site for i-mode
with chtml which have problem if there is a css file in the page.
any idea?

Thanks.

jim


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: HibernateEntityPackageManager contributions not being processed in 5.0.12

2008-03-16 Thread Hugo Palma
I changed from 5.0.7 to 5.0.11 in this case.

I didn't change any code in my app, i just upgraded the Tapestry version.
I'll try Monday (can only test this from the office) to upgrade into
every version between 5.0.7 and 5.0.11 to see in which version it
stopped working so that i can get more clues on what's going on.


Howard Lewis Ship wrote:
> Nothing's changed there between 5.0.11 and 5.0.12.  Could it be
> there's an error in your module, or in some of your mappings?
>
> On Fri, Mar 14, 2008 at 11:16 AM, Hugo Palma <[EMAIL PROTECTED]> wrote:
>   
>> This was working fine, but now it seems that my contribution doesn't
>>  even getting processed.
>>
>>  Maybe something changed in the way one can configure tapestry-hibernate ?
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> 
>
>
>
>   


How to override a service create with @Marker

2008-03-16 Thread Robin Helgelin
Hi,

This is my SaltSource service from tapestry5-acegi package.

@Marker(AcegiServices.class)
public static SaltSource buildSaltSource(@Inject
@Value("${acegi.password.salt}") final String salt) {
SystemWideSaltSource s = new SystemWideSaltSource();
s.setSystemWideSalt(salt);
return s;
}

How do I go ahead a create an alias override for that? This code from
my example application seemed to work before I added the @Marker
annotation.

public static void bind(ServiceBinder binder) {
binder.bind(SaltSource.class,
SaltSourceImpl.class).withId("MySaltSource");
}

public static SaltSource buildMySaltSource() throws Exception {
SaltSourceImpl saltSource = new SaltSourceImpl();
saltSource.setSystemWideSalt("ANOTHERBEEFYSALT");
saltSource.afterPropertiesSet();
return saltSource;
}

public static void contributeAlias(@InjectService("MySaltSource")
SaltSource saltSource,
Configuration configuration) {
configuration.add(AliasContribution.create(SaltSource.class,
saltSource));
}


-- 
 regards,
 Robin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Hibernate ValueEncoders

2008-03-16 Thread Filip S. Adamsen

Hi,

It means that you can pass Hibernate entities around instead of ids.

Example:

  void onActivate(Long id) { User user = session.get(User.class, id); }
  Long onPassivate() { return user.getId(); }

becomes

  void onActivate(User user) { ... }
  User onPassivate() { return user; }

And so forth. Of course this only works if you actually use 
tapestry-hibernate. :)


-Filip

On 2008-03-16 07:14, Angelo Chen wrote:

Hi,
  In Howard's blog, he mentioend:

Automatic Hibernate ValueEncoders: Use an entity as a page or event context
and what goes in the URL is the entity's id. Likewise, ids are turned back
into entities when passed to event handler methods.

What's really this? how to use it? Thanks.

A.C.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]