Re: [T5.4] Dynamic Forms

2015-01-12 Thread Thiago H de Paula Figueiredo
On Mon, 12 Jan 2015 11:49:35 -0200, Thilo Tanner  
 wrote:



Hi Thiago,


Hi!

Thanks a lot for your prompt feedback! I will try to use the BeanEditor  
by contributing new property editors. :)


;)

I also thought about looping through the map entries and use the  
delegate component for the different field types.


BeanEditor does that, so I don't think there's any need for you to  
reimplement that. :)


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.4] Dynamic Forms

2015-01-12 Thread Thilo Tanner
Hi Thiago,

Thanks a lot for your prompt feedback! I will try to use the BeanEditor by 
contributing new property editors. I also thought about looping through the map 
entries and use the delegate component for the different field types. Let's see.

Best,
Thilo

--

Thilo Tanner
IT Development Lead

Direct +41 43 300 54 42
Mobile +41 79 506 46 36
thilo.tan...@reprisk.com

RepRisk AG, Stampfenbachstrasse 42, 8006 Zurich, Switzerland
Tel. +41 43 300 54 40, Fax +41 43 300 54 46
www.reprisk.com

Follow us on Facebook or Twitter:
www.facebook.com/RepRisk|www.twitter.com/RepRisk

If you are not the intended recipient, please notify the sender - thank you.


From: Thiago H de Paula Figueiredo 
Sent: Monday, January 12, 2015 13:56
To: Tapestry users
Subject: Re: [T5.4] Dynamic Forms

On Mon, 12 Jan 2015 09:46:12 -0200, Thilo Tanner
 wrote:

> Is it possible to generate a dynamic form containing each of the
> parameters by loading a form fragment based on the given type?

BeanEditor/BeanEditModel already do that. See section Adding New Property
Editors in http://tapestry.apache.org/beaneditform-guide.html. Any further
questions, just ask. :)

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.4] Dynamic Forms

2015-01-12 Thread Thiago H de Paula Figueiredo
On Mon, 12 Jan 2015 09:46:12 -0200, Thilo Tanner  
 wrote:


Is it possible to generate a dynamic form containing each of the  
parameters by loading a form fragment based on the given type?


BeanEditor/BeanEditModel already do that. See section Adding New Property  
Editors in http://tapestry.apache.org/beaneditform-guide.html. Any further  
questions, just ask. :)


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.4] Dynamic Forms

2015-01-12 Thread Thiago H de Paula Figueiredo
On Mon, 12 Jan 2015 09:46:12 -0200, Thilo Tanner  
 wrote:



Hi all,


Hi!

I'm currently working on a report generation tool (using JasperReports  
in the background). The reports will consist of multiple components.  
Beside having "static" parameters, I will need runtime parameters shared  
across the different components. The challenge I'm facing now, is to  
create a dynamic form for this runtime parameters. I imagine to have a  
Map or a similar construct calculated from the from the  
different components. For example, the Map could look this:


"title" => java.lang.String
"date" => java.util.Date
"companies" => java.util.List​


I think BeanEditor/BeanEditForm with BeanModel and one or more  
custom-written PropertyConduits is the way to go. BeanEditor already  
creates form fields dinamycally. In this case, the values you need to edit  
don't come from Java properties, so create a BeanModel using  
BeanModelSource and use BeanModel.add(String propertyName, PropertyConduit  
conduit) to add your Map-backed properties. PropertyModel is in interface  
used by BeanModel to get and set value.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



[T5.4] Dynamic Forms

2015-01-12 Thread Thilo Tanner
Hi all,

I'm currently working on a report generation tool (using JasperReports in the 
background). The reports will consist of multiple components. Beside having 
"static" parameters, I will need runtime parameters shared across the different 
components. The challenge I'm facing now, is to create a dynamic form for this 
runtime parameters. I imagine to have a Map or a similar 
construct calculated from the from the different components. For example, the 
Map could look this:

"title" => java.lang.String
"date" => java.util.Date
"companies" => java.util.List​
...

Is it possible to generate a dynamic form containing each of the parameters by 
loading a form fragment based on the given type?
Can I use the Dynamic component for it and if yes how (unfortunately, I 
couldn't find an example)?

http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Dynamic.html

All inputs are appreciated!

Thanks a lot and best,
Thilo
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


Re: dynamic forms concept & possible solutions

2014-04-14 Thread Ilya Obshadko
OK, so we can omit validation when needed.

That's great (I wasn't aware of such a method), but I don't like "hidden
submit" concept either, it looks more like a workaround rather than a
solution.

I remember from my earlier experience with Tapestry that simply calling
form.submit() without any hidden submit button didn't work. Is that still
the case?



