Process form post from non-trapestry site

2010-07-26 Thread DavidWei

Hi,

I am working on consolidating login processes of two web applications with
single sign-on. The Main app is not written in Tapestry, but the other is.
So when the user logs in the main app, there will be a link to the Tapestry
application by passing some login information through form post, which will
be used to decide what pages this user can view. 

What should I do to read the post information from external non-tapestry app
inside the tapestry app?

Thanks in advance,

David 
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Process-form-post-from-non-trapestry-site-tp5339551p5339551.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



T5.1: onclick not called in actionLink with updateZone in IE

2010-05-05 Thread DavidWei


Hi,

In the application I am working on, I like to show a processing wheel
turning when processing "Delete" action. After deletion is done, it will
refresh the update zone with some sort of messages related to "Delete" and
stop processing wheel. It works in Firefox, but not in IE because the
onclick function is not called at all. 

sample codes like this in 'a' tag which has:
t:id="deleteTemplate" t:zone="updateZone"  t:context="${template.id}"
t:type="actionLink" onclick="startProcessingWheel('${processingMessage}',
numOfParam);">Delete

Can somebody know what is going on in IE? What is the solution?

Thanks,

David

-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/T5-1-onclick-not-called-in-actionLink-with-updateZone-in-IE-tp5011177p5011177.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: Javascript error in IE when a javascript call in an Ajax block

2010-03-03 Thread DavidWei

Thanks for your suggestion. I will try to do what you suggested and to see if
it is working.

By the way, I like to point out that exact same codes work fine with old
version Tapestry 5.0.0.18, but do not work with T5.1.0.5 when I am upgrading
Tapestry. So there must be some changes on renderings since version
T5.0.0.18. 

Maybe you experts can know why it happens?

Thanks

David

 

Thiago H. de Paula Figueiredo wrote:
> 
> On Tue, 02 Mar 2010 18:54:40 -0300, DavidWei  wrote:
> 
>> When you mentioned "Static", I do not know what you mean? in my case, the
>> parameters passed in have to be loaded dynamically because we are using a
>> single text editor to edit many text areas so that each area(called  
>> content block) will have a unique id.
> 
> @Inject RenderSupport and then use its addScript() method in some  
> rendering event handler method. That's the recommend way of generating  
> JavaScript code in Tapestry. It works very well in AJAX requests. There's  
> a very good example and explanation at  
> http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da  
> Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> 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://old.nabble.com/Javascript-error-in-IE-when-a-javascript-call-in-an-Ajax-block-tp27761290p27768941.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: Javascript error in IE when a javascript call in an Ajax block

2010-03-02 Thread DavidWei

Hi Howard,

Thanks for your response.

In the web app I am working on. I did have a Javascript in a .js file and
reference it. In the code example, I just want to simplify the codes by
using inline javascript codes. 

The problem now is not that it can not reference the method, but it popups
javascript error "syntax error" when the ajax block codes are renderred
after the link invocates the Ajax call. Somehow, IE does not like the single
quotes used to pass parameters. Like I said, it does not have any problems
in FF.

When you mentioned "Static", I do not know what you mean? in my case, the
parameters passed in have to be loaded dynamically because we are using a
single text editor to edit many text areas so that each area(called content
block) will have a unique id. 

So I kind of feel that somehow when Tapestry rendered the codes in an Ajax
block, it does somethings IE does not like. Too bad I can not see the codes
behind. 

If you can not understand the problem completely, can you just copy the
codes to run in IE?  you will see the problem I described here.

Thanks for your help!

David, 



