Re: Getting BeanDisplay to skip empty fields altogether

2014-09-23 Thread Lance Java
BeanDisplay, BeanEditor and Grid all use a BeanModel to show the fields.

You could either set the "exclude" parameter to the component. Or you can
call BeanModel.exclude(...) explicitly.

It might be easiest to decorate the BeanModelSource service in tapestry-ioc
(used when you don't explicitly provide a BeanModel).


Getting BeanDisplay to skip empty fields altogether

2014-09-23 Thread Daniel Jue
Hey list!  I have several dozen code-generated beans that I'd like to
display as bean models.  Problem is, many of the beans' fields are either
null or empty string, so I don't want their  labels to even show up,
much less the NotEmpty mixin putting a  

The idea is to skip rendering any fields that would have output equal to
the empty string or null (and possibly even skipping if it were only
whitespace)

So far I've gone down the path of overriding the BeanDisplay class and
using my own tml file to try and wrap the / in a  with a test
on the object.  It's not working quite yet, but I think this might work.  I
need to get a handle on what the property value is going to be so I can
test against that.

Is anything else you would suggest?

Thanks,

Dan


Re: Problem in using Bootstrap Modal component

2014-09-23 Thread Eugen
Hi,
put in Your modal-body, around the image, a zone and attach js function to
the 'show.bs.modal' event of modal. In the function refesh the zone.

best regards
Eugen

2014-09-23 19:31 GMT+02:00 akshay :

> Hi Sir,
>
> Thanks for your response,
>
> I believe post over a forum , expects a more polite response than yours.
>
> Coming to the point suggested by you, I tried using the remote option
> before posting into the forum and it didnt work the way, it is supposed to
> be.
>
> So rather than putting a complex code snippet, I jotted down the naive
> approach, so that someone can really help me in knowing the feasible
> solution.
>
> Regarding the effort, I tried the possibilities and has asked the question,
> hoping to get a better response.
>
>
> Thanks and Best Regards
> Akshay
>
>
>
> On Tue, Sep 23, 2014 at 6:48 PM, Chris Poulsen 
> wrote:
>
> > I doubt there is any magic going on. If your html output is correct then
> it
> > should work like advertised. You seem to be talking about the modal
> remote
> > option, but that is not used in your pasted code (which is close to
> > absolutely useless anyway, please put in an effort if you expect others
> to
> > try and help you).
> >
> > I suggest you read the docs for bootstrap modal, and then make sure that
> > your html is correct.
> >
> > --
> > Chris
> >
> > On Tue, Sep 23, 2014 at 6:12 PM, akshay 
> wrote:
> >
> > > Hi,
> > >
> > > I am trying to use bootstrap component modal.js. I intend to change to
> > > content of the modal( i.e image in my case) for every execution of
> this
> > > conditional block given below. But I see that , the content of the
> modal
> > > ("${imageUrl}") in the image tag,  is only loaded once and I get to see
> > the
> > > same image for each and every input field, where this block is
> executed.
> > >
> > > Code snippet :-
> > >
> > > 
> > >  > > data-target="#basicModal">Show Example
> > >
> > >  > > aria-labelledby="basicModal" aria-hidden="true">
> > > 
> > > 
> > >
> > > 
> > >  > > width="500px">
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > >
> > > I read over the internet that modal loads the content only once, and
> for
> > > this didnt find any solution that would fit my need.
> > >
> > > Any kind of help would be highly appreciated.
> > >
> > > --
> > > Cheers!!
> > > Akshay
> > >
> >
>
>
>
> --
> Cheers!!
> Akshay
>


Re: Problem in using Bootstrap Modal component

2014-09-23 Thread akshay
Hi Sir,

Thanks for your response,

I believe post over a forum , expects a more polite response than yours.

Coming to the point suggested by you, I tried using the remote option
before posting into the forum and it didnt work the way, it is supposed to
be.

So rather than putting a complex code snippet, I jotted down the naive
approach, so that someone can really help me in knowing the feasible
solution.

Regarding the effort, I tried the possibilities and has asked the question,
hoping to get a better response.


Thanks and Best Regards
Akshay



On Tue, Sep 23, 2014 at 6:48 PM, Chris Poulsen 
wrote:

> I doubt there is any magic going on. If your html output is correct then it
> should work like advertised. You seem to be talking about the modal remote
> option, but that is not used in your pasted code (which is close to
> absolutely useless anyway, please put in an effort if you expect others to
> try and help you).
>
> I suggest you read the docs for bootstrap modal, and then make sure that
> your html is correct.
>
> --
> Chris
>
> On Tue, Sep 23, 2014 at 6:12 PM, akshay  wrote:
>
> > Hi,
> >
> > I am trying to use bootstrap component modal.js. I intend to change to
> > content of the modal( i.e image in my case) for every execution of  this
> > conditional block given below. But I see that , the content of the modal
> > ("${imageUrl}") in the image tag,  is only loaded once and I get to see
> the
> > same image for each and every input field, where this block is executed.
> >
> > Code snippet :-
> >
> > 
> >  > data-target="#basicModal">Show Example
> >
> >  > aria-labelledby="basicModal" aria-hidden="true">
> > 
> > 
> >
> > 
> >  > width="500px">
> > 
> >
> > 
> > 
> > 
> > 
> >
> > I read over the internet that modal loads the content only once, and for
> > this didnt find any solution that would fit my need.
> >
> > Any kind of help would be highly appreciated.
> >
> > --
> > Cheers!!
> > Akshay
> >
>



-- 
Cheers!!
Akshay


Re: Problem in using Bootstrap Modal component

2014-09-23 Thread Muhammad Gelbana
If I understood your case correctly. You need to put your modal div in a
zone so you can update it when you submit the first modal.

*-*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana

On Tue, Sep 23, 2014 at 7:48 PM, Chris Poulsen 
wrote:

> I doubt there is any magic going on. If your html output is correct then it
> should work like advertised. You seem to be talking about the modal remote
> option, but that is not used in your pasted code (which is close to
> absolutely useless anyway, please put in an effort if you expect others to
> try and help you).
>
> I suggest you read the docs for bootstrap modal, and then make sure that
> your html is correct.
>
> --
> Chris
>
> On Tue, Sep 23, 2014 at 6:12 PM, akshay  wrote:
>
> > Hi,
> >
> > I am trying to use bootstrap component modal.js. I intend to change to
> > content of the modal( i.e image in my case) for every execution of  this
> > conditional block given below. But I see that , the content of the modal
> > ("${imageUrl}") in the image tag,  is only loaded once and I get to see
> the
> > same image for each and every input field, where this block is executed.
> >
> > Code snippet :-
> >
> > 
> >  > data-target="#basicModal">Show Example
> >
> >  > aria-labelledby="basicModal" aria-hidden="true">
> > 
> > 
> >
> > 
> >  > width="500px">
> > 
> >
> > 
> > 
> > 
> > 
> >
> > I read over the internet that modal loads the content only once, and for
> > this didnt find any solution that would fit my need.
> >
> > Any kind of help would be highly appreciated.
> >
> > --
> > Cheers!!
> > Akshay
> >
>


Re: Problem in using Bootstrap Modal component

2014-09-23 Thread Chris Poulsen
I doubt there is any magic going on. If your html output is correct then it
should work like advertised. You seem to be talking about the modal remote
option, but that is not used in your pasted code (which is close to
absolutely useless anyway, please put in an effort if you expect others to
try and help you).

I suggest you read the docs for bootstrap modal, and then make sure that
your html is correct.

-- 
Chris

On Tue, Sep 23, 2014 at 6:12 PM, akshay  wrote:

> Hi,
>
> I am trying to use bootstrap component modal.js. I intend to change to
> content of the modal( i.e image in my case) for every execution of  this
> conditional block given below. But I see that , the content of the modal
> ("${imageUrl}") in the image tag,  is only loaded once and I get to see the
> same image for each and every input field, where this block is executed.
>
> Code snippet :-
>
> 
>  data-target="#basicModal">Show Example
>
>  aria-labelledby="basicModal" aria-hidden="true">
> 
> 
>
> 
>  width="500px">
> 
>
> 
> 
> 
> 
>
> I read over the internet that modal loads the content only once, and for
> this didnt find any solution that would fit my need.
>
> Any kind of help would be highly appreciated.
>
> --
> Cheers!!
> Akshay
>


Problem in using Bootstrap Modal component

2014-09-23 Thread akshay
Hi,

I am trying to use bootstrap component modal.js. I intend to change to
content of the modal( i.e image in my case) for every execution of  this
conditional block given below. But I see that , the content of the modal
("${imageUrl}") in the image tag,  is only loaded once and I get to see the
same image for each and every input field, where this block is executed.

Code snippet :-


Show Example














I read over the internet that modal loads the content only once, and for
this didnt find any solution that would fit my need.

Any kind of help would be highly appreciated.

-- 
Cheers!!
Akshay


AjaxFormLoop Example in 5.4 without persist.

2014-09-23 Thread George Christman
Hi guys, for any of you who have used the ajaxformloop over the years and
have struggled not to have to use @Persist and handle the save on form
submission know that it has been a challenge. I managed to come up with the
following solution this morning that thus far seems to work very well. I'd
like to share it so that it can be picked apart, but also provide another
working example demonstrating how this can be done.


TimeSheet is a parent entity containing a one to may relationship with
EffortAllocation.




Re: zone on a

2014-09-23 Thread Geoff Callender
Or put zone on the , like in the examples.


http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/eventlinksinaloop

http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/formsinaloop


On 23 Sep 2014, at 9:42 pm, Boris Horvat  wrote:

> Html doesn't supprit div or any other tag in the middle of the table so
> browser will remove it. I have learned that the hard way.
> 
> You have 3 options.
> 
> Dont use table.
> Use ajaxformloop.
> Put zone inside the 
> On 23 Sep 2014 12:02, "squallmat ."  wrote:
> 
>> Hi,
>> 
>> I have a table, one of the row () has been included in a Zone. But when
>> I ajax-update this zone, I see that this zone is removed from the table and
>> is displayed in a div just before the table.
>> Why this modification at zone update ? And how to prevent it ?
>> 



Re: zone on a

2014-09-23 Thread Boris Horvat
Html doesn't supprit div or any other tag in the middle of the table so
browser will remove it. I have learned that the hard way.

You have 3 options.

Dont use table.
Use ajaxformloop.
Put zone inside the 
On 23 Sep 2014 12:02, "squallmat ."  wrote:

> Hi,
>
> I have a table, one of the row () has been included in a Zone. But when
> I ajax-update this zone, I see that this zone is removed from the table and
> is displayed in a div just before the table.
> Why this modification at zone update ? And how to prevent it ?
>


Re: zone on a

2014-09-23 Thread Geoff Callender
Here are 2 working examples you can use as a reference point:


http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/eventlinksinaloop

http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/formsinaloop

Cheers,

Geoff

On 23 Sep 2014, at 8:01 pm, squallmat .  wrote:

> Hi,
> 
> I have a table, one of the row () has been included in a Zone. But when
> I ajax-update this zone, I see that this zone is removed from the table and
> is displayed in a div just before the table.
> Why this modification at zone update ? And how to prevent it ?


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



zone on a

2014-09-23 Thread squallmat .
Hi,

I have a table, one of the row () has been included in a Zone. But when
I ajax-update this zone, I see that this zone is removed from the table and
is displayed in a div just before the table.
Why this modification at zone update ? And how to prevent it ?