On Tue, Apr 15, 2014 at 12:26 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Mon, 14 Apr 2014 09:39:33 -0300, Chris Poulsen 
> wrote:
>
>  I dont think onSuccess is called if validation fails, perhaps one could
>> adjust the outcome of the validation phase of the form like suggested.
>>
>
> Yeah, I just noticed that after I posted the message, and you're right
> about the validation phase (specifically of the form) being the right place
> for putting that code. Thanks for pointing this! :)
>
>
>
>>
>> On Mon, Apr 14, 2014 at 2:19 PM, Thiago H de Paula Figueiredo <
>> thiag...@gmail.com> wrote:
>>
>>  On Mon, 14 Apr 2014 07:36:27 -0300, Ilya Obshadko <
>>> ilya.obsha...@gmail.com>
>>> wrote:
>>>
>>>  - if we trigger form submission (it's possible to do that using hidden
>>>
 submit, it's not very elegant, but it works), we have to go through form
 validation which fails in most cases because at this point form is not
 yet completed; user receives non-relevant validation errors


>>> Please try this:
>>>
>>> @Environmental
>>> private ValidationTracker validationTracker;
>>>
>>> public void onSuccess() {
>>> if (notReallyValidationNow) { // submission from autocomplete
>>> validationTracker.clear(); // all validation errors are
>>> dropped
>>> }
>>> }
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Tapestry, Java and Hibernate consultant and developer
>>> http://machina.com.br
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Ilya Obshadko


Re: dynamic forms concept & possible solutions

2014-04-14 Thread Thiago H de Paula Figueiredo
On Mon, 14 Apr 2014 09:39:33 -0300, Chris Poulsen   
wrote:



I dont think onSuccess is called if validation fails, perhaps one could
adjust the outcome of the validation phase of the form like suggested.


Yeah, I just noticed that after I posted the message, and you're right  
about the validation phase (specifically of the form) being the right  
place for putting that code. Thanks for pointing this! :)





On Mon, Apr 14, 2014 at 2:19 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

On Mon, 14 Apr 2014 07:36:27 -0300, Ilya Obshadko  


wrote:

 - if we trigger form submission (it's possible to do that using hidden
submit, it's not very elegant, but it works), we have to go through  
form

validation which fails in most cases because at this point form is not
yet completed; user receives non-relevant validation errors



Please try this:

@Environmental
private ValidationTracker validationTracker;

public void onSuccess() {
if (notReallyValidationNow) { // submission from autocomplete
validationTracker.clear(); // all validation errors are
dropped
}
}

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org





--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: dynamic forms concept & possible solutions

2014-04-14 Thread Ville Virtanen

I think Thiago means onSubmit()

(If there are errors, it will never reach on success, right?)

This also means that client side validation must be disabled, or then a 
bit of JS must be used to disable it for the hidden button. (Js 
interface also exists to submit the form iirc, but for these bits 
someone else knows better than me probably.)


Ville

14.4.2014 15:19, Thiago H de Paula Figueiredo kirjoitti:
On Mon, 14 Apr 2014 07:36:27 -0300, Ilya Obshadko 
 wrote:



- if we trigger form submission (it's possible to do that using hidden
submit, it's not very elegant, but it works), we have to go through form
validation which fails in most cases because at this point form is 
not yet completed; user receives non-relevant validation errors


Please try this:

@Environmental
private ValidationTracker validationTracker;

public void onSuccess() {
if (notReallyValidationNow) { // submission from autocomplete
validationTracker.clear(); // all validation errors are dropped
}
}




-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: dynamic forms concept & possible solutions

2014-04-14 Thread Chris Poulsen
I dont think onSuccess is called if validation fails, perhaps one could
adjust the outcome of the validation phase of the form like suggested.


On Mon, Apr 14, 2014 at 2:19 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Mon, 14 Apr 2014 07:36:27 -0300, Ilya Obshadko 
> wrote:
>
>  - if we trigger form submission (it's possible to do that using hidden
>> submit, it's not very elegant, but it works), we have to go through form
>> validation which fails in most cases because at this point form is not
>> yet completed; user receives non-relevant validation errors
>>
>
> Please try this:
>
> @Environmental
> private ValidationTracker validationTracker;
>
> public void onSuccess() {
> if (notReallyValidationNow) { // submission from autocomplete
> validationTracker.clear(); // all validation errors are
> dropped
> }
> }
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: dynamic forms concept & possible solutions

2014-04-14 Thread Thiago H de Paula Figueiredo
On Mon, 14 Apr 2014 07:36:27 -0300, Ilya Obshadko  
 wrote:



- if we trigger form submission (it's possible to do that using hidden
submit, it's not very elegant, but it works), we have to go through form
validation which fails in most cases because at this point form is not  
yet completed; user receives non-relevant validation errors


Please try this:

@Environmental
private ValidationTracker validationTracker;

public void onSuccess() {
if (notReallyValidationNow) { // submission from autocomplete
validationTracker.clear(); // all validation errors are dropped
}   
}

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



dynamic forms concept & possible solutions

2014-04-14 Thread Ilya Obshadko
I've tried to approach the problem from different angles, but
unsuccessfully.

Let's suppose the following scenario (that's what I'm working on right now
actually).

You have an event registration form and you may register another
participant with you; you're using suggestion (autocomplete) to enter other
participant's name; if this person is already in the system, field is
marked with a checkmark; if not, user is prompted to enter email so the
system could send an invitation upon form completion.

What do we need to implement it?

1) handle autocompletion selection event (that's already done, the
resulting mixin is pretty straightforward once you realize the mechanics of
jQuery autocomplete).
2) update the form based on autocompletion result.

Now, here is a problem:

- if we use a component event request that updates form zone, yes, we can
get what we want, but everything user has entered into other fields is
lost; obviously this is not acceptable

- if we trigger form submission (it's possible to do that using hidden
submit, it's not very elegant, but it works), we have to go through form
validation which fails in most cases because at this point form is not yet
completed; user receives non-relevant validation errors

- FormInjector might be a solution, but it can only add something to a
form, rather than update its current controls

So none of the above can actually solve the problem.

Are there any other approaches to this?

-- 
Ilya Obshadko


Re: Dynamic forms

2012-04-25 Thread Lance Java
BeanEditForm and BeanEditor both accept a BeanModel parameter. You will
need to implement a custom BeanModel which is likely based on config stored
in a database


Re: Dynamic forms

2012-04-25 Thread trsvax
http://tapestry.1045711.n5.nabble.com/writer-writeRaw-String-text-td5601234.html#a5601626

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Dynamic-forms-tp5665475p5665566.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Dynamic forms

2012-04-25 Thread Tim Koop
I'm making a way for the user to create a dynamic form, with their own 
defined fields.


But how can I do this with Tapestry, since it links the form fields with 
Java variables?  I can't create dynamic variables.


Any ideas?  Thanks.

Tim Koop
t...@timkoop.com 
www.timkoop.com 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Dynamic forms

2012-02-23 Thread Robert Zeigler
In general, it shouldn't be a problem to mix and match Cayenne objects with 
other object types.
The integration tries hard to distinguish between objects it should analyze in 
a cayenne-specific
manner, and those that should just pass through.

Just looked at the line of code and at the point of failure.

I'm guessing that you're calling "resources.getContainerMessages()" from inside 
a page class?

If that's the case, just use resources.getMessages().

getContainerMessages() is useful for component building, if you have a 
component that is building an model from an object passed to it by its parent, 
and you want to be able to override the defaults in the parent's messages.  But 
a page has no parent, so getContainerMessages() is null.

Robert

On Feb 23, 2012, at 2/235:42 PM , Richard Frovarp wrote:

> On 02/23/2012 05:30 PM, Robert Zeigler wrote:
>> Hey Richard,
>> 
>> What version are you using of:
>>   the integration module
>>   Tapestry
>>   Cayenne
>> 
>> ?
>> 
>> Also, can you tell me what the actual exception was?
>> 
>> Robert
>> 
> tapestry5-cayenne-core (and -server) 0.4
> Tapestry 5.2.6
> 
> Line of code that threw the exception:
> 
> model = beanModelSource.create(BaseObject.class, true, 
> resources.getContainerMessages());
> 
> And the exception to where it hit my code:
> 
> java.lang.NullPointerException
> org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304)
> org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.(PropertyModelImpl.java:52)
> org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126)
> org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78)
> org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184)
> org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153)
> com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59)
> edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45)
> 
> This isn't something I would want backed by Cayenne. I would probably stick 
> it in JCR or something, but there would be pieces of the application I would 
> want to use Cayenne. I have not had a chance to look at how to not use the 
> Cayenne piece for parts of the application.
> 
> Full stack trace:
> 
> java.lang.NullPointerException
> org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304)
> org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.(PropertyModelImpl.java:52)
> org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126)
> org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78)
> org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184)
> org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153)
> com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59)
> edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45)
> edu.ndsu.eci.research.form_generator.pages.Index.(Index.java)
> org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.(InternalComponentResourcesImpl.java:146)
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.(ComponentPageElementImpl.java:593)
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.(ComponentPageElementImpl.java:609)
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.performAssembleRootComponent(ComponentAssemblerImpl.java:93)
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.access$000(ComponentAssemblerImpl.java:38)
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:82)
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:79)
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:77)
> org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:182)
> org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:174)
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
> org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:173)
> org.apache.tapestry5.internal.services.PageSo

