Re: GridDataSource, Nested Grid

2013-03-12 Thread willbro
Cool!




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720418.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



client id problem with nested components

2013-03-12 Thread nquirynen
Hi,

I have a component TabPanel with the following parameter:

@Property
@Parameter(value = prop:resources.id, defaultPrefix =
BindingConstants.LITERAL)
private String clientId;

which value I use as id=${clientId} in the .tml


If I put multiple instances of this component in this page without setting
the clientId parameter they will get the following id's:

id=tabpanel
id=tabpanel_0
id=tabpanel_1
...

Now I also have another component containing a TabPanel component.
If I add this 2nd component below the other tabpanels I get the following
result:

id=tabpanel
id=tabpanel_0
id=tabpanel_1
...
id=tabpanel

As this is the first tabpanel in that component.

Now I'm not sure how to handle this problem. If I explicitly set the
clientId parameters I don't have a problem, but maybe there's another
solution? 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/client-id-problem-with-nested-components-tp5720419.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: client id problem with nested components

2013-03-12 Thread Ivan Khalopik
I think the issue is that you use clientId directly in your
getClientId() method. To have a unique id you need to add some
additional work. You can look at AbstractField implementation:

@Parameter(value = prop:componentResources.id, defaultPrefix =
BindingConstants.LITERAL)
private String clientId;

private String assignedClientId;

public String getClientId() {
return assignedClientId;
}

@SetupRender
void setup() {
assignedClientId = jsSupport.allocateClientId(id);
}




On Tue, Mar 12, 2013 at 12:17 PM, nquirynen nat...@pensionarchitects.be wrote:
 Hi,

 I have a component TabPanel with the following parameter:

 @Property
 @Parameter(value = prop:resources.id, defaultPrefix =
 BindingConstants.LITERAL)
 private String clientId;

 which value I use as id=${clientId} in the .tml


 If I put multiple instances of this component in this page without setting
 the clientId parameter they will get the following id's:

 id=tabpanel
 id=tabpanel_0
 id=tabpanel_1
 ...

 Now I also have another component containing a TabPanel component.
 If I add this 2nd component below the other tabpanels I get the following
 result:

 id=tabpanel
 id=tabpanel_0
 id=tabpanel_1
 ...
 id=tabpanel

 As this is the first tabpanel in that component.

 Now I'm not sure how to handle this problem. If I explicitly set the
 clientId parameters I don't have a problem, but maybe there's another
 solution?



 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/client-id-problem-with-nested-components-tp5720419.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




-- 
BR
Ivan

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



Re: GridDataSource, Nested Grid

2013-03-12 Thread willbro
The t:mixins attribute works fine just for the first grid. As soon as i try
to use it for the nested grids, i et this error message

Render queue error in CleanupRender[projekt/Ablaufplan:grid_3]:
org.apache.tapestry5.dom.Text cannot be cast to
org.apache.tapestry5.dom.Element


t:grid source=projekte row=projekt add=Module exclude=personmonat,
bemerkung, beginn, ende, status t:mixins=GridCollapse
collapseColumn=Module
p:ModuleCell
t:grid source=module row=modul 
exclude=bemerkung, status
add=Arbeitspaket t:mixins=GridCollapse, DisableSort
collapseColumn=Arbeitspaket
p:ArbeitspaketCell
t:grid 
source=modul.arbeitspaket row=arbeitspaket
exclude=nummer
/t:grid
/p:ArbeitspaketCell
/t:grid
/p:ModuleCell

/t:grid

any idea why?




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720421.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: zone-overlay not working

2013-03-12 Thread Lance Java
1. Are you using tapestry-jquery or are you simply including jquery.js?
http://tapestry5-jquery.com/

2. If you're including jquery.js you need to call jQuery.noConflict()
http://wiki.apache.org/tapestry/Tapestry5HowToIntegrateJQuery

