T5 developing with WTP and TOMCAT

2007-08-14 Thread Denny
Hi,

I develop with WTP and TOMCAT. If I set the tomcat don't auto-reload,
tapestry5 can take the changes of html template, while it can't take the
chages of page class. It make the hot code replace failed. However, If I
enable tomcat auto-reload. tapestry can take both html template and page
class changes. But, it will cause tomcat reload the context. It's very slow,
and after some times, it will cause tomcat out of memory. I know using Jetty
servlet container will be fine. But I like developing with eclipse WTP.

So I like the way of T3, T4, just add a java system property. -
Dorg.apache.tapestry.disable-caching=true. It would be fine. just a bit slow
while reload the page.

-- 
Regards

Denny
Site: http://dengyin2000.javaeye.com


Re: T5: Ioc @Inject @Value

2007-08-14 Thread Jun Tsai
I have the same problem.

Jun Tsai

2007/6/30, Robin Ericsson <[EMAIL PROTECTED]>:
>
> On 6/29/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> > If i remember correctly, a value that can't be resolved should cause a
> > runtime error; just in case, check the console. It may be that the
> > acegi.check.url symbol couldn't be resolved.
>
> Yes, correctly, using this, the code works, changing the value to
> something non-existing gives me a runtime error:
> public class LoginPage {
> @Inject
> private SymbolSource symbolSource;
>
> @Inject
> private Request request;
>
> public String getLoginCheckUrl() {
> return request.getContextPath() +
> symbolSource.expandSymbols("${acegi.check.url}");
> }
> }
>
> Doing the same thing with @Inject @Value, I don't get a runtime error
> when entering a non-existing value.
>
> --
> regards,
> Robin
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net


Re: T5 Best way to alter core components?

2007-08-14 Thread Robert Zeigler

Hm...
Really seems like you're trying to work swim against the current...
For your example, I wouldn't forgo the bean model.
I would probably create a "MapBeanModel",  which takes a map as an  
input, and implements the BeanModel interface.
(An alternative might be to create a MapBeanModelSource service,  
which uses the normal "BeanModelSource" service to generate
a model, strips out whatever columns the generic model added, then  
adds the entry set to the model).


A map bean model source implementation seems pretty trivial,  
something like...


//you would likely want to define this as an interface, and then  
implement the interface, but for the sake of brevity...

public MapBeanModelSource {
private final BeanModelSource _beanModelSource;

public MapBeanModelSource(final BeanModelSource beanModelSource) {
_beanModelSource = beanModelSource;
}

public BeanModel generateBeanModel(Map  
map,ComponentResources resources) {
BeanModel model = _beanModelSource.create 
(Map.class,false,resources);
//remove is varags, so you could get fancy and do this in  
one line if you wanted...

for(String name : model.getPropertyNames()) {
model.remove(name);
}
for(Entry entry : map.entrySet()) {
model.add(entry.getKey(), new MapPropertyConduit 
(entry.getKey());

}
return model;
}
}

//not generified, for the sake of brevity...
public class MapPropertyConduit implements PropertyConduit {
private String _key;
public MapPropertyConduit(String key) {
_key = key;
}
public Object get(Object instance) {
return ((Map)instance).get(_key);
}
public Class getPropertyType() {
//since your example used a Map, assume  
string...

return String.class;
}
public void set(Object instance, Object value) {
((Map)instance).put(_key,value);
}
}


Disclaimer: above code is written entirely off the cuff, but it  
should convey the general idea.
And with that, any time you have your list of maps, inject your  
service and build your bean model that way.

Voila... no "row class per list".

Robert

On Aug 14, 2007, at 8/1410:19 PM , Daniel Jue wrote:


I am trying to find the best approach to making changes to the
existing Tapestry 5 core components.  This is what I've thought of so
far.  Please add suggestions or correct me!

Very Small Changes:
Changing the look of a component:
1. Override styles with your own CSS file, no changes made to  
actual components.


Small Changes:
Changing an image used in a component:
1. Hacking the actual T5 library (replacing image files)  
(unmaintainable)


Medium Changes:
Changing the non-programmatic html output:
1. Hacking the actual T5 library (replacing or modifying the template)
(unmaintainable)

Big Changes:
i.e. Changing the html markup that gets output, or changing data  
model:
1. A complete rebuild of component that exists the way the T4  
contrib did.

2. Hacking the actual T5 code (bad, unmaintainable)

i.e. Pulling the GridPager away from the Grid.
1. A complete rebuild of component that exists the way the T4  
contrib did.




A real life example:

I want to display a Grid without using the BeanModel.  My data is in a
list of maps, with each row item being a map.  Rather
than construct a row class for each list, I'd rather supply a keySet()
of the column names.  I would think this falls under the "Big Changes"
category.

-
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]



T5 Best way to alter core components?

2007-08-14 Thread Daniel Jue
I am trying to find the best approach to making changes to the
existing Tapestry 5 core components.  This is what I've thought of so
far.  Please add suggestions or correct me!

Very Small Changes:
Changing the look of a component:
1. Override styles with your own CSS file, no changes made to actual components.

Small Changes:
Changing an image used in a component:
1. Hacking the actual T5 library (replacing image files) (unmaintainable)

Medium Changes:
Changing the non-programmatic html output:
1. Hacking the actual T5 library (replacing or modifying the template)
(unmaintainable)

Big Changes:
i.e. Changing the html markup that gets output, or changing data model:
1. A complete rebuild of component that exists the way the T4 contrib did.
2. Hacking the actual T5 code (bad, unmaintainable)

i.e. Pulling the GridPager away from the Grid.
1. A complete rebuild of component that exists the way the T4 contrib did.



A real life example:

I want to display a Grid without using the BeanModel.  My data is in a
list of maps, with each row item being a map.  Rather
than construct a row class for each list, I'd rather supply a keySet()
of the column names.  I would think this falls under the "Big Changes"
category.

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



Re: Rounded Corners Service not working?