Re: Dynamic forms

2012-02-23 Thread Richard Frovarp

On 02/23/2012 05:30 PM, Robert Zeigler wrote:

Hey Richard,

What version are you using of:
   the integration module
   Tapestry
   Cayenne

?

Also, can you tell me what the actual exception was?

Robert


tapestry5-cayenne-core (and -server) 0.4
Tapestry 5.2.6

Line of code that threw the exception:

model = beanModelSource.create(BaseObject.class, true, 
resources.getContainerMessages());


And the exception to where it hit my code:

java.lang.NullPointerException
org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304)
org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.(PropertyModelImpl.java:52)
org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126)
org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78)
org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184)
org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153)
com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59)
edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45)

This isn't something I would want backed by Cayenne. I would probably 
stick it in JCR or something, but there would be pieces of the 
application I would want to use Cayenne. I have not had a chance to look 
at how to not use the Cayenne piece for parts of the application.


Full stack trace:

java.lang.NullPointerException
org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304)
org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.(PropertyModelImpl.java:52)
org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126)
org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78)
org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184)
org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153)
com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59)
edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45)
edu.ndsu.eci.research.form_generator.pages.Index.(Index.java)
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.(InternalComponentResourcesImpl.java:146)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.(ComponentPageElementImpl.java:593)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.(ComponentPageElementImpl.java:609)
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.performAssembleRootComponent(ComponentAssemblerImpl.java:93)
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.access$000(ComponentAssemblerImpl.java:38)
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:82)
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:79)
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:77)
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:182)
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:174)
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:173)
org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:81)
org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:74)
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55)
org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2326)
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:321)
com.googlecode.tapestry5cayenne.services.CayenneRequestFilter.service(CayenneRequestFilter.java:47)
edu.ndsu.eci.research.form_generator.services.AppModule$1.service(App

Re: Dynamic forms

2012-02-23 Thread Robert Zeigler
Hey Richard,

What version are you using of:
  the integration module
  Tapestry
  Cayenne

?

Also, can you tell me what the actual exception was?

Robert

On Feb 22, 2012, at 2/225:56 PM , Richard Frovarp wrote:

> I'm trying to create dynamic forms that will be configured from an outside 
> source. I know this question has been asked in the past, but I don't quite 
> get the answers. I've tried to create my own BeanModel, but I'm getting 
> exceptions when copying the code from here:
> 
> http://tapestry.apache.org/beaneditform-guide.html
> 
> * 
> org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304)
> 
> * 
> org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.(PropertyModelImpl.java:52)
> 
> * 
> org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126)
> 
> * 
> org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78)
> 
> * 
> org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184)
> 
> * 
> org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153)
> 
> * 
> com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59)
> 
> * 
> com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.createEditModel(CayenneBeanModelSource.java:47)
> 
> * edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45)
> 
> 
> And yes, I put my own bean in there.
> 
> Any suggestions, or better yet example code would be great.
> 
> Thanks,
> Richard
> 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Dynamic forms

