Re: [t5.3.4] Plugin blocks

2012-08-26 Thread Muhammad Gelbana
The blog post is fantastic but It lacks the point that Taha tackled which
is contributing blocks to the main application. My goal here isn't to
contribute blocks (which seems to be the best option so far because it
solves the problem of having links displayed as sub links to another top
link. Igor tried to solve this using annotations which is really nice. I
still have to compare between using annotations and blocks to categories my
page links. Although for some reason, I feel contributing blocks will be
easier, may be I'm wrong.

May be I can work around contributing blocks by having components act as
the contributed tml part and annotate the component with a reasonable
annotation to indicate that it's template has to be displayed ? Then Igor's
loop would have a "delegate" component instead of the hyperlink one ?

On Sun, Aug 26, 2012 at 9:21 PM, Richard Frovarp wrote:

> On 08/26/2012 10:23 AM, Muhammad Gelbana wrote:
>
>> After reading Taha's
>> article> tapestry-magic-3-plugin-**blocks/
>> >,
>>
>> I'm now trying to dissect my application to be able to distribute it to
>> different clients. So it will be distributed as one slim web application
>> with really nothing to offer. And to use one feature, a tapestry module
>> (.jar) file will just be dropped in the classpath and it should be
>> auto-loaded (using tapestry).
>>
>> I find Taha's article highly innovative but I'm trying to find out if
>> anyone tackled the problem with a different approach that could be
>> "simpler" or capable of handling what Taha's solution probably didn't.
>>
>>
> This might prove useful:
> http://blog.tapestry5.de/**index.php/2010/01/19/tapestry-**
> ioc-modularization-of-web-**applications-without-osgi/
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
*Regards,*
*Muhammad Gelbana
Java Developer*


Re: [t5.3.4] Plugin blocks

2012-08-26 Thread Richard Frovarp

On 08/26/2012 10:23 AM, Muhammad Gelbana wrote:

After reading Taha's
article,
I'm now trying to dissect my application to be able to distribute it to
different clients. So it will be distributed as one slim web application
with really nothing to offer. And to use one feature, a tapestry module
(.jar) file will just be dropped in the classpath and it should be
auto-loaded (using tapestry).

I find Taha's article highly innovative but I'm trying to find out if
anyone tackled the problem with a different approach that could be
"simpler" or capable of handling what Taha's solution probably didn't.



This might prove useful:
http://blog.tapestry5.de/index.php/2010/01/19/tapestry-ioc-modularization-of-web-applications-without-osgi/

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



[t5.3.4] Plugin blocks

2012-08-26 Thread Muhammad Gelbana
After reading Taha's
article,
I'm now trying to dissect my application to be able to distribute it to
different clients. So it will be distributed as one slim web application
with really nothing to offer. And to use one feature, a tapestry module
(.jar) file will just be dropped in the classpath and it should be
auto-loaded (using tapestry).

I find Taha's article highly innovative but I'm trying to find out if
anyone tackled the problem with a different approach that could be
"simpler" or capable of handling what Taha's solution probably didn't.

-- 
*Regards,*
*Muhammad Gelbana
Java Developer*


Re: @parameter Boolean not working?

2012-08-26 Thread Bob Harner
Set subscribe = true in your page class' setupRender method, not in its
declaration.
On Aug 26, 2012 6:23 AM, "sommeralex"  wrote:

> Hello,
>
> I have a component, which is taking a userId and (should) take a boolean.
> My
> component is implemented and already working with the userID - but not with
> the boolean. checking subscribed == true or checking with subscribed !=
> null
> is never true. (so the boolean is always null)
>
> the component:
>
> @Parameter
> private Boolean subscribed;
> @Parameter
> private Long userId;
> @Inject
> private GroupService groupService;
>
> @Property
> private Group curGroup;
> @Property(write = false)
> private List groups;
>
> public void setupRender() {
> if (userId != null) {
> if (subscribed == true){
> this.groups =
> groupService.findBySubscriberId(userId);
> }else{
> this.groups =
> groupService.findByOwnerId(userId);
> }
> } else {
> this.groups = groupService.getAllGroups();
> }
> }
>
> the call from my tml page:
>
> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>
> 
>
> 
>
> the java page:
>
>
> public class ListSubscribedGroups {
>
> @Property(write=false)
> private Long userId;
>
> @Property(write=false)
> private Boolean subscribed = true;
>
> public void onActivate(Long userId){
> this.userId = userId;
> }
>
> }
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/parameter-Boolean-not-working-tp5715807.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: @parameter Boolean not working?

2012-08-26 Thread sommeralex
thanx, could solve it, had nothing to do with the @parameter - was a bug in
my code.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/parameter-Boolean-not-working-tp5715807p5715808.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



@parameter Boolean not working?

2012-08-26 Thread sommeralex
Hello, 

I have a component, which is taking a userId and (should) take a boolean. My
component is implemented and already working with the userID - but not with
the boolean. checking subscribed == true or checking with subscribed != null
is never true. (so the boolean is always null)

the component: 

@Parameter
private Boolean subscribed;
@Parameter
private Long userId;
@Inject
private GroupService groupService;

@Property
private Group curGroup;
@Property(write = false)
private List groups;

public void setupRender() {
if (userId != null) {
if (subscribed == true){
this.groups = 
groupService.findBySubscriberId(userId);
}else{
this.groups = 
groupService.findByOwnerId(userId);   
}
} else {
this.groups = groupService.getAllGroups();
}
}

the call from my tml page:

http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>





the java page:


public class ListSubscribedGroups {

@Property(write=false)
private Long userId;

@Property(write=false)
private Boolean subscribed = true;

public void onActivate(Long userId){
this.userId = userId;
}

}




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/parameter-Boolean-not-working-tp5715807.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