2007-08-14 Thread Jesse Kuhnert
Hmm...  If someone opened up a jira ticket with specific parameter
examples && what does/doesn't work it would probably make it easier
for me to look at.

As for gif vs. png - I didn't make that configurable on purpose
because my overall goal was to avoid PNG whenever possible because IE
hasn't traditionally had any normal/straightforward support for it.
Having a transparent background is the only thing that forces png
output.

Either way an example in jira could probably get looked at and solved
pretty quickly.  These days I normally just respond to things on the
mailing list but almost never go make changes / bug fixes unless there
is a jira ticket so most conversations get lost/forgotten if there is
no follow up.

On 8/14/07, Kevin Menard <[EMAIL PROTECTED]> wrote:
> Incidentally, I just ran into this.  This was after spending over an hour
> figuring out I needed to add tapestry-contrib to use the rounded service
> (someone please update the docs).
>
> I dug into it and it appears to be the PNG vs GIF logic that's failing.  If
> I remove the background color, everything works fine.  If present, it's a
> problem.  If I attach the source of the contrib library in Eclipse, step
> into the code, and change the type from GIF to PNG when a background color
> is present, even that works.
>
> This may be a platform-specific problem with ImageIO.  I'm on MacOS X 10.4
> running Java 5.  I guess it'd be nice if the image type were configurable.
>
> --
> Kevin
>
>
> On 8/14/07 12:12 PM, in article [EMAIL PROTECTED], "Henry Chen"
> <[EMAIL PROTECTED]> wrote:
>
> >
> > Any other thoughts what I might have done wrong with this rounded corner
> > service?
> >
> >
> > Henry Chen wrote:
> >>
> >> Just tried. Not work either. Same error in Tomcat.
> >>
> >> SEVERE: Image generated had zero length byte array from parameters of:
> >> [color:FF9900, bgColor:white, width:60, height:60, angle:tr,
> >> shadowWidth:3, shadowOpacity:-1.0, side:null, wholeShadow: false,
> >> arcWidth: -1.0, arcHeight:-1.0
> >>  image: [EMAIL PROTECTED]: type = 1 DirectColorModel: rmask=ff
> >> gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 66 height =
> >> 66 #Bands = 3 xOff = -54 yOff = 0 dataOffset[0] 54
> >>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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



Re: Rounded Corners Service not working?

2007-08-14 Thread Kevin Menard
Incidentally, I just ran into this.  This was after spending over an hour
figuring out I needed to add tapestry-contrib to use the rounded service
(someone please update the docs).

I dug into it and it appears to be the PNG vs GIF logic that's failing.  If
I remove the background color, everything works fine.  If present, it's a
problem.  If I attach the source of the contrib library in Eclipse, step
into the code, and change the type from GIF to PNG when a background color
is present, even that works.

This may be a platform-specific problem with ImageIO.  I'm on MacOS X 10.4
running Java 5.  I guess it'd be nice if the image type were configurable.

-- 
Kevin


On 8/14/07 12:12 PM, in article [EMAIL PROTECTED], "Henry Chen"
<[EMAIL PROTECTED]> wrote:

> 
> Any other thoughts what I might have done wrong with this rounded corner
> service?
> 
> 
> Henry Chen wrote:
>> 
>> Just tried. Not work either. Same error in Tomcat.
>> 
>> SEVERE: Image generated had zero length byte array from parameters of:
>> [color:FF9900, bgColor:white, width:60, height:60, angle:tr,
>> shadowWidth:3, shadowOpacity:-1.0, side:null, wholeShadow: false,
>> arcWidth: -1.0, arcHeight:-1.0
>>  image: [EMAIL PROTECTED]: type = 1 DirectColorModel: rmask=ff
>> gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 66 height =
>> 66 #Bands = 3 xOff = -54 yOff = 0 dataOffset[0] 54
>> 



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



Re: T5: Changing locale within OnActivate event

2007-08-14 Thread Jesse Kuhnert
If it's anything like T4 you'll have to either do a redirect back to
the same page or whatever mechanism is in place to "make a page
active" somehow and have it do that to the same page.

All the i18n stuff probably happens in the very beginning while
setting up the page/components/resources so it has to start over if
you want to change locales.  I'm sure you know more than I do about
redirects/page activations in T5 though.

On 8/14/07, Doug Hauge <[EMAIL PROTECTED]> wrote:
> In several of our pages, the default locale we want to use for messages
> depends on its activation context. We tried updating the locale using
> 'ThreadLocale' from within the activate event handler, but it seems that
> this is too late, for the page has already been loaded and all messages
> in the template resolved using whatever locale was in effect at the time
> of loading. Is there some way we can force the messages to be reloaded
> after setting the thread locale in the activate event handler, or is
> there some point before the page is loaded at which we can access the
> page class and the activation context in order to set the locale?
>
> Thanks,
> Doug
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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



T5: Changing locale within OnActivate event

2007-08-14 Thread Doug Hauge
In several of our pages, the default locale we want to use for messages
depends on its activation context. We tried updating the locale using
'ThreadLocale' from within the activate event handler, but it seems that
this is too late, for the page has already been loaded and all messages
in the template resolved using whatever locale was in effect at the time
of loading. Is there some way we can force the messages to be reloaded
after setting the thread locale in the activate event handler, or is
there some point before the page is loaded at which we can access the
page class and the activation context in order to set the locale?

Thanks,
Doug


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



Re: Class cast exception in ASTChain, Bug OGNL-11

2007-08-14 Thread Kalle Korhonen
On 8/14/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote:
>
> I found essentially the same problem in a @For loop over a list of objects
> that do not implement any common interface, but (by design) have matching
> method names. Tapestry would try to cast to the class of the first object
> in
> the loop, instead of using a declared class of the loop variable. This
> stalled our upgrade to 4.1.2.
> I traced it down to HiveMindExpressionCompiler.generateGetter(..), but I
> am
> still not sure whether this is a Tapestry or OGNL bug (or rather where the
> solution should be implemented). BTW where OGNL posts its releases now? I
> couldn't find anything beyond 2.6.7.
> I wonder if you had a chance to look into this issue?
>

Just by reading this, I'm 95% sure it's a OGNL issue. Jesse publishes new
OGNL snapshots on his repository (
http://opencomponentry.com/repository/m2-snapshot-repo/ognl/ognl/2.7.1-SNAPSHOT/).
Try excluding the OGNL 2.7 that comes with 4.1.2 and use one of the newer
2.7.1 snapshots (2.7.1-20070723.185910-9 for example solved lots of issue
for us). Though I'm still tracking down yet another, similar
ClassCastException one even in the latest.

Kalle



> Jessek wrote:
> >
> > Thanks, I've re-opened the bug and will take a look.
> >
> > On 7/10/07, Damien Uern <[EMAIL PROTECTED]> wrote:
> >>
> >> Hello,
> >>
> >> I recently upgraded to OGNL 2.7, Tapestry 4.1.2 and am experiencing the
> >> same issue described here http://jira.opensymphony.com/browse/OGNL-11.
> >>
> >> The original poster didn't seem to provide much information, so I have
> >> added a comment to that bug describing the issue I am having. I'm not
> >> sure if I need to open a new bug in order for somebody to look at it.
> >>
> >> I will reproduce my comment here for convenience, any help/workarounds
> >> would be most appreciated:
> >>
> >> I have just updated from Tapestry 4.0 to 4.1.2 with OGNL 2.7 and I am
> >> having this same class cast exception on an ASTChain generated class,
> >> stack trace is here:
> >>
> >> Caused by: java.lang.ClassCastException:
> >> com.jigsawpublications.common.tapestry.menu.ActionLinkNode
> >> at $ASTChain_113aed5c33f.get($ASTChain_113aed5c33f.java)
> >> at
> >> org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read(
> >> ExpressionEvaluatorImpl.java:142)
> >>
> >> What we have in the component template looks like this:
> >>
> >>
> >> 
> >>   parameters="ognl:getNodeIter().getAction()"
> >> href="#" title="ognl:nodeIter.title">
> >>
> >>
> >> 
> >>
> >>
> >> The nodeIter property on the component class is declared as follows:
> >>
> >> public IMenuNode getNodeIter() { }
> >>
> >> So what we have here is a list of objects all implementing this
> >> interface IMenuNode, and getNodeIter() returns the current iteration as
> >> set by the tapestry @For component. The class cast exception was on an
> >> ActionLinkNode which implements that interface. Other classes are
> >> PageLinkNode, RootNode and MenuNode. The *only* one that causes a
> >> problem seems to be the above @Block component, as another block:
> >>
> >>
> >> 
> >>  #  page="ognl:nodeIter.page">
> >>
> >>
> >> 
> >>
> >>
> >> renders fine without any issue (these other blocks occur earlier in the
> >> page than the ActionLinkBlock). If I change the actionLink block to be
> >> the following (i.e. change the offending ognl expressions):
> >>
> >>
> >> 
> >>   parameters="ognl:'action'"
> >> href="#" title="ognl:'title'">
> >>
> >>
> >> 
> >>
> >>
> >> Then I do not get an exception during the page render. This worked fine
> >> with the previous version of ognl we were using (2.6.7).
> >>
> >> Please let me know if you require more information.
> >>
> >> Regards,
> >>
> >> Damien Uern
> >>
> >> --
> >>
> >>
> >> Damien Uern
> >> Online Applications Developer
> >> Synect Online Solutions
> >> http://www.synect.com
> >>
> >>
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Class-cast-exception-in-ASTChain%2C-Bug-OGNL-11-tf4054151.html#a12151415
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: You have clicked on a stale link Error

2007-08-14 Thread Ajit Raj
Thanks.
 
I kind wonder why "DirectLink" works after user relogin -- it can go to the 
page the link points to. It only doesn't work with the "Submit" button -- is 
that becuase it contains some persist data that needs to be sent back to the 
server and server has already lost all the information for this session?
 
Ajit



> Date: Tue, 14 Aug 2007 16:29:39 -0400> From: [EMAIL PROTECTED]> To: 
> users@tapestry.apache.org> Subject: Re: You have clicked on a stale link 
> Error> > Ajit,> > You would have to actively store your trail, like 
> breadcrumbs in a> data structure that is still available even after the user 
> has timed> out. You might want to persist it to a database, instead of 
> keeping> track of it in memory.> > Then after login success, the login 
> page/component would look up the> last visited page and then try to send the 
> user there by sending that> page.> > So this is not something automatically 
> handled by Tapestry.> > On 8/14/07, Ajit Raj <[EMAIL PROTECTED]> wrote:> > 
> Hi,> >> > I got a error as following after I tried to relog in to the 
> application -- it happens when I cliecked a "Submit" button on one of the 
> page after session already timeout, and it redirect me back into the login 
> page.> >> > You have clicked on a stale link.> > Rewind of form 
> core/Example/SchoolReport expected only 0 form elements, but an additional id 
> was requested by component sure/DateSelect/CheckDateSelected.> > This is most 
> likely the result of using your browser's back button, but can also be an 
> application error.> > You may continue by returning to the application's home 
> page.> >> > I have to go to the home page first, then go to the page where I 
> clikced "submit" button.> >> > Is there a way to go back to the my last page 
> after relogin instead of go through the home page?> >> > Thanks,> >> >> > 
> Ajit> > _> > 
> Messenger Café — open for fun 24/7. Hot games, cool activities served daily. 
> Visit now.> > http://cafemessenger.com?ocid=TXT_TAGLM_AugWLtagline> > 
> -> To 
> unsubscribe, e-mail: [EMAIL PROTECTED]> For additional commands, e-mail: 
> [EMAIL PROTECTED]> 
_
Find a local pizza place, movie theater, and more….then map the best route!
http://maps.live.com/default.aspx?v=2&ss=yp.bars~yp.pizza~yp.movie%20theater&cp=42.358996~-71.056691&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=950607&encType=1&FORM=MGAC01

Re: [T5] Grid totals

2007-08-14 Thread Daniel Jue
Joost, I see what you did there.  This is a clever hack, but I'm not
sure I want to get into DOM hacking with Tapestry. ;-)

Please let me know if you find a solution, and I'll do the same.
This is related to another more general question I'm going to post soon.

Daniel


On 8/1/07, Joost Schouten <[EMAIL PROTECTED]> wrote:
> Daniel,
>
> In our current solution we disregarded the paginator and always show the
> total of all lines as showing page totals doesn't make sense in our
> situation. But implementing this should not be a big problem as you can just
> obtain the current page, the rows per page and thus generate your totals
> from it.
>
> Though my solution works, it feels like a hack and I will search for a more
> elegant way after our initial launch ;-)
>
> On my page/component implementing the Grid, I instantiate a new RowObject in
> a @SetupRender method, loop though all (or just current page on paginator)
> rows and sum the totals. Then in a @AfterRenderTemplate method I take the
> DOM and add a TFOOT containing the totals to the TABEL element.
>
> Below my (simplified) @AfterRenderTemplate method
>
> There will most likely be very nice and elegant ways to inject into or
> extend from the Grid component so everything can be done at the component
> level and not the DOM. But I just needed something to work right now ;-)
>
> Hope it helps,
>
> Joost
>
> ---totals dom injection method--
>
> @AfterRenderTemplate
> void after(MarkupWriter writer){
> //first find the table Element. T5 writes it in a div. Note that
> //multiple tables in one component/page might cause issues
> Element thisEl = writer.getElement();
> Element table = null;
> for(Node child : thisEl.getChildren()){
> if(child instanceof Element &&
> ((Element)child).getName().equalsIgnoreCase("div")){
> for(Node child1 : ((Element)child).getChildren()){
> if(child1 instanceof Element &&
> ((Element)child1).getName().equalsIgnoreCase("table")){
> table = ((Element)child1);
> break;
> }
> }
> }
> if(table!=null){
> break;
> }
> }
> if(table!=null){//is null when there is no data to display
>
> Element footerRow = table.element("tfoot").element("tr");
> int span = 1;
> String cellContent = null;
> String className = "cssStyleClass";
> if(this.rows != null){
> for(Iterator itr =
> yourBeanModel.getPropertyNames().iterator();itr.hasNext();){
> String column = (String)itr.next();
> if(column.equals("toTotalColumn1")){
> //always first close the possibly
> open cell
> writeFooterCell(footerRow,
> cellContent, span, className);
> span=1;
> className = "totalsmessage";
> cellContent =
> yourTotalsRow.getTotal1();
> }else if(column.equals("toTotalColumn2")){
> writeFooterCell(footerRow,
> cellContent, span, className);
> span=1;
> className = "totalsvalue";
> cellContent =
> yourTotalsRow.getTotal2();
> }else{//all other columns just add a span
> and don't
> //have a totals column
> span++;
> }
> }
> //write and close the last footer cell
> writeFooterCell(footerRow, cellContent, span,
> className);
> }
> }//close block when table element is found
> }
>
> private void writeFooterCell(Element footerRow, String content, int span,
> String className){
> if(content!=null){//if null, no open cell needs to be written as it
> is
> //the first call toopen a cell
> Element footerCell = footerRow.element("td", "colspan",
>  Integer.toString(span), "class",
> className);
> footerCell.text(content);
> }
> }
>
> -Original Message-
> From: Daniel Jue [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 31, 2007 4:53 PM
> To: Tapestry users
> Subject: Re: [T5] Grid totals
>
> Joost, How did you add a row for the totals while keeping that row
> from being sortable?
> I don't want to add it outside of the gr

Re: You have clicked on a stale link Error

2007-08-14 Thread Daniel Jue
Ajit,

You would have to actively store your trail, like breadcrumbs in a
data structure that is still available even after the user has timed
out.  You might want to persist it to a database, instead of keeping
track of it in memory.

Then after login success, the login page/component would look up the
last visited page and then try to send the user there by sending that
page.

So this is not something automatically handled by Tapestry.

On 8/14/07, Ajit Raj <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I got a error as following after I tried to relog in to the application -- it 
> happens when I cliecked a "Submit" button on one of the page after session 
> already timeout, and it redirect me back into the login page.
>
> You have clicked on a stale link.
> Rewind of form core/Example/SchoolReport expected only 0 form elements, but 
> an additional id was requested by component sure/DateSelect/CheckDateSelected.
> This is most likely the result of using your browser's back button, but can 
> also be an application error.
> You may continue by returning to the application's home page.
>
> I have to go to the home page first, then go to the page where I clikced 
> "submit" button.
>
> Is there a way to go back to the my last page after relogin instead of go 
> through the home page?
>
> Thanks,
>
>
> Ajit
> _
> Messenger Café — open for fun 24/7. Hot games, cool activities served daily. 
> Visit now.
> http://cafemessenger.com?ocid=TXT_TAGLM_AugWLtagline

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



Re: Class cast exception in ASTChain, Bug OGNL-11

2007-08-14 Thread Andrus Adamchik

Hi Jesse,

I found essentially the same problem in a @For loop over a list of objects
that do not implement any common interface, but (by design) have matching
method names. Tapestry would try to cast to the class of the first object in
the loop, instead of using a declared class of the loop variable. This
stalled our upgrade to 4.1.2. 

I traced it down to HiveMindExpressionCompiler.generateGetter(..), but I am
still not sure whether this is a Tapestry or OGNL bug (or rather where the
solution should be implemented). BTW where OGNL posts its releases now? I
couldn't find anything beyond 2.6.7.

I wonder if you had a chance to look into this issue? 

Thanks
Andrus Adamchik



Jessek wrote:
> 
> Thanks, I've re-opened the bug and will take a look.
> 
> On 7/10/07, Damien Uern <[EMAIL PROTECTED]> wrote:
>>
>> Hello,
>>
>> I recently upgraded to OGNL 2.7, Tapestry 4.1.2 and am experiencing the
>> same issue described here http://jira.opensymphony.com/browse/OGNL-11.
>>
>> The original poster didn't seem to provide much information, so I have
>> added a comment to that bug describing the issue I am having. I'm not
>> sure if I need to open a new bug in order for somebody to look at it.
>>
>> I will reproduce my comment here for convenience, any help/workarounds
>> would be most appreciated:
>>
>> I have just updated from Tapestry 4.0 to 4.1.2 with OGNL 2.7 and I am
>> having this same class cast exception on an ASTChain generated class,
>> stack trace is here:
>>
>> Caused by: java.lang.ClassCastException:
>> com.jigsawpublications.common.tapestry.menu.ActionLinkNode
>> at $ASTChain_113aed5c33f.get($ASTChain_113aed5c33f.java)
>> at
>> org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.read(
>> ExpressionEvaluatorImpl.java:142)
>>
>> What we have in the component template looks like this:
>>
>> 
>> 
>>   parameters="ognl:getNodeIter().getAction()"
>> href="#" title="ognl:nodeIter.title">
>> 
>>  
>> 
>> 
>>
>> The nodeIter property on the component class is declared as follows:
>>
>> public IMenuNode getNodeIter() { }
>>
>> So what we have here is a list of objects all implementing this
>> interface IMenuNode, and getNodeIter() returns the current iteration as
>> set by the tapestry @For component. The class cast exception was on an
>> ActionLinkNode which implements that interface. Other classes are
>> PageLinkNode, RootNode and MenuNode. The *only* one that causes a
>> problem seems to be the above @Block component, as another block:
>>
>> 
>> 
>>  #  page="ognl:nodeIter.page">
>> 
>>  
>> 
>> 
>>
>> renders fine without any issue (these other blocks occur earlier in the
>> page than the ActionLinkBlock). If I change the actionLink block to be
>> the following (i.e. change the offending ognl expressions):
>>
>> 
>> 
>>   parameters="ognl:'action'"
>> href="#" title="ognl:'title'">
>> 
>>  
>> 
>> 
>>
>> Then I do not get an exception during the page render. This worked fine
>> with the previous version of ognl we were using (2.6.7).
>>
>> Please let me know if you require more information.
>>
>> Regards,
>>
>> Damien Uern
>>
>> --
>>
>>
>> Damien Uern
>> Online Applications Developer
>> Synect Online Solutions
>> http://www.synect.com
>>
>>
> 
> 
> -- 
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
> 
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Class-cast-exception-in-ASTChain%2C-Bug-OGNL-11-tf4054151.html#a12151415
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



You have clicked on a stale link Error

2007-08-14 Thread Ajit Raj
Hi,
 
I got a error as following after I tried to relog in to the application -- it 
happens when I cliecked a "Submit" button on one of the page after session 
already timeout, and it redirect me back into the login page. 
 
You have clicked on a stale link. 
Rewind of form core/Example/SchoolReport expected only 0 form elements, but an 
additional id was requested by component sure/DateSelect/CheckDateSelected. 
This is most likely the result of using your browser's back button, but can 
also be an application error. 
You may continue by returning to the application's home page. 
 
I have to go to the home page first, then go to the page where I clikced 
"submit" button.
 
Is there a way to go back to the my last page after relogin instead of go 
through the home page?
 
Thanks,
 
 
Ajit
_
Messenger Café — open for fun 24/7. Hot games, cool activities served daily. 
Visit now.
http://cafemessenger.com?ocid=TXT_TAGLM_AugWLtagline

Re: [T5] StackMapTable format error

2007-08-14 Thread Siddhartha Argollo


I’m using jdk 6 u2 on windows, and I still get errors using javassist 
3.4. Although I don’t know why or how, I learned how to rewrite the code 
to bypass them.
When I switch to 3.6.0 CR1, those errors were solved, but worse ones 
appeared, so I decided to stay with the devil I know, and switch back to 
3.4.

The problem must be with javassist on jdk 6.

Stephan Schwab wrote:

Howard Lewis Ship wrote:
  

I haven't tested myself under JDK 1.6.  I suspect its Javassist that's
having the problem.  Not much we can do about that, except see if there's
a
newer version of it that can handle JDK 1.6 better.




That seems to be a problem with a certain combination of Javassit and the
JRE/JDK used. I got this error message as well when executing a Tapestry app
on Mac OS X with the developers preview of Java 1.6. Unfortunately there is
still no production release available. But on our Linux boxes with Sun's
Java 1.6 we don't see that problem.

The newer version of Javassist (3.6.0.CR1) seems to have problems with the
DP Java 1.6 on the Mac as well. At first it seems to solve the issue, but I
got class rewriting trouble later on. So I suspect there is nothing wrong
with javassist, but instead the preview release of the JVM is causing the
problem.

Another inconvenience is that javassist 3.6.0.CR1 in itself seems to be
preview as well and is not available via Maven's central repository.

Stephan

  


--
Siddhartha Argollo
Técnico Judiciário
TRE-BA
[EMAIL PROTECTED]


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



Re: T5 Type to ValueEncoderFactory

2007-08-14 Thread Todd Orr
Thanks for the info. I'll add that to my component. However, it seems
odd that a simple conversion from Long to String isn't built in. It
seems to me that such standard conversions should be part of the
framework.

On 8/14/07, Christian Koeberl <[EMAIL PROTECTED]> wrote:
> Tapestry just supports a ValueEncoder for String and Enum. If you want
> additional
> encoders you have to implement them yourself:
>
> class LongValueEncoder implements ValueEncoder
> {
> public String toClient(Long value)
> {
> return value == null ? "" : value.toString();
> }
>
> public Long toValue(String clientValue)
> {
> try
> {
> return new Long(clientValue);
> }
> catch (NumberFormatException e)
> {
> return null;
> }
> }
> }
>
> To use the encoder either add them to your AppModule:
>
> public static void contributeValueEncoderSource(
> MappedConfiguration configuration)
> {
> configuration.add(Long.class, new
> GenericValueEncoderFactory(new LongValueEncoder()));
> }
>
> or add the encoder directly to your RadioGroup (or Select) components (see
>
> http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html)
>
> See:
> http://issues.apache.org/jira/browse/TAPESTRY-1598
>
> --
> Chris

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



Re: [T5] StackMapTable format error

2007-08-14 Thread Stephan Schwab


Howard Lewis Ship wrote:
> 
> I haven't tested myself under JDK 1.6.  I suspect its Javassist that's
> having the problem.  Not much we can do about that, except see if there's
> a
> newer version of it that can handle JDK 1.6 better.
> 

That seems to be a problem with a certain combination of Javassit and the
JRE/JDK used. I got this error message as well when executing a Tapestry app
on Mac OS X with the developers preview of Java 1.6. Unfortunately there is
still no production release available. But on our Linux boxes with Sun's
Java 1.6 we don't see that problem.

The newer version of Javassist (3.6.0.CR1) seems to have problems with the
DP Java 1.6 on the Mac as well. At first it seems to solve the issue, but I
got class rewriting trouble later on. So I suspect there is nothing wrong
with javassist, but instead the preview release of the JVM is causing the
problem.

Another inconvenience is that javassist 3.6.0.CR1 in itself seems to be
preview as well and is not available via Maven's central repository.

Stephan

-- 
View this message in context: 
http://www.nabble.com/-T5--StackMapTable-format-error-tf4194846.html#a12147650
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Rounded Corners Service not working?

2007-08-14 Thread Henry Chen

Any other thoughts what I might have done wrong with this rounded corner
service?


Henry Chen wrote:
> 
> Just tried. Not work either. Same error in Tomcat.
> 
> SEVERE: Image generated had zero length byte array from parameters of:
> [color:FF9900, bgColor:white, width:60, height:60, angle:tr,
> shadowWidth:3, shadowOpacity:-1.0, side:null, wholeShadow: false,
> arcWidth: -1.0, arcHeight:-1.0
>  image: [EMAIL PROTECTED]: type = 1 DirectColorModel: rmask=ff
> gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 66 height =
> 66 #Bands = 3 xOff = -54 yOff = 0 dataOffset[0] 54
> 
> 
> Jessek wrote:
>> 
>> Dunno.   I have it working fine everywhere I use it.
>> 
>> You could try and set -Djava.awt.headless=true .
>> 
>> On 8/10/07, Chris Chiappone <[EMAIL PROTECTED]> wrote:
>>> Ya I was unable to get it to work also.  Not that important i guess.
>>>
>>> On 8/10/07, Henry Chen <[EMAIL PROTECTED]> wrote:
>>> >
>>> > Nobody ever used this rounded corner service? I downloaded the
>>> timetracker
>>> > snapshot war file and drop it in my tomcat 5.5. I didn't work and I
>>> get the
>>> > same error message below. Is it a bug? Can someone help? Thanks!
>>> >
>>> >
>>> > Henry Chen wrote:
>>> > >
>>> > > I tried it with the latest 4.1.3 snapshot without success. Please
>>> help.
>>> > > Thank you.
>>> > >
>>> > > In tomcat 5.5, the following error was generated when I run the
>>> > > timetracker example:
>>> > >
>>> (http://localhost:8080/TimeTracker/rounded?c=FF9900&bc=white&w=60&h=60&a=tr&sw=3&o=.5):
>>> > >
>>> > > SEVERE: Image generated had zero length byte array from parameters
>>> of:
>>> > > [color:FF9900, bgColor:white, width:60, height:60, angle:tr,
>>> > > shadowWidth:3, shadowOpacity:0.5, side:null, wholeShadow: false,
>>> arcWidth:
>>> > > -1.0, arcHeigh
>>> > > t:-1.0
>>> > >  image: [EMAIL PROTECTED]: type = 1 DirectColorModel:
>>> rmask=ff
>>> > > gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 66
>>> height =
>>> > > 66 #B
>>> > > ands = 3 xOff = -54 yOff = 0 dataOffset[0] 54
>>> > >
>>> >
>>> > --
>>> > View this message in context:
>>> http://www.nabble.com/Rounded-Corners-Service-not-working--tf4245275.html#a12092163
>>> > Sent from the Tapestry - User mailing list archive at Nabble.com.
>>> >
>>> >
>>> > -
>>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> >
>>> >
>>>
>>>
>>> --
>>> ~chris
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> 
>> -- 
>> Jesse Kuhnert
>> Tapestry/Dojo team member/developer
>> 
>> Open source based consulting work centered around
>> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Rounded-Corners-Service-not-working--tf4245275.html#a12147534
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



disabling ognl expression cache

2007-08-14 Thread Ken nashua

Folks,

Tapestry compiles expressions with OGNL before using them (and caches the 
compiled expressions).


Is there a way to turn off this caching?

Best regards
Ken in nashua

_
Tease your brain--play Clink! Win cool prizes! 
http://club.live.com/clink.aspx?icid=clink_hotmailtextlink2



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



Re: T5 Type to ValueEncoderFactory

2007-08-14 Thread Christian Koeberl
Tapestry just supports a ValueEncoder for String and Enum. If you want 
additional
encoders you have to implement them yourself:

class LongValueEncoder implements ValueEncoder
{
public String toClient(Long value)
{
return value == null ? "" : value.toString();
}

public Long toValue(String clientValue)
{
try
{
return new Long(clientValue);
}
catch (NumberFormatException e)
{
return null;
}
}
}

To use the encoder either add them to your AppModule:

public static void contributeValueEncoderSource(
MappedConfiguration configuration)
{
configuration.add(Long.class, new 
GenericValueEncoderFactory(new LongValueEncoder()));
} 

or add the encoder directly to your RadioGroup (or Select) components (see 

http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html)

See:
http://issues.apache.org/jira/browse/TAPESTRY-1598

-- 
Chris

Re: T5: a layout with varying style sheets

2007-08-14 Thread Chris Lewis

Martin,

I've just looked at DocumentScriptBuilder, which seems to be a delegate 
of PageRenderSupport(Impl). I understand that PageRenderSupport uses a 
notification (cleanup i think) to know when to insert the scripts, but 
the way scripts are added (correct me if I'm wrong) are via explicit 
method calls as opposed to a declarative way. While this could work I'd 
prefer to just use implicit components in the template, and when the 
page is rendered, have a the component or another service handle 
appending to the . Here's a test component method that I've hacked 
out that does the basics. Right now it just inserts a bogus link tag:


   @BeginRender
   void beginRender(MarkupWriter writer) {
   Element eHead = writer.getDocument().find("html/head");
   eHead.element("link", "rel", "stylesheet", "type", "text/css", 
"href", "test.css");

   }

I'm not sure how I feel about this. Obviously it doesn't address 
ordering, but it seems to be 'correct' other than that and the fact that 
I can't figure out how to close the  element (writer.end() throws 
exceptions). You seem to favor a service over a component - do mind 
explaining why?


Also, could you elaborate on 'peek' ing? I'm still new to Tapestry and 
I'm not completely aware of all the terms/architecture yet.


Thanks tons for your input.

chris

Martin Reurings wrote:
Well, one could peek to get the markupwriter, but perhaps you may want 
to dig through the sourcecode to see what Howard's done to support 
adding javascript files on the fly. He uses a 'service' 
DocumentScriptBuilder to 'declare' the various scripts as well as keep 
them unique and then once all components have rendered he modifies the 
DOM to prepend script tags to the body.


I've been meaning to build a style version for a project we're doing 
but just haven't found the time yet (it's not a critical issue as yet).


The idea here would be:
1) create a 'service' to declare your stylesheets to. In essence any 
List that ensures unique entries and if desires order.
2) declare this service in your AppModule in such a way that it's 
available to all pages
3) Using peek or peekrequired any component can declare stylesheets to 
the service
4) On document cleanup add a link for each declared stylesheet to the 
end of head-elememt (preserving order).