Howard Lewis Ship wrote:
> 
> Don't do that.  Put static JavaScript in a .js file and just reference
> it.  Use (in 5.2) JavaScript.importJavaScriptLibrary().
> 
> On Tue, Mar 2, 2010 at 1:16 PM, DavidWei  wrote:
>>
>> Hi,
>>
>> when I am trying to upgrade our web app to Tapestry 5.1.0.5, I have got a
>> javascript syntax error when a javascript method with parameters is
>> called
>> inside a Ajax block. I have tested many kinds of scenarios, I could not
>> figure out the problem.
>>
>> 1. If the javascript method with parameters is not in a Ajax block, it
>> runs
>> fine in IE and FF
>> 2. If the javascript method with parameters is in a Ajax block, it runs
>> fine
>> in FF, but has a syntax error in IE;
>>
>> Can someone tell me what is wrong? Thanks a lot.
>>
>> Here are my codes:
>>
>>
>> Test.tml:
>>
>> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
>> xmlns:p="tapestry:parameter">
>>        
>>        function copyContentPieceToMceEditor(src, dest, editorId) {
>>
>>                alert("src=" + src);
>>                alert("dest=" + dest);
>>                alert("editorId=" + editorId);
>>        }
>>
>>        
>>
>>         Ajax Call
>>
>>                        
>>                        
>>
>>                        
>>                                > cellspacing="0">
>>                                
>>                                        
>>                                                
>>                                                         # Edit
>>                                                
>>                                        
>>                                
>>                        
>>                        
>>  
>>
>> Test.java:
>>
>> public class Test extends BasePage
>> {
>>
>>       �...@inject
>>        private Block ajaxBlock;
>>
>>        public Block getAjaxBlock()
>>        {
>>                return ajaxBlock;
>>        }
>>
>>        public Block onActionFromEditContentBlock()
>>        {
>>                return getAjaxBlock();
>>        }
>>
>> }
>> --
>> View this message in context:
>> http://old.nabble.com/Javascript-error-in-IE-when-a-javascript-call-in-an-Ajax-block-tp27761290p27761290.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
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> -
> 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://old.nabble.com/Javascript-error-in-IE-when-a-javascript-call-in-an-Ajax-block-tp27761290p27761694.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



Javascript error in IE when a javascript call in an Ajax block

2010-03-02 Thread DavidWei

Hi,

when I am trying to upgrade our web app to Tapestry 5.1.0.5, I have got a
javascript syntax error when a javascript method with parameters is called
inside a Ajax block. I have tested many kinds of scenarios, I could not
figure out the problem. 

1. If the javascript method with parameters is not in a Ajax block, it runs
fine in IE and FF
2. If the javascript method with parameters is in a Ajax block, it runs fine
in FF, but has a syntax error in IE; 

Can someone tell me what is wrong? Thanks a lot.

Here are my codes:


Test.tml:

http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
xmlns:p="tapestry:parameter">

function copyContentPieceToMceEditor(src, dest, editorId) {

alert("src=" + src);
alert("dest=" + dest);
alert("editorId=" + editorId);
}



 Ajax Call 









 # Edit 





  

Test.java:

public class Test extends BasePage
{

@Inject
private Block ajaxBlock;

public Block getAjaxBlock()
{
return ajaxBlock;
}

public Block onActionFromEditContentBlock()
{
return getAjaxBlock();
}

}
-- 
View this message in context: 
http://old.nabble.com/Javascript-error-in-IE-when-a-javascript-call-in-an-Ajax-block-tp27761290p27761290.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: Problem: T 5.1.0.5 renders JavaScript comment tag as regular html comment tag

2010-02-12 Thread DavidWei

Thanks for reply.

I understand the browser executes javascript codes. 

The problem I have is if I just simply execute a html file which includes
javascript codes with comment tag directly using the browser, I can see the
javascript codes are executed. But if I put the same javascript codes inside
of a tml file in Tapestry app, the codes are not executed. 

by the way, the simple javascript codes listed in my email is simply used to
be an example, is not something I am using in my app.

So What caused the difference?

David



Thiago H. de Paula Figueiredo wrote:
> 
> On Fri, 12 Feb 2010 14:31:09 -0200, DavidWei  wrote:
> 
>> I am working to upgrade to T 5.1.0.5 and found this problem.
>>
>> When I include javascript codes with comment tag in tml
>> file, Tapastry treats it as html comment tag and never run the javasript
>> codes.
> 
> Tapestry doesn't execute JavaScript, the browser does.
> By the way, any browser released in the last 8 or 9 years doesn't need you  
> to put JavaScript code inside HTML comments.
> By the way (2), why do you need to write HTML through JavaScript when  
> you're using a Web framework?
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da  
> Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> 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://old.nabble.com/Problem%3A-T-5.1.0.5-renders-JavaScript-comment-tag-as-regular-html-comment-tag-tp27566063p27566744.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



Problem: T 5.1.0.5 renders JavaScript comment tag as regular html comment tag

2010-02-12 Thread DavidWei

I am working to upgrade to T 5.1.0.5 and found this problem.

When I include javascript codes with comment tag in tml
file, Tapastry treats it as html comment tag and never run the javasript
codes. 

I even tested to just run simple codes like this 