2012-02-23 Thread Richard Frovarp

On 02/22/2012 05:57 PM, Lenny Primak wrote:

Something ate your exception (probably Nabble) its not in your post.



No, that was my fault. I do see that it might not be a problem with the 
main Tapestry code, but instead the Cayenne integration.


However, in general, does anyone have any good example code for actually 
doing dynamic forms?


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Dynamic forms

2012-02-22 Thread Lenny Primak
Something ate your exception (probably Nabble) its not in your post.

On Feb 22, 2012, at 6:56 PM, Richard Frovarp wrote:

> I'm trying to create dynamic forms that will be configured from an outside 
> source. I know this question has been asked in the past, but I don't quite 
> get the answers. I've tried to create my own BeanModel, but I'm getting 
> exceptions when copying the code from here:
> 
> http://tapestry.apache.org/beaneditform-guide.html
> 
> * 
> org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304)
> 
> * 
> org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.(PropertyModelImpl.java:52)
> 
> * 
> org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126)
> 
> * 
> org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78)
> 
> * 
> org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184)
> 
> * 
> org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153)
> 
> * 
> com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59)
> 
> * 
> com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.createEditModel(CayenneBeanModelSource.java:47)
> 
> * edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45)
> 
> 
> And yes, I put my own bean in there.
> 
> Any suggestions, or better yet example code would be great.
> 
> Thanks,
> Richard
> 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Dynamic forms

2012-02-22 Thread Richard Frovarp
I'm trying to create dynamic forms that will be configured from an 
outside source. I know this question has been asked in the past, but I 
don't quite get the answers. I've tried to create my own BeanModel, but 
I'm getting exceptions when copying the code from here:


http://tapestry.apache.org/beaneditform-guide.html

 * 
org.apache.tapestry5.internal.TapestryInternalUtils.defaultLabel(TapestryInternalUtils.java:304)

 * 
org.apache.tapestry5.internal.beaneditor.PropertyModelImpl.(PropertyModelImpl.java:52)

 * 
org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:126)

 * 
org.apache.tapestry5.internal.beaneditor.BeanModelImpl.add(BeanModelImpl.java:78)

 * 
org.apache.tapestry5.internal.services.BeanModelSourceImpl.create(BeanModelSourceImpl.java:184)

 * 
org.apache.tapestry5.internal.services.BeanModelSourceImpl.createEditModel(BeanModelSourceImpl.java:153)

 * 
com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.create(CayenneBeanModelSource.java:59)

 * 
com.googlecode.tapestry5cayenne.services.CayenneBeanModelSource.createEditModel(CayenneBeanModelSource.java:47)

 * edu.ndsu.eci.research.form_generator.pages.Index.initializer(Index.java:45)


And yes, I put my own bean in there.

Any suggestions, or better yet example code would be great.

Thanks,
Richard



Re: Cross Validation in dynamic Forms

2010-02-18 Thread Stephan Windmüller
Dominik Gätjens wrote:

> Thank you Stephan this works perfect and it was a big step in my
> understanding of Tapestry. Do you mind if i create a wiki articel out
> of your code example?

Of course not. I would have done it myself but did not find the time.

Regards
 Stephan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



AW: AW: Cross Validation in dynamic Forms

2010-02-18 Thread Dominik Gätjens
Thank you Stephan this works perfect and it was a big step in my understanding 
of Tapestry. Do you mind if i create a wiki articel out of your code example?

-Ursprüngliche Nachricht-
Von: Stephan Windmüller [mailto:stephan.windmuel...@cs.tu-dortmund.de] 
Gesendet: Mittwoch, 17. Februar 2010 16:23
An: users@tapestry.apache.org
Betreff: Re: AW: Cross Validation in dynamic Forms

Dominik Gätjens wrote:

> I read this thread but don't understand it. Do you have a code example for me?

The setup is complex. Follow these steps and let me know if there is
anything unclear:

1. Save controlNames of all fields

If your field has the id "myField", use this code:

-

private Map controlNames;

void onValidateFromMyField(Object value) {
if (controlNames == null) {
controlNames = new HashMap();
}

controlNames.put(paper, myField.getControlName());
}

-

Object is the current value you are iterating over, depending on your
page. Verify in onValidateForm that all controlNames are set.


2. Create your own component SimpleField:



public class SimpleField implements Field {

private String controlName;

public void setControlName(String controlName) {
this.controlName = controlName;
}

public String getControlName() {
return this.controlName;
}

[...]
}



Put it in your tml and inject it in your page code.


3. Use both in onValidateForm

Check the submitted values in onValidateForm. If a field should be
marked, set the controlName of the simpleField and record an error for it.

HTH
 Stephan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: AW: Cross Validation in dynamic Forms

2010-02-17 Thread Stephan Windmüller
Dominik Gätjens wrote:

> I read this thread but don't understand it. Do you have a code example for me?

The setup is complex. Follow these steps and let me know if there is
anything unclear:

1. Save controlNames of all fields

If your field has the id "myField", use this code:

-

private Map controlNames;

void onValidateFromMyField(Object value) {
if (controlNames == null) {
controlNames = new HashMap();
}

controlNames.put(paper, myField.getControlName());
}

-