I don't have the details of where to do step (4) yet, I haven't had 
the need to find out but if you follow the trail of breadcrumbs and 
hunt down DocumentScriptBuilder one would assume you'd be able to do 
this :)


Other than this alternative, I see nothing wrong with what you 
proposed, except perhaps that it doesn't ensure uniqueness, which I 
would find essential :)


Good luck,

Martin

Chris Lewis wrote:
So it looks like one would need to (re)create something similar to 
the T4 Shell component.
I've taken a brief look at the DOM api, and if I were to write 
something as focused as a Style component, then it looks like I'd 
have to:


1) create my component class, either in my.namespace.components, or 
another module that is loaded and contributed

2) get a MarkupWriter instance via void beginRender/@BeginRender
3) use writer.getRootElement() to get the root, and then traverse 
into the 
4) assuming eHead is my  Element, use eHead.element("link", 
"rel", "stylesheet", "type", "text/css", "href", 
"TODO-css-url-here"), to append a 


Can anyone comment on the (in)correctness of this?
It'd be nice to ensure ordering of the sheets somehow, so they can 
cascade properly. It'd be easier to do that with a more sophisticated 
Shell-link component that handled building the page base (head, 
metas, scripts, etc). Anyway, please share thoughts.


thanks
chris

Robert Zeigler wrote:

T5 renders with a dom.
Gives you a lot of control...
You could create a "style" component that finds the head and inserts 
the appropriate  element.
Then your components could add their own stylesheets using the style 
component, with the page and containing components none the wiser.
You would want to make sure that a given stylesheet is inserted only 
once, of course (eg, if your component is contained within a loop...).

A component like this should be very straightforward to write in T5.

Robert

On Aug 13, 2007, at 8/134:51 PM , Chris Lewis wrote:

One of the nice things I learned in my brief investigation of 
T4.1.2 was that the Shell component would automatically pick up any 
style sheets a page declared using the @Style annotation (or 
something like that). I've been wondering how something like this 
might be achieved in T5, using the available components as opposed 
to subclassing a base page. This seems like a feature that would be 
part of the core, as it is such a common need.
I know I could emulate this by creating a layout that expected a 
page property, say externalCss (a collection), and using the Loop 
component to iterate it and insert the link elements. Is this the 
only way to do this in T5?


thanks!
chris

--

Re: JSON help... image scaling onRender

2007-08-14 Thread Ken nashua

Ooops... let me take that back...

That was extraneous text being clipped... not the image.

OK, so the actual image does scale down.

I reduced my height to somethign reasonable for header and went with 
WIDTH=100%.


I think this should get me what I want for the short run.