"Hello World" is never written to the browsers.

Is it a bug? 

Can someone give me a clue?

Thanks,


David 

 
-- 
View this message in context: 
http://old.nabble.com/Problem%3A-T-5.1.0.5-renders-JavaScript-comment-tag-as-regular-html-comment-tag-tp27566063p27566063.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: T5.0.18 javascript error in IE on a datefield

2009-09-02 Thread DavidWei

It has been a month without reply.  Really need help,
Please!!!



DavidWei wrote:
> 
> I was trying to use datefield component  to enter a date from builtin
> calendar, but it showed a javascript error, this.pupup.clinePosition(...)
> is null or not an object, when a calendar icon is clicked first time. 
> 
> sample Codes like this.
> 
> in tml file:
> 
> 
> Birth Date:
> 
>  t:value="dateOfBirth"/>
> 
> 
> 
> in java codes:
> 
> @Persist
> private Date dateOfBirth;
> public Date getDateOfBirth()
> {
> return dateOfBirth;
> }
> public void setDateOfBirth(Date dateOfBirth)
> {
> this.dateOfBirth = dateOfBirth;
> }
> 
> Can anybody tell me whether it is still a knowing issue or fixed already?
> If it is still an issue,  what is the alternative solution?
> 
> Thanks,
> 
> David
> 

-- 
View this message in context: 
http://www.nabble.com/T5.0.18-javascript-error-in-IE-on-a-datefield-tp24902769p25260515.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



T5.0.18 javascript error in IE on a datefield

2009-08-10 Thread DavidWei

I was trying to use datefield component  to enter a date from builtin
calendar, but it showed a javascript error, this.pupup.clinePosition(...) is
null or not an object, when a calendar icon is clicked first time. 

sample Codes like this.

in tml file:


Birth Date:





in java codes:

@Persist
private Date dateOfBirth;
public Date getDateOfBirth()
{
return dateOfBirth;
}
public void setDateOfBirth(Date dateOfBirth)
{
this.dateOfBirth = dateOfBirth;
}

Can anybody tell me whether it is still a knowing issue or fixed already? If
it is still an issue,  what is the alternative solution?

Thanks,

David
-- 
View this message in context: 
http://www.nabble.com/T5.0.18-javascript-error-in-IE-on-a-datefield-tp24902769p24902769.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: T5: pass value between components in different pages

2008-05-06 Thread DavidWei

Thanks for your suggestion.
Actually it is not caused by session timeout, because by default session
timeout is 30 min. In my case, I refresh page just after 10 min. I think the
way I was doing somehow the value/reference of value was cleared by T5.


joshcanfield wrote:
> 
> Instead of persisting the id in the component, why not keep the id in
> the page's context and pass it to the component as a @Parameter?
> 
> If you store stuff in the session then your component needs to be
> smart about what to do when the @Persist'd object is null after a
> session timeout.
> 
> On Mon, May 5, 2008 at 2:19 PM, DavidWei <[EMAIL PROTECTED]> wrote:
>>
>> I have two pages, list and edit pages. Each page contains one or more
>> components. From list page, I use an actionlink to pass the item id as
>> Long
>> to edit page, which I have a setter to set this id in the component which
>> I
>> like to use (in which I persist this passed id).
>>
>> Everything is working well if you keep working between those two pages,
>> but
>> I found one problem which is the id value will be null if I refresh the
>> edit
>> page after like 10 min. the T5 will throw exception as follows:
>> org.springframework.transaction.UnexpectedRollbackException: Transaction
>> rolled back because it has been marked as rollback-only
>>
>> To me it seems that the id value passed from list page has got
>> lost/cleaned
>> up.
>>
>> I have tried some alternatives, but no of them is working.
>>
>> Any help will be appreciated!
>>
>>
>> David
>>
>> --
>> View this message in context:
>> http://www.nabble.com/T5%3A-pass-value-between-components-in-different-pages-tp17070690p17070690.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> 
> -- 
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-pass-value-between-components-in-different-pages-tp17070690p17082480.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T5: pass value between components in different pages

2008-05-05 Thread DavidWei

I have two pages, list and edit pages. Each page contains one or more
components. From list page, I use an actionlink to pass the item id as Long
to edit page, which I have a setter to set this id in the component which I
like to use (in which I persist this passed id).  