Object is the current value you are iterating over, depending on your
page. Verify in onValidateForm that all controlNames are set.


2. Create your own component SimpleField:



public class SimpleField implements Field {

private String controlName;

public void setControlName(String controlName) {
this.controlName = controlName;
}

public String getControlName() {
return this.controlName;
}

[...]
}



Put it in your tml and inject it in your page code.


3. Use both in onValidateForm

Check the submitted values in onValidateForm. If a field should be
marked, set the controlName of the simpleField and record an error for it.

HTH
 Stephan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



AW: Cross Validation in dynamic Forms

2010-02-17 Thread Dominik Gätjens
I read this thread but don't understand it. Do you have a code example for me?


Thanks

Dominik
-Ursprüngliche Nachricht-
Von: Stephan Windmüller [mailto:stephan.windmuel...@cs.tu-dortmund.de] 
Gesendet: Mittwoch, 17. Februar 2010 10:45
An: users@tapestry.apache.org
Betreff: Re: Cross Validation in dynamic Forms

Dominik Gätjens wrote:

> I'm building a dynamic form with textfields on the fly and need to do
> some cross validation. This all works pretty and i find two fields
> that are invalid together. 
> 
> But how can I report this error AND mark both fields as invalid? I
> don't have a component to call  Form.recordError(field, errorMessage)

I had the same problem and solved it using a simple field for which I
set the internal controlName property to the one of the validated
component. Please have a look at the thread

"Adding textfields to a form dynamically"

on this mailing list last week.

Regards
 Stephan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Cross Validation in dynamic Forms

2010-02-17 Thread Stephan Windmüller
Dominik Gätjens wrote:

> I'm building a dynamic form with textfields on the fly and need to do
> some cross validation. This all works pretty and i find two fields
> that are invalid together. 
> 
> But how can I report this error AND mark both fields as invalid? I
> don't have a component to call  Form.recordError(field, errorMessage)

I had the same problem and solved it using a simple field for which I
set the internal controlName property to the one of the validated
component. Please have a look at the thread

"Adding textfields to a form dynamically"

on this mailing list last week.

Regards
 Stephan

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



AW: Cross Validation in dynamic Forms

2010-02-16 Thread Dominik Gätjens
Hey, this doesn't work i only get the last textfield. But i guess you are mean 
@InjectComponent instead of @Inject?

My code looks like:








@InjectComponent
private TextField tippHeim;
@InjectComponent
private TextField tippGast;
@Persist
private Map tfMap;
void onAfterSubmit(){
for(Tipp t:tipps){
if(tipp.equals(t)){
tfMap.put(tipp, new 
TextField[]{tippGast,tippHeim});
}
}
}

I checked the onAfterSubmit() with my debugger and find always the two same 
TextField Objects.


Dominik


-Ursprüngliche Nachricht-
Von: Ulrich Stärk [mailto:u...@spielviel.de] 
Gesendet: Dienstag, 16. Februar 2010 15:38
An: Tapestry users
Betreff: Re: Cross Validation in dynamic Forms

Depends on how you are doing the "dynamic" part. If you are looping over your 
textfields, then 
injecting them into the page class should work, e.g.  and "@Inject private TextField foo" should give you the field of 
the current iteration.

Uli

On 16.02.2010 14:34 schrieb Dominik Gätjens:
> Hello List,
>
>
>
> I'm building a dynamic form with textfields on the fly and need to do some 
> cross validation. This all works pretty and i find two fields that are 
> invalid together.
>
> But how can I report this error AND mark both fields as invalid? I don't have 
> a component to call  Form.recordError(field, errorMessage)
>
>
>
> Thanks
>
>
>
> Dominik
>
>
>
>
>
>
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Cross Validation in dynamic Forms

2010-02-16 Thread Ulrich Stärk
Depends on how you are doing the "dynamic" part. If you are looping over your textfields, then 
injecting them into the page class should work, e.g. /> and "@Inject private TextField foo" should give you the field of the current iteration.


Uli

On 16.02.2010 14:34 schrieb Dominik Gätjens:

Hello List,



I'm building a dynamic form with textfields on the fly and need to do some 
cross validation. This all works pretty and i find two fields that are invalid 
together.

But how can I report this error AND mark both fields as invalid? I don't have a 
component to call  Form.recordError(field, errorMessage)



Thanks



Dominik










-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Cross Validation in dynamic Forms

2010-02-16 Thread Dominik Gätjens
Hello List,

 

I'm building a dynamic form with textfields on the fly and need to do some 
cross validation. This all works pretty and i find two fields that are invalid 
together. 

But how can I report this error AND mark both fields as invalid? I don't have a 
component to call  Form.recordError(field, errorMessage)

 

Thanks

 

Dominik

 

 

 



Re: dynamic forms

2009-09-20 Thread Thiago H. de Paula Figueiredo
Em Sun, 20 Sep 2009 21:24:17 -0300, Alfonso Quiroga  
 escreveu:



Hi! When I use static forms in T5'tmls everything OK but... what
happens if I have



And when I'm rendering the page, in javascript (maybe via ajax) I want
to append inputs to that form? Is it possible? I was thinking that
maybe there are problems with inputs unique names, and the manner of
receiving that "dynamic inputs" from java side. Thanks


Take a look at these components: AjaxFormLoop, FormFragment, FormInjector.

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



dynamic forms

2009-09-20 Thread Alfonso Quiroga
Hi! When I use static forms in T5'tmls everything OK but... what
happens if I have