Thanks for taking the time.
Best regards
Ken

_
Puzzles, trivia teasers, word scrambles and more. Play for your chance to 
win! http://club.live.com/home.aspx?icid=CLUB_hotmailtextlink



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



Re: JSON help... image scaling onRender

2007-08-14 Thread Ken nashua

Thanks Jesse,

Wanted to let you know that the scaling down fails.

I went with...

div#header {
color: black;
clear: both;
padding: 0;
height: 15%;
width: 100%;
background: #fff url( images/trails-header94.jpg ) top left no-repeat;
}

And the image gets clipped. It does not scale down to the 15%. Is all this 
incapability due to CSS geometry mgt? Thats kinda why I wanted to go with 
JSON to do my own geometry mgt onLoad.


Best regards
Ken

_
Find a local pizza place, movie theater, and more….then map the best route! 
http://maps.live.com/default.aspx?v=2&ss=yp.bars~yp.pizza~yp.movie%20theater&cp=42.358996~-71.056691&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=950607&encType=1&FORM=MGAC01



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



Re: JSON help... image scaling onRender

2007-08-14 Thread Ken nashua

Thanks Jesse,

Well I was hoping to find an end to end JSON example... just snippets 
around... no one really has shown substantial usage of that.


For my solution though...

Currently this is what we got in css (the main reason why I wanted to go 
with JSON)...