Everything is working well if you keep working between those two pages, but
I found one problem which is the id value will be null if I refresh the edit
page after like 10 min. the T5 will throw exception as follows:
org.springframework.transaction.UnexpectedRollbackException: Transaction
rolled back because it has been marked as rollback-only

To me it seems that the id value passed from list page has got lost/cleaned
up. 

I have tried some alternatives, but no of them is working. 

Any help will be appreciated!


David

-- 
View this message in context: 
http://www.nabble.com/T5%3A-pass-value-between-components-in-different-pages-tp17070690p17070690.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T5: when is a filed with @Retain cleaned?

2008-04-08 Thread DavidWei

I am using T5 for my current application. There are cases when I need to have
a field's value retain after the request. I know using @Persist it will
work, but I do not want to store so many values in session. I found there
are some samples which use @Retain. By definition, it is said as "By marking
such fields with the Retain annotation, the fields will not be discarded at
the end of the request... This is quite different from Persist, because the
value that's allowed to be retained is not stored persistently; it is simply
not cleared out...".

If it is not cleaned out after the request, when is it cleaned out?

Thanks,

David
-- 
View this message in context: 
http://www.nabble.com/T5%3A-when-is-a-filed-with-%40Retain-cleaned--tp16573382p16573382.html
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: T5 : Editable Select

2008-03-13 Thread DavidWei

I have same need. Can someone answer this? Thanks!

David

martin boulanger wrote:
> 
> Dear all,
> 
> I need to make an editable select box : i.e the user can either chose one
> of the option in the select box or type a custom String. Is it possible to
> make something like this with Tapestry 5?
> 
> Thanks,
> 
> Martin
> 

-- 
View this message in context: 
http://www.nabble.com/T5-%3A-Editable-Select-tp13776203p16042885.html
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: How to add table id into the Grid

2008-03-03 Thread DavidWei

Thanks Davor. It works for now.

Davor Hrg wrote:
> 
> for quick fix, you can
> add an element around the table and give id to it,
> 
> then you get the element by calling
> (this code works if table is direct child... not that is hard to look
> recursively for it)
> 
> var div = $(id);
> var elem = div.firstChild;
> while(elem && elem.tagName != "TABLE") elem=elem.nextSibling;
> if(!elem) return;//no table is direct child
> do you table initialization here
> 
> 
> Davor Hrg
> 
> On Sun, Mar 2, 2008 at 4:58 AM, DavidWei <[EMAIL PROTECTED]> wrote:
>>
>>  Thanks Howard.
>>
>>  I have tried the suggestion Davor provided to use t:id instead before,
>> but
>>  without any luck. Since you think it is a bug, I would like to report
>> this.
>>  Can you tell me how to add this as a bug? I have not done this before.
>> Since
>>  I am working on adding the "drag-and-drop" table row to the grid, it
>> would
>>  not work without a table id. Can you tell me usually how long it will
>> take
>>  to get this kind of bugs fixed? Thanks a lot.
>>
>>
>>
>>
>>  Howard Lewis Ship wrote:
>>  >
>>  > Please add this as a bug; the Grid component should render informal
>>  > parameters into the  element it renders.
>>  >
>>  > On Sat, Mar 1, 2008 at 9:04 AM, Davor Hrg <[EMAIL PROTECTED]> wrote:
>>  >> I think you need to put t:id="userList" instead of id="userList"
>>  >>
>>  >>  Davor Hrg
>>  >>
>>  >>
>>  >>
>>  >>  On 3/1/08, DavidWei <[EMAIL PROTECTED]> wrote:
>>  >>  >
>>  >>  > I need to add a table id to the grid to display user list.
>>  >>  >
>>  >>  > Here is what I try to do:
>>  >>  > >  >>  > t:row="user"  t:model="userModel"t:rowsPerPage="10" t:lean="true"
>>  >>  > t:rowClass="rowCssClass" >
>>  >>  >
>>  >>  > I found the id field is not there in the table tag when I viewed
>>  >> source. It
>>  >>  > is displayed as
>>  >>  > 
>>  >>  >
>>  >>  > How can I do? Thanks in advance.
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  > --
>>  >>  > View this message in context:
>>  >>
>> http://www.nabble.com/How-to-add-table-id-into-the-Grid-tp15777353p15777353.html
>>  >>  > Sent from the Tapestry - User mailing list archive at Nabble.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]
>>  >>
>>  >>
>>  >
>>  >
>>  >
>>  > --
>>  > Howard M. Lewis Ship
>>  >
>>  > Creator Apache Tapestry and Apache HiveMind
>>  >
>>  > -
>>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  > For additional commands, e-mail: [EMAIL PROTECTED]
>>  >
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/How-to-add-table-id-into-the-Grid-tp15777353p15784108.html
>>
>>
>> Sent from the Tapestry - User mailing list archive at Nabble.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-add-table-id-into-the-Grid-tp15777353p15808353.html
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: How to add table id into the Grid