And when I'm rendering the page, in javascript (maybe via ajax) I want
to append inputs to that form? Is it possible? I was thinking that
maybe there are problems with inputs unique names, and the manner of
receiving that "dynamic inputs" from java side. Thanks

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: Dynamic Forms & Grids

2009-08-27 Thread Thiago H. de Paula Figueiredo

Em Thu, 27 Aug 2009 13:06:14 -0300, Sparqle  escreveu:


Hi Thiago,


Hi!


Based on your post, I am thinking that this type of behavior is not
supported by T5.


I would say that it is supported, but out-of-the-box you would be way  
better supported if not using this modeling you're using.



I am wondering whether the "if" component, and the
"AjaxFormLoop" could combine to simulate this same functionality.


Take a look at how BeanEditor works. Maybe it could help you.


For the
Grids though, I am not sure whether I can achieve this result without
predefined classes.


You can work with Grid without predefined classes. Internally, Grid uses a  
BeanModel (that can be passed as a parameter) to get the properties of the  
object and their values. Take a look at BeanModel and PropertyConduit.



This has to be a common requirement for many sites. I know some of the
largest sites on the Internet use this type of a system.


Could you give use some examples?

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: Dynamic Forms & Grids

2009-08-27 Thread Sparqle

Hi Thiago,

Thanks for reviewing my long post and responding. I understand your concerns
about the database schema not being ideal, but creating separate Java
classes for each one of the "itemtypes" is not acceptable as we are planning
to create a site where end-users can define their own categories and
attributes and the associated UI controls. There could be hundreds of
thousands of these categories and millions of attributes.

Based on your post, I am thinking that this type of behavior is not
supported by T5. I am wondering whether the "if" component, and the
"AjaxFormLoop" could combine to simulate this same functionality. For the
Grids though, I am not sure whether I can achieve this result without
predefined classes.

This has to be a common requirement for many sites. I know some of the
largest sites on the Internet use this type of a system. I would appreciate
if you can point me to any other alternatives without "predefined" classes
for "Book", "DVD" etc in T5.