div#header {
color: black;
clear: both;
padding: 0;
height: 94px;
background: #fff url( images/trails-header94.jpg ) top left no-repeat;
}

So I am assuming your implying this... since there are no width/height specs 
for "background"


div#header {
color: black;
clear: both;
padding: 0;
height: 100%;
width: 100%;
background: #fff url( images/trails-header94.jpg ) top left no-repeat;
}

But you forgot that I do not have any frames... so when I specify 100%, the 
image takes up the WHOLE space of the browser viewport. ANything rendered 
after that gets clipped (which is basically my nav pane and content pane).


I do not want to go with frames due to clipping issues.

Any more ideas?

how bout' that JSON end to end example? Any takers (or givers).
best regards
Ken

_
See what you’re getting into…before you go there 
http://newlivehotmail.com/?ocid=TXT_TAGHM_migration_HM_viral_preview_0507



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



Re: T5 Type to ValueEncoderFactory

2007-08-14 Thread Nick Westgate (Work)

This error looks familiar. Can you post some source?
(I can't get to it myself for a couple of days though.)

Cheers,
Nick.



redijedi wrote:
> 
> I've suddenly run into what seems to be a bug that appears when I pass
> an integer to a custom component that itself contains a radiogroup
> that uses the inherit:value as its own value. For some reason it will
> only take a string. If the value is an int, for example, it throws the
> exception below. I find it odd that it is not converting this for me
> as I might expect. Nor do I know where to manually convert this
> myself.
> 
> 
> Caused by: java.lang.IllegalArgumentException: No adapter from type
> int to type org.apache.tapestry.services.ValueEncoderFactory is
> available (registered types are java.lang.Enum, java.lang.String).
>   at
> org.apache.tapestry.ioc.util.StrategyRegistry.findMatch(StrategyRegistry.java:125)
>   at
> org.apache.tapestry.ioc.util.StrategyRegistry.get(StrategyRegistry.java:102)
>   at
> org.apache.tapestry.internal.services.ValueEncoderSourceImpl.createEncoder(ValueEncoderSourceImpl.java:48)
>   at
> $ValueEncoderSource_1146231daef.createEncoder($ValueEncoderSource_1146231daef.java)
>   at
> org.apache.tapestry.corelib.components.RadioGroup.defaultEncoder(RadioGroup.java:84)
>   at
> org.apache.tapestry.corelib.components.RadioGroup.containingPageDidLoad(RadioGroup.java)
>   at
> org.apache.tapestry.internal.structure.ComponentPageElementImpl$3.run(ComponentPageElementImpl.java:92)
>   at
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:923)
>   ... 38 more
> ... Removed 22 stack frames
> 
> 
> Any ideas?
> 
> Thanks
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5-Type-to-ValueEncoderFactory-tf4264856.html#a12142597
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: ajax question