2008-03-01 Thread DavidWei

Thanks Howard.

I have tried the suggestion Davor provided to use t:id instead before, but
without any luck. Since you think it is a bug, I would like to report this.
Can you tell me how to add this as a bug? I have not done this before. Since
I am working on adding the "drag-and-drop" table row to the grid, it would
not work without a table id. Can you tell me usually how long it will take
to get this kind of bugs fixed? Thanks a lot.


Howard Lewis Ship wrote:
> 
> Please add this as a bug; the Grid component should render informal
> parameters into the  element it renders.
> 
> On Sat, Mar 1, 2008 at 9:04 AM, Davor Hrg <[EMAIL PROTECTED]> wrote:
>> I think you need to put t:id="userList" instead of id="userList"
>>
>>  Davor Hrg
>>
>>
>>
>>  On 3/1/08, DavidWei <[EMAIL PROTECTED]> wrote:
>>  >
>>  > I need to add a table id to the grid to display user list.
>>  >
>>  > Here is what I try to do:
>>  > >  > t:row="user"  t:model="userModel"t:rowsPerPage="10" t:lean="true"
>>  > t:rowClass="rowCssClass" >
>>  >
>>  > I found the id field is not there in the table tag when I viewed
>> source. It
>>  > is displayed as
>>  > 
>>  >
>>  > How can I do? Thanks in advance.
>>  >
>>  >
>>  >
>>  > --
>>  > View this message in context:
>> http://www.nabble.com/How-to-add-table-id-into-the-Grid-tp15777353p15777353.html
>>  > Sent from the Tapestry - User mailing list archive at Nabble.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]
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator Apache Tapestry and Apache HiveMind
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-add-table-id-into-the-Grid-tp15777353p15784108.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



How to add table id into the Grid

2008-03-01 Thread DavidWei

I need to add a table id to the grid to display user list. 

Here is what I try to do:


I found the id field is not there in the table tag when I viewed source. It
is displayed as 


How can I do? Thanks in advance.



-- 
View this message in context: 
http://www.nabble.com/How-to-add-table-id-into-the-Grid-tp15777353p15777353.html
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: Tapestry 5 - Display message from beaneditForm validation outside of form

2008-02-05 Thread DavidWei

Has anybody an idea on this? THANKS!!!

DavidWei wrote:
> 
> This is what I want to do.
> 
> Use beaneditForm to create a form from a object (for example User) with
> some required fields. When the beaneditForm validation finds errors, I do
> not want to use default feature to display the error message, instead I
> like to have the missing fields highlighted and error messages are
> displayed in a message area which is outside of the form. How do I do?  
> 
> Thanks for the help.
> 
> 
> Xinhua
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tapestry-5---Display-message-from-beaneditForm-validation-outside-of-form-tp15231982p15291552.html
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: Tapestry[5] - Overriding the form error messages

2008-02-05 Thread DavidWei

Here is the stock trace:

Stack trace 
org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.findOrCreateCoercion(TypeCoercerImpl.java:248)
 
org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.findCoercion(TypeCoercerImpl.java:168)
 
org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(TypeCoercerImpl.java:120)
 
org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:200)
 
com.rrd.sbmaker.web.components.ErrorMsg._$read_parameter_form(ErrorMsg.java) 
com.rrd.sbmaker.web.components.ErrorMsg.renderMessage(ErrorMsg.java:33) 
com.rrd.sbmaker.web.components.ErrorMsg.beginRender(ErrorMsg.java) 
org.apache.tapestry.internal.structure.ComponentPageElementImpl$10$1.run(ComponentPageElementImpl.java:330)
 
org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:891)
 
org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:56)
 
org.apache.tapestry.internal.structure.ComponentPageElementImpl$10.render(ComponentPageElementImpl.java:334)
 
org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:58)
 
org.apache.tapestry.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:58)
 