3. If in noConflict() mode, $ will not be available, you will need to use
the jQuery object instead.
 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/zone-overlay-not-working-tp5720417p5720424.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: Page components are not loaded in JBoss

2013-03-12 Thread Rakesh K. Cherukuri
Sorry for the delay in responding. 

Thanks for the pointer Geoff.

I was able to get the jumpstart up and running. No issues with pages too.

Need to find out the difference between my app setup and jumpstart. WIll
post the findings.

Thanks,
Rakesh



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Page-components-are-not-loaded-in-JBoss-tp5720385p5720425.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: GridDataSource, Nested Grid

2013-03-12 Thread Lance Java
The mixin expects that the cell contains only a grid (a table within a div).
Are you in some development mode where whitespace is not stripped? This
could be the Text node that the mixin is finding.

Try to remove whitespace from your cells, eg:

p:ModuleCellt:grid ... //p:ModuleCell

and

p:ArbeitspaketCellt:grid ... //p:ArbeitspaketCell







--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720426.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: Page components are not loaded in JBoss

2013-03-12 Thread Rakesh K. Cherukuri
Thanks Shing.

IN case of jetty, even though that warning shows up, the app is running
fine. Moreover tapestry initialization is able to find out the page
components. 

As Geoff pointed out, i should probably find out the difference between my
app setup and jumpstart.

- Rakesh




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Page-components-are-not-loaded-in-JBoss-tp5720385p5720427.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: GridDataSource, Nested Grid

2013-03-12 Thread willbro
seems to be something else! It did not change anything.
the error semms to be in this code line 
t:grid source=module row=modul exclude=bemerkung, status
add=Arbeitspaket t:mixins=GridCollapse,DisableSort
collapseColumn=Arbeitspaket



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720428.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: GridDataSource, Nested Grid

2013-03-12 Thread Lance Java
The findTable() method might need to be tweaked
https://github.com/uklance/tapestry-stitch/blob/master/src/main/java/org/lazan/t5/stitch/mixins/GridCollapse.java#L112

This method is used twice
1. To find the root table in the page
2. To find the child table in the cell

It currently assumes that the last child contains a div/table
Perhaps it needs to be changed to assume that the last child which is an
element (ie not a text node) contains a div/table

pull requests accepted!!



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720429.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: GridDataSource, Nested Grid

2013-03-12 Thread Lance Java
Have you tried switching off whitespace removal?
http://tapestry.apache.org/component-templates.html#ComponentTemplates-WhitespaceinTemplates



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720430.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: GridDataSource, Nested Grid

2013-03-12 Thread willbro
maybe this could help 

   PROJEKT_ID=1
[DEBUG] projekt.AblaufplanProjekt [ EXIT] getModule
[[com.example.pms.entities.Modul@164940c,
com.example.pms.entities.Modul@33de17]]
[DEBUG] mixins.GridCollapse [ENTER] findTable(  div class=t-data-grid
Name /pms/projekt/ablaufplan.grid_3.columns:sort/name   img
alt=[sortierbar] class=t-sort-icon
src=/pms/assets/1.0-SNAPSHOT-DEV/core/components/sortable.png/
/pms/projekt/ablaufplan.grid_3.columns:sort/name  Arbeitspaket
Modul1  div class=t-data-grid
Nummer
2
1
/div
Modul2  -
/div)

##

containingDiv.getName() = div
container.getName() = td

[DEBUG] mixins.GridCollapse [ EXIT] findTable [
Name /pms/projekt/ablaufplan.grid_3.columns:sort/name   img
alt=[sortierbar] class=t-sort-icon
src=/pms/assets/1.0-SNAPSHOT-DEV/core/components/sortable.png/
/pms/projekt/ablaufplan.grid_3.columns:sort/name  Arbeitspaket
Modul1  div class=t-data-grid
Nummer
2
1
/div
Modul2  -
]
[DEBUG] mixins.GridCollapse [ENTER] findTable(  div class=t-data-grid
Nummer
2
1
/div)