Thiago H. de Paula Figueiredo wrote:
> 
> Em Wed, 26 Aug 2009 21:14:01 -0300, sparqle 
> escreveu:
> 
>> Hi,
> 
> Hi!
> 
>> I would like to understand how to create dynamic forms and grids in T5.
> 
> T5 is all about static structure, dynamic behaviour.
> 
>> Now I would like to store all of item types (book, car, tv etc.) in 1  
>> database
>> table called "itemtypes", and all the attributes in one database table
>> called "attributes". Both these tables are linked by a many-to-many
>> relationship. I will create another table called "items", where the
>> individual items are stored ("Gone with the wind", "Lord of the Rings"
>> etc.). I will create another table called "itemAttributeValues" where the
>> values for the attributes for each item will be stored ("Gone with the  
>> wind" - 900 pages, "Margaret Mitchell", 1937).
> 
> I'm sorry to be so sincere, but this kind of database approach is  
> absolutely awful. Something awful enough to appear in TheDailyWTF.com (if  
> it wasn't featured there already). Tapestry 5 has BeanEditForm,  
> BeanEditor, Grid and BeanDisplay, all them time-savers when writing a form  
> or grid or object view, but they only work if you provide them  
> decently-modelled entity classes (a Book class with title and author  
> properties, a DVD class with title and director properties).
> 
>> Can anybody help me here?? I assume this must be a common requirement in
>> many systems!!
> 
> This is already implemented in Tapestry 5, as long as you have  
> decently-modelled classes.
> Take a look at the documentation of the components cited above and the  
> BeanEditor or BeanEditForm examples in  
> http://jumpstart.doublenegative.com.au:8080/jumpstart/.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/t5-Dynamic-Forms-Grids-tp3520407p3527617.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: Dynamic Forms & Grids

2009-08-27 Thread Thiago H. de Paula Figueiredo

Em Wed, 26 Aug 2009 21:14:01 -0300, sparqle  escreveu:


Hi,


Hi!


I would like to understand how to create dynamic forms and grids in T5.


T5 is all about static structure, dynamic behaviour.

Now I would like to store all of item types (book, car, tv etc.) in 1  
database

table called "itemtypes", and all the attributes in one database table
called "attributes". Both these tables are linked by a many-to-many
relationship. I will create another table called "items", where the
individual items are stored ("Gone with the wind", "Lord of the Rings"
etc.). I will create another table called "itemAttributeValues" where the
values for the attributes for each item will be stored ("Gone with the  
wind" - 900 pages, "Margaret Mitchell", 1937).


I'm sorry to be so sincere, but this kind of database approach is  
absolutely awful. Something awful enough to appear in TheDailyWTF.com (if  
it wasn't featured there already). Tapestry 5 has BeanEditForm,  
BeanEditor, Grid and BeanDisplay, all them time-savers when writing a form  
or grid or object view, but they only work if you provide them  
decently-modelled entity classes (a Book class with title and author  
properties, a DVD class with title and director properties).



Can anybody help me here?? I assume this must be a common requirement in
many systems!!


This is already implemented in Tapestry 5, as long as you have  
decently-modelled classes.
Take a look at the documentation of the components cited above and the  
BeanEditor or BeanEditForm examples in  
http://jumpstart.doublenegative.com.au:8080/jumpstart/.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: Dynamic Forms & Grids

2009-08-26 Thread sparqle

Hi,
I would like to understand how to create dynamic forms and grids in T5. For
example, suppose I am trying to build a site like Amazon.com with lot of
items for sale (including books, tvs, computers etc.). Each type of item may
have its own set of attributes - books (author, number of pages, publication
year, isbn etc.), tv (brand, refresh rate, crt/lcd/plasma, size etc.). Now I
would like to store all of item types (book, car, tv etc.) in 1 database
table called "itemtypes", and all the attributes in one database table
called "attributes". Both these tables are linked by a many-to-many
relationship. I will create another table called "items", where the
individual items are stored ("Gone with the wind", "Lord of the Rings"
etc.). I will create another table called "itemAttributeValues" where the
values for the attributes for each item will be stored ("Gone with the wind"
- 900 pages, "Margaret Mitchell", 1937).

Now I would like to provide some forms for the users to edit/input this
information, and some grids to view this information. I obviously don't want
to create a separate form/grid for each "item type" as there may be hundreds
of such categories. What I want is to store the "UI Component" associated
with each attribute in the database, and then display dynamic forms based on
this, depending on the specific item being viewed/edited. The "UI Component"
could be numeric (integer/double etc.), textfield, select, checkbox/radio,
or date. 

So the end effect should be:
If user goes to url: http://mydomain.com/item/edit/1 - a list of controls
may be presented that are relevant to that item, and may be completely
different from the controls displayed on http://mydomain.com/item/edit/2.  

Also, the column names on the grid should change dynamically based on the
itemtypes being displayed in the grid. it is safe to assume that only items
belonging to one itemtype will be displayed within the same grid.

I have been able to implement such a user interface quite easily using pure
"Java" based frameworks like ZK, but I can't figure out how to implement it
in Tapestry. I think there is way to do this in T5, and people have referred
to the "FormInjector" component, but I looked at some examples and cannot
understand how it relates to my problem. Some others have hinted at the
"Delegate" component, but i can't understand that either. Then some others
have hinted at the "Block" component, but i have not been able to understand
that either:-(

Can anybody help me here?? I assume this must be a common requirement in
many systems!!
-- 
View this message in context: 
http://www.nabble.com/t5%3A-Dynamic-Forms---Grids-tp25163809p25163809.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Bug with large dynamic forms?

2006-10-15 Thread Norbert Sándor

You should create a JIRA issue with an attached test case.

Regards,
Norbi

[EMAIL PROTECTED] wrote:

Hello all!

I think I way be experiencing a bug in tapestry but wanted to find out
if anyone else had experienced it or has heard about it.

When I have a large dynamic form, with fields rendered for a couple
hundred objects in my collection, the Form component seems to wig out
and not render the formids hidden field properly.

Instead of the expected
value="imagesList,title,date,location,tags,rotate,description,title_0,d
... etc.  I see that it renders (for the formids hidden field) a value
attribute that looks like value=<1000+ spaces> />.  No quotes, just
value=, then over a thousand spaces, then the close of the tag.

I struggled all day with the form not working, then noticed this weird
formids value in the rendered page source.  After failing to see what I
was doing incorrectly, I finally gave up and just for a random stab,
tested my page with a dataset of only 6 objects instead of a few
hundred.  And it worked!

-- Thaddeus


-
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: Bug with large dynamic forms?

2006-10-15 Thread D&J Gredler

Never heard of anything like this...

On 10/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Of course I can design around the issue, but I would prefer not to.
This component of the application is internal only, to the amount of
data passed in the request is not as big of a deal.  The point was to
eliminate unneccessary pagination, which I have seen have a history of
aggrivating users working on large datasets.

I am just trying to find out if this is a known issue before I work on
putting together a simpler recreation of the problem for a bug report.
If this capacity of the framework can only work within a threshold, then
it seems like a bug, be it in the framework or the docs.

>  Original Message 
> Subject: Re: Bug with large dynamic forms?
> From: Jabbar <[EMAIL PROTECTED]>
> Date: Sun, October 15, 2006 4:22 pm
> To: "Tapestry users" 
>
> Hello,
>
> I've never had to show hundreds of objects. Can't you reduce the
> number of objects to show?
>
> On 15/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Sorry about that, this is with version 4.0.2.
> >
> > >  Original Message 
> > > Subject: Bug with large dynamic forms?
> > > From: [EMAIL PROTECTED]
> > > Date: Sun, October 15, 2006 4:16 pm
> > > To: users@tapestry.apache.org
> > >
> > > Hello all!
> > >
> > > I think I way be experiencing a bug in tapestry but wanted to find
out
> > > if anyone else had experienced it or has heard about it.
> > >
> > > When I have a large dynamic form, with fields rendered for a couple
> > > hundred objects in my collection, the Form component seems to wig
out
> > > and not render the formids hidden field properly.
> > >
> > > Instead of the expected
> > >
value="imagesList,title,date,location,tags,rotate,description,title_0,d
> > > ... etc.  I see that it renders (for the formids hidden field) a
value
> > > attribute that looks like value=<1000+ spaces> />.  No quotes, just
> > > value=, then over a thousand spaces, then the close of the tag.
> > >
> > > I struggled all day with the form not working, then noticed this
weird
> > > formids value in the rendered page source.  After failing to see
what I
> > > was doing incorrectly, I finally gave up and just for a random stab,
> > > tested my page with a dataset of only 6 objects instead of a few
> > > hundred.  And it worked!
> > >
> > > -- Thaddeus
> > >
> > >
> > >
-
> > > 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]
> >
> >
>
>
> --
> Thanks
>
>  A Jabbar Azam
>
> -
> 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: Bug with large dynamic forms?

2006-10-15 Thread thaddeus
Of course I can design around the issue, but I would prefer not to. 
This component of the application is internal only, to the amount of
data passed in the request is not as big of a deal.  The point was to
eliminate unneccessary pagination, which I have seen have a history of
aggrivating users working on large datasets.

I am just trying to find out if this is a known issue before I work on
putting together a simpler recreation of the problem for a bug report. 
If this capacity of the framework can only work within a threshold, then
it seems like a bug, be it in the framework or the docs.

>  Original Message 
> Subject: Re: Bug with large dynamic forms?
> From: Jabbar <[EMAIL PROTECTED]>
> Date: Sun, October 15, 2006 4:22 pm
> To: "Tapestry users" 
> 
> Hello,
> 
> I've never had to show hundreds of objects. Can't you reduce the
> number of objects to show?
> 
> On 15/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Sorry about that, this is with version 4.0.2.
> >
> > >  Original Message 
> > > Subject: Bug with large dynamic forms?
> > > From: [EMAIL PROTECTED]
> > > Date: Sun, October 15, 2006 4:16 pm
> > > To: users@tapestry.apache.org
> > >
> > > Hello all!
> > >
> > > I think I way be experiencing a bug in tapestry but wanted to find out
> > > if anyone else had experienced it or has heard about it.
> > >
> > > When I have a large dynamic form, with fields rendered for a couple
> > > hundred objects in my collection, the Form component seems to wig out
> > > and not render the formids hidden field properly.
> > >
> > > Instead of the expected
> > > value="imagesList,title,date,location,tags,rotate,description,title_0,d
> > > ... etc.  I see that it renders (for the formids hidden field) a value
> > > attribute that looks like value=<1000+ spaces> />.  No quotes, just
> > > value=, then over a thousand spaces, then the close of the tag.
> > >
> > > I struggled all day with the form not working, then noticed this weird
> > > formids value in the rendered page source.  After failing to see what I
> > > was doing incorrectly, I finally gave up and just for a random stab,
> > > tested my page with a dataset of only 6 objects instead of a few
> > > hundred.  And it worked!
> > >
> > > -- Thaddeus
> > >
> > >
> > > -
> > > 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]
> >
> >
> 
> 
> -- 
> Thanks
> 
>  A Jabbar Azam
> 
> -
> 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: Bug with large dynamic forms?

2006-10-15 Thread Jabbar

Hello,

I've never had to show hundreds of objects. Can't you reduce the
number of objects to show?

On 15/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Sorry about that, this is with version 4.0.2.

>  Original Message 
> Subject: Bug with large dynamic forms?
> From: [EMAIL PROTECTED]
> Date: Sun, October 15, 2006 4:16 pm
> To: users@tapestry.apache.org
>
> Hello all!
>
> I think I way be experiencing a bug in tapestry but wanted to find out
> if anyone else had experienced it or has heard about it.
>
> When I have a large dynamic form, with fields rendered for a couple
> hundred objects in my collection, the Form component seems to wig out
> and not render the formids hidden field properly.
>
> Instead of the expected
> value="imagesList,title,date,location,tags,rotate,description,title_0,d
> ... etc.  I see that it renders (for the formids hidden field) a value
> attribute that looks like value=<1000+ spaces> />.  No quotes, just
> value=, then over a thousand spaces, then the close of the tag.
>
> I struggled all day with the form not working, then noticed this weird
> formids value in the rendered page source.  After failing to see what I
> was doing incorrectly, I finally gave up and just for a random stab,
> tested my page with a dataset of only 6 objects instead of a few
> hundred.  And it worked!
>
> -- Thaddeus
>
>
> -
> 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]





--
Thanks

A Jabbar Azam

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



RE: Bug with large dynamic forms?

2006-10-15 Thread thaddeus

Sorry about that, this is with version 4.0.2.

>  Original Message 
> Subject: Bug with large dynamic forms?
> From: [EMAIL PROTECTED]
> Date: Sun, October 15, 2006 4:16 pm
> To: users@tapestry.apache.org
> 
> Hello all!
> 
> I think I way be experiencing a bug in tapestry but wanted to find out
> if anyone else had experienced it or has heard about it.
> 
> When I have a large dynamic form, with fields rendered for a couple
> hundred objects in my collection, the Form component seems to wig out
> and not render the formids hidden field properly.
> 
> Instead of the expected
> value="imagesList,title,date,location,tags,rotate,description,title_0,d
> ... etc.  I see that it renders (for the formids hidden field) a value
> attribute that looks like value=<1000+ spaces> />.  No quotes, just
> value=, then over a thousand spaces, then the close of the tag.
> 
> I struggled all day with the form not working, then noticed this weird
> formids value in the rendered page source.  After failing to see what I
> was doing incorrectly, I finally gave up and just for a random stab,
> tested my page with a dataset of only 6 objects instead of a few
> hundred.  And it worked!
> 
> -- Thaddeus
> 
> 
> -
> 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]



Bug with large dynamic forms?

2006-10-15 Thread thaddeus
Hello all!

I think I way be experiencing a bug in tapestry but wanted to find out
if anyone else had experienced it or has heard about it.

When I have a large dynamic form, with fields rendered for a couple
hundred objects in my collection, the Form component seems to wig out
and not render the formids hidden field properly.

Instead of the expected
value="imagesList,title,date,location,tags,rotate,description,title_0,d
... etc.  I see that it renders (for the formids hidden field) a value
attribute that looks like value=<1000+ spaces> />.  No quotes, just
value=, then over a thousand spaces, then the close of the tag.

I struggled all day with the form not working, then noticed this weird
formids value in the rendered page source.  After failing to see what I
was doing incorrectly, I finally gave up and just for a random stab,
tested my page with a dataset of only 6 objects instead of a few
hundred.  And it worked!

-- Thaddeus


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