org.apache.tapestry.internal.services.MarkupRendererPipelineImpl$1.renderMarkup(MarkupRendererPipelineImpl.java:39)
 
org.apache.tapestry.services.TapestryModule$20.renderMarkup(TapestryModule.java:1349)
 
org.apache.tapestry.services.TapestryModule$19.renderMarkup(TapestryModule.java:1330)
 
org.apache.tapestry.services.TapestryModule$18.renderMarkup(TapestryModule.java:1312)
 
org.apache.tapestry.services.TapestryModule$17.renderMarkup(TapestryModule.java:1294)
 
org.apache.tapestry.internal.services.MarkupRendererPipelineImpl.renderMarkup(MarkupRendererPipelineImpl.java:48)
 
org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:55)
 
org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:56)
 
org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:87)
 
org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:66)
 
org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:905) 
org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43)
 
org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:487) 
org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
 
org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:94)
 
org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:85)
 
org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
 
org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:107)
 
org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:888) 
org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:164) 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 
java.lang.Thread.run(Unknown Source) 



Adam Zimowski wrote:
> 
> This doesn't make sense, as there should be no reason to coerce on a
> single type (org.apache.tapestry.corelib.components.Form). What does
> your Start class look like?
> 
> On Feb 4, 2008 9:29 AM, DavidWei <[EMAIL PROTECTED]> wrote:
>>
>> I try to run your codes, but got an exception as follows:
>> An unexpected application exception has occurred
>>
>> Failure reading parameter form of component test/Start:errormsg: Could
>> not
>> find a coercion from type org.apache.tapestry.corelib.components.Form to
>> type org.apache.tapestry.corelib.components.Form ...
>>
>> Do I miss anything? Please advise.
>>
>> Thanks,
>>
>>
>>
>&

Re: Tapestry[5] - Overriding the form error messages

2008-02-04 Thread DavidWei

I try to run your codes, but got an exception as follows:
An unexpected application exception has occurred

Failure reading parameter form of component test/Start:errormsg: Could not
find a coercion from type org.apache.tapestry.corelib.components.Form to
type org.apache.tapestry.corelib.components.Form ...

Do I miss anything? Please advise.

Thanks,




Adam Zimowski wrote:
> 
> Okay,
> 
> I created new component "errorMsg" which can be used anywhere on the
> page to display individual error. Enhancements welcome.
> 
> This component takes two arguments, a literal string denoting field
> for which error should be rendered, and form to which field is bound.
> The form must be accessible via getter from the class page.
> 
> import org.apache.tapestry.Field;
> import org.apache.tapestry.MarkupWriter;
> import org.apache.tapestry.ValidationTracker;
> import org.apache.tapestry.annotations.BeginRender;
> import org.apache.tapestry.annotations.Parameter;
> import org.apache.tapestry.corelib.components.Form;
> 
> public class ErrorMsg {
>   
>   @Parameter
>   private String _fieldName;
>   
>   @Parameter
>   private Form _form;
>   
> 
>   public void setFieldName(String aFieldName) {
>   _fieldName = aFieldName;
>   }
> 
>   @BeginRender
> void renderMessage(MarkupWriter writer)
> {
>   Field f = new Field() {
>   public String getElementName() { return _fieldName; }
>   public String getLabel() { return null; }
>   public boolean isDisabled() { return false; }
>   public String getClientId() { return _fieldName; }
>   };
>   
>   ValidationTracker tracker = _form.getDefaultTracker();
>   String err = tracker.getError(f);
> 
>   writer.write(err);
> }
> 
>   public void setForm(Form aForm) {
>   _form = aForm;
>   }
> }
> 
> To display individual error messages simply place 
> anywhere on the page. It will render the error if there is one for a
> field.
> 
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> 
> 
>   
> 
> User Name:
>t:validate="required,minlength=3,maxlength=8"/>
> Foo:
>t:validate="required"/>
>   
>value="Submit"/>
>   
>   
> 
> 
> 
> 
> 
> 
> 
> Page Class:
> 
> public class Start {
> 
>   @Persist
>   private String _foo;
> 
>   @Persist
>   private String _bar;
>   
>   @Component(id="myform")
>   private Form _form;
> 
>   public Form getForm() {
>   return _form;
>   }
> 
>   public String getBar() {
>   return _bar;
>   }
> 
>   public String getFoo() {
>   return _foo;
>   }
> }
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tapestry-5Overriding-the-form-error-messages-tp15183424p15268993.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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