##

containingDiv.getName() = div
container.getName() = td

[DEBUG] mixins.GridCollapse [ EXIT] findTable [
Nummer
2
1
]
[DEBUG] mixins.GridCollapse [ENTER] findTable(  -)
[DEBUG] mixins.GridCollapse [ FAIL] findTable --
java.lang.ClassCastException
java.lang.ClassCastException: org.apache.tapestry5.dom.Text cannot be cast
to org.apache.tapestry5.dom.Element
at
com.example.pms.mixins.GridCollapse.advised$findTable_1053e0fb6a81(GridCollapse.java:117)
at
com.example.pms.mixins.GridCollapse$Invocation_findTable_1053e0fb6a80.proceedToAdvisedMethod(Unknown
Source)
at
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
at
org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:45)
at
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
at com.example.pms.mixins.GridCollapse.findTable(GridCollapse.java)
at 
com.example.pms.mixins.GridCollapse.cleanupRender(GridCollapse.java:40)
at com.example.pms.mixins.GridCollapse.cleanupRender(GridCollapse.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$CleanupRenderPhase.invokeComponent(ComponentPageElementImpl.java:402)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:143)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$CleanupRenderPhase.render(ComponentPageElementImpl.java:409)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)
at $PageRenderQueue_1053e0fb6a47.render(Unknown Source)
at $PageRenderQueue_1053e0fb6a3d.render(Unknown Source)



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720431.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: GridDataSource, Nested Grid

2013-03-12 Thread willbro
this is how the grid looks like

div class=t-data-grid




AnnaProjekt
Modul1

div class=t-data-grid




1


2



/div



Modul2
-



/div




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720432.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: Basic question about URL rewriting and Tapestry 5

2013-03-12 Thread George Christman
Hi Thiago, has there been any progress with implementing the old API?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Basic-question-about-URL-rewriting-and-Tapestry-5-tp5691410p5720436.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: GridDataSource, Nested Grid

2013-03-12 Thread willbro
It still does'nt work. whitespace are compressed by default...



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720434.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: GridDataSource, Nested Grid

2013-03-12 Thread Lance Java
As I have said many times now, I suspect that whitespace is to blame here. By
default, tapestry removes whitespace from templates. I suspect that you have
switched this off. 

You will either need to switch whitespace removal on or fix findTable() to
ignore the whitespace. You have my working demo to use as a guide.

If you want to check, remove the mixin from your grid and view your page.
Then view the raw html source of the generated page. If there is whitespace
between your elements, you have disabled whitespace removal. 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720433.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: GridDataSource, Nested Grid

2013-03-12 Thread Lance Java
If you have an empty child grid, you need to decide what you want to do

1. Include an empty row in the collapsed grid
2. Remove the row from the collapsed grid

For option 1, render a grid with a single row with empty values. 
For option 2, remove the child record from the parent dataset before
rendering the parent grid



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720437.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: GridDataSource, Nested Grid

2013-03-12 Thread willbro
I figured out that i get that error only if a cell is empty. adding an
p:empty element does not seem to resolve the problem... Thanks for the
help so far...



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/GridDataSource-Nested-Grid-tp5720342p5720435.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: Basic question about URL rewriting and Tapestry 5

2013-03-12 Thread Thiago H de Paula Figueiredo
On Tue, 12 Mar 2013 11:21:14 -0300, George Christman  
gchrist...@cardaddy.com wrote:



Hi Thiago, has there been any progress with implementing the old API?


The source is at https://github.com/thiagohp/tapestry-url-rewriter, but I  
didn't manage to get it in the Maven central repository yet. I haven't  
done much testing yet, but it passes the unit and integration tests. It's  
not an implementation, just an adaption of the old URL rewriting code  
present in Tapestry 5.1 so it can work in 5.3.


--
Thiago H. de Paula Figueiredo

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