2007-08-14 Thread Lance
I've gotten around IE's lack of innerHTML support in tables by creating 
an entirely new table then ripping the row(s) out of it.



   
   ...
   



   var rowHtml = 'data';
   var div = document.createElement('div');
   div.innerHtml = '' + rowHtml + '
'; var tbody = div.firstChild.firstChild; var row = tbody.firstChild; tbody.removeChild(row); document.getElementById('mainTbody').appendChild(row); Cheers, Lance. Jesse Kuhnert wrote: In IE you can only replace the inner content of td elements, anything above that is off limits. But..tables are still a perfectly acceptable way to lay content out. I've played the floating div css whatever game and found it to be more trouble than it's worth a lot (but not always) of the time. Or I'm just lazy. :) (but even the "ajax kings" - ie gmail / others use a lot of tables as well so it must be not as bad as people think) On 7/28/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: For what I can remember table elements substitution (innerHTML ='...') have problem under M$IE either if you threat 'em with dom. The tbody element is needed tho handle all table 'real' content and to separate that content from the header and footer that i threat for different scopes. On 7/28/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote: that is true they do get tricky when it comes to vertical scaling, you need to use javascript to maintain that. however im still confused onto y you are using a tbody. i have no idea wether a tbody would have problems with ajax. I dont think it would. - Original Message - From: "Andrea Chiumenti" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Friday, July 27, 2007 5:23 PM Subject: Re: ajax question Yes the use of div would be very nice, but as far as I know div elements don't expand very well vertically, so building a table using div elements for cells and rows would be a little tricky. sigh! ps.: I hate tables too On 7/27/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote: tbody is a soon to be deprecated html element. i would recommend steering away from tables and try to utilize div's and css as much as possible. Especially if you wanna be using alot of AJAX. - Original Message - From: "Andrea Chiumenti" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Thursday, July 26, 2007 1:30 AM Subject: Re: ajax question Yea! "..because they are evil bastards" +1 On 7/26/07, Marcus Schulte <[EMAIL PROTECTED]> wrote: - at least, that's a pretty decent reason, isn't it? 2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>: IE won't let you do it. ..because they are evil bastards. On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: Does anybody know if there are some problems in updating a tbody element when performing an ajax request? Thx, kiuma -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com -- Marcus Schulte http://marcus-schulte.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: t4.1.2 + dojo tree component beginner question

2007-08-14 Thread mn

Ok, I used not proper word(component), it should be widget :) 
I will be looking for answer how to use dojo tree widget on tapestry page on
dojo forum but i thought that I find out how to do it on tap forum ... So
maybe someone give me example?


Jessek wrote:
> 
> You should try the dojo support forums - there's no such thing as a
> Tapestry Dojo tree component.   (at least there better not be, not in
> tapestry at least ;)  )
> 
> http://dojotoolkit.org/forums/forums/support/dijit
> 
> On 8/13/07, mn <[EMAIL PROTECTED]> wrote:
> 
> 

-- 
View this message in context: 
http://www.nabble.com/t4.1.2-%2B-dojo-tree-component-beginner-question-tf4260575.html#a12140168
Sent from the Tapestry - User mailing list archive at Nabble.com.


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