Locale switcher and exception reporter

2009-12-09 Thread shymon


I have an Error page which implements ExceptionReporter and intercepts all
exceptions thrown by other pages. As every other page in my app, Error page
contains locale switcher - user should be able to change language of
displayed error message. (Locale switcher is part of Layout component).

In examples on tapestry page, 'message' variable is persistent with FLASH
strategy. But with this strategy error message doesn't survive locale change
which is quite obvious because locale switcher links, which are defined this
way:

# ${locale.language} 

link to their containing page which is Error page, not the page which throws
exception.

Is there any method to handle exceptions with single Error page allowing
user to change language of error message?
-- 
View this message in context: 
http://old.nabble.com/Locale-switcher-and-exception-reporter-tp26719842p26719842.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



LinkSubmit problem - invalid form action

2009-11-09 Thread shymon


Hi,

I use LinkSubmit on two pages of my app. On one page it works fine but on
the other it's not; when I click on that link nothing happens. The only
difference I have noticed is in form action generated by T5. On working
page it looks like:

action=/appContext/pageName.formId

and on not-working page

action=pageName.formId

What can cause this problem?
-- 
View this message in context: 
http://old.nabble.com/LinkSubmit-problem---invalid-form-action-tp26271415p26271415.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: Login page - passing context between pages

2009-10-16 Thread shymon



DH-14 wrote:
 
 In that case, the context is only useful for Login page, but not the
 following page, so only returning logic name of source page would not
 carry the context.
 Try PageRenderLinkSource#createPageRenderLinkWithContext(String pageName,
 Object... context) and return that link.
 

Thanks a lot, it works.
-- 
View this message in context: 
http://www.nabble.com/Login-page---passing-context-between-pages-tp25907016p25922412.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



Login page - passing context between pages

2009-10-15 Thread shymon


Some pages of my app are available only to authorized users. When user
enters such a page and is not logged in, appropriate message is shown with
link to login page. After logon user should return to the same page he came
from to login page.

So I pass logical name of restricted page and it's context through context
parameter of pageLink. In login page I use onActivate and onPassivate to
maintain source page context. It works great, but when login is successful I
return source page logical name which causes redirect, but rest of the page
context is null. Simply onPassivate called after onSuccess returns array of
nulls. (Inside onSuccess all variables are correctly set).

How can I store source page context through logon process?

-- 
View this message in context: 
http://www.nabble.com/Login-page---passing-context-between-pages-tp25907016p25907016.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



Strange java applet behavior with T5

2009-09-30 Thread shymon

Hi,

I have simple page. Just body and few div's
After adding java applet to it I noticed that single request in browser
causes tapestry to render this page 2 times. (at least beginRender method
ist executed 2 times - and only one time when there is no applet on page).

Moreover, during the second pass my activation context variable has
unexpected value. eg.:

pass 1:
---
ACTIVATE: 36971
PAGE BEGINRENDER
PASSIVATE: 36971
PASSIVATE: 36971  (good value)

pass 2:
---
ACTIVATE: META-INF
PAGE BEGINRENDER
PASSIVATE: META-INF
PASSIVATE: META-INF

I don't know where META-INF comes from.

What could be the problem?
How should I embed java applets in tapestry page?

thx for any help,
Shymon
-- 
View this message in context: 
http://www.nabble.com/Strange-java-applet-behavior-with-T5-tp25684505p25684505.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: Strange java applet behavior with T5

2009-09-30 Thread shymon


Thiago H. de Paula Figueiredo wrote:
 
 Em Wed, 30 Sep 2009 13:24:40 -0300, shymon shym...@poczta.onet.pl  
 escreveu:
 
 Hi,
 
 Hi!
 
 Moreover, during the second pass my activation context variable has
 unexpected value. eg.:
 
 Make sure you use ${asset:...} or absolute paths to reference any files  
 inside your templates.
 
 

My template is as follows:

html t:type=layout title=SomeTitle
  xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd;
  xmlns:p=tapestry:parameter
  div class=panel
div class=rel-panel
  applet code=nrs/MainApplet.class
archive=${asset:context:applet/SomeApplet.jar} width=100% height=600
id=rel-graph/
/div
  /div
  br/
/html

and activation context methods:

 void onActivate(String eid) {
setEid(eid);
  }

  List onPassivate() {
List params = new Vector();
params.add(getEid());
return params;
  }


-- 
View this message in context: 
http://www.nabble.com/Strange-java-applet-behavior-with-T5-tp25684505p25688483.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



changing grid sort constraints from event handler

2009-07-20 Thread shymon


How can I change grid sorting constraints from actionLink event handler?


-- 
View this message in context: 
http://www.nabble.com/changing-grid-sort-constraints-from-event-handler-tp24570524p24570524.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: TextField component and body background attachement

2009-07-14 Thread shymon


Ok, to exclude influence of some other components I'm using in project, I
have created new project using Tapestry 5 Quickstart Archetype (5.1.0.5) and
put long placeholder text in Index.tml. In internet explorer background was
scrolled _with_ the rest of content.

So then I added following code to Index.tml:

t:form t:id=someFormId
input type=text t:type=TextField t:id=someTextId
value=literal:test/
/t:form

and background image became fixed and content was scrolled independently.


IE developer tool shows that body element has some attributes added:

body style=background-attachment: fixed; fire=function() {
  return __method.apply(null, [this].concat($A(arguments)));
} observe=function() {
  return __method.apply(null, [this].concat($A(arguments)));
} stopObserving=function() {
  return __method.apply(null, [this].concat($A(arguments)));
} visible=function() { ... (some long long JS follows here)

Ok, maybe this JS is necessary, but WHY this style attribute is added???!!!
I'm almost sure it's a bug and it is very annoying as I can't override it
with css.
And I don't want to have my bkg image fixed.

Does anybody know something about it?

PS: In other browsers body has no attributes and everything works fine.
-- 
View this message in context: 
http://www.nabble.com/TextField-component-and-body-background-attachement-tp24463036p24476651.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



TextField component and body background attachement

2009-07-13 Thread shymon


Hi,

I have noticed that whenever I put TextField component on my page eg. like
this:

t:form t:id=someFormId
  input type=text t:type=TextField t:id=someTextId/
/t:form

body element in generated page source in MSIE gets additional style
attribute:
 style=background-attachment: fixed;

This occurs _only_ in MSIE.

Is it a bug or feature?
(T5.1.0.5)


-- 
View this message in context: 
http://www.nabble.com/TextField-component-and-body-background-attachement-tp24463036p24463036.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



ActionLink in bundle message

2009-07-07 Thread shymon


How can I insert actionLink into message from resource bundle?

I have message with parameter which I replace using messages.format method.
I also create link object with createEventLink() and   element using Element
class.
It almost works, but link created this way has no id so I cannot handle only
it's action.

I have some other solutions to my problem, but I wonder how can I add
id to dynamically created link.
-- 
View this message in context: 
http://www.nabble.com/ActionLink-in-bundle-message-tp24375267p24375267.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: ActionLink in bundle message

2009-07-07 Thread shymon



Thiago H. de Paula Figueiredo wrote:
 
 On Tue, Jul 7, 2009 at 12:15 PM, shymonshym...@poczta.onet.pl wrote:
 
 You don't need a component id to handle its event: just handle the
 event normally:
 
 @OnEvent(nameOfYourEvent)
 void handle() {...}
 
 If you create more than one event link this way, generate their links
 with different event names or provide some activation context to them.
 
 

I have done it this way for now. It's simple and good enough.
Was just wondering if I am missing something, and can learn sth. new :)


-- 
View this message in context: 
http://www.nabble.com/ActionLink-in-bundle-message-tp24375267p24376097.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



SessionState values in url

2009-06-25 Thread shymon


I need to exchange small amount of data (for now one string value) between
majority of my app pages, but I want to store this value in the page url.
AFAIK SessionState offers only 'session' strategy.
Moreover I don't want to handle this single value in each page's onActivate. 

I thought I could create base class which handles this parameter and then
subclass it in other page classes.

But maybe there is another, better solution?
-- 
View this message in context: 
http://n2.nabble.com/SessionState-values-in-url-tp3154400p3154400.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 app - Tomcat with security manager deployment problem

2008-12-08 Thread shymon

Hello,

I'm trying to deploy t5 app to Tomcat 6.0.18 with security manager turned
on. In the beginning there were some access exceptions but I have granted
following Permissions:

grant codeBase file:${catalina.base}/webapps/myapp/WEB-INF/lib/- {
 permission java.lang.reflect.ReflectPermission suppressAccessChecks;
 permission java.lang.RuntimePermission getClassLoader;
 permission java.lang.RuntimePermission getProtectionDomain;
 permission java.util.PropertyPermission javassist-write-dir, read;
 permission java.util.PropertyPermission tapestry.modules, read;
}

And now an exception is thrown which gives me no clue of more permissions to
grant.
When I grant AllPermission application starts, but I can't do that.
Can anyone help? What permissions are needed by T5?

Here goes exception mentioned above:

2008-12-08 16:20:45 org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter app
org.apache.tapestry5.ioc.internal.OperationException: Error building service
proxy for service 'ServletApplicationInitializer' (at
org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(
Logger, List, ApplicationInitializer) (at TapestryModule.java:1042)): Unable
to create class $ServletApplicationInitializer_11e172fa6b1 as subclass of
java.lang.Object: Unable to lookup class java.lang.Object: j
ava.lang.Object
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:70)
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:89)
at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:898)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:301)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.access$100(ModuleImpl.java:36)
at
org.apache.tapestry5.ioc.internal.ModuleImpl$1.invoke(ModuleImpl.java:176)
at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withWrite(ConcurrentBarrier.java:138)
at
org.apache.tapestry5.ioc.internal.ModuleImpl$2.invoke(ModuleImpl.java:192)
at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.findOrCreate(ModuleImpl.java:198)
at
org.apache.tapestry5.ioc.internal.ModuleImpl.getService(ModuleImpl.java:97)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:305)
at
org.apache.tapestry5.ioc.internal.RegistryWrapper.getService(RegistryWrapper.java:53)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:88)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:108)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247)
at
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:604)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at

Path to files in WEB-INF?

2008-11-25 Thread shymon


I have a file placed in WEB-INF folder - file which I want to be deployed
with application.
I also want to load that file in page code. How can I obtain path to that
file?
-- 
View this message in context: 
http://www.nabble.com/Path-to-files-in-WEB-INF--tp20679893p20679893.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]



T 5.0.16 - maven repository

2008-11-20 Thread shymon


Please excuse my question if it's too obvious but I'm not very familiar with
maven yet:

I got NetBeans 6.5 with maven support plugin and project which has
dependency to Tapestry 5.0.15.
Now I want to switch to 5.0.16. So I have updated Central Repository Index,
removed 5.0.15 dependency and tried to add 5.0.16 dependency. I clicked Add
Library and filled dialog with: 

GroupId: org.apache.tapestry
ArtifactId: tapestry-core
Version: 5

List of available 5 versions loaded and the newest version I can see there
is 5.0.15.
When I go to Central Repository in browser (http://repo1.maven.org/maven2/)
I can see 5.0.16 is there.

What have I to do to see 5.0.16 from netbeans? How can I add 5.0.16
dependency?

please help,
Shymon

-- 
View this message in context: 
http://www.nabble.com/T-5.0.16---maven-repository-tp20599623p20599623.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: T 5.0.16 - maven repository

2008-11-20 Thread shymon


Ok, I solved my problem :)
I was not quite aware of how to use maven plugin.

-- 
View this message in context: 
http://www.nabble.com/T-5.0.16---maven-repository-tp20599623p20602492.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.0.16 (Release Candidate) now available

2008-11-19 Thread shymon

Forgive me my question but I'm not very familiar with maven stuff:
How can I get 5.0.16 from maven repository?
I have updated Central Repository index and still nothing. 5.0.15 is the
newest version I can find.
I also have 'Include snapshots' option turned on. (netbeans plugin)

shymon
-- 
View this message in context: 
http://www.nabble.com/Tapestry-5.0.16-%28Release-Candidate%29-now-available-tp20563532p20581430.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: Component with recurrent markup

2008-11-15 Thread shymon

How can I create ActionLink dynamically in component class?
Especially, how can I add zone attribute?
addParameter() method of Link is not what I want.
And how can I write this link through Writer?

When I use Writer I'm not able to write Tapestry components like ActionLink.
When I use template, I'm not able to output recurrent/nested ul.

'If' component sources are not very helpful.
The only thing it suggests is to define node markup
lit:actionLink../li as block in template and then output this
block through writer. But how can I do this. Is this possible?

-- 
View this message in context: 
http://www.nabble.com/Component-with-recurrent-markup-tp20506638p20513955.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 do you initialize contents of a Zone when the page is loaded?

2008-11-14 Thread shymon

Your action link event handler probably returns Block.
So you can use delegate component:

t:zone t:id=myZone t:visible=literal:true
  t:delegate to=myBlock/
/t:zone

t:block t:id=myBlock
  ...
/t:zone

shymon
-- 
View this message in context: 
http://www.nabble.com/How-do-you-initialize-contents-of-a-Zone-when-the-page-is-loaded--tp20494166p20497787.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]



Component with recurrent markup

2008-11-14 Thread shymon

I want to create an ajax component: kind of tree which shows current node and
all its parent and child nodes (but only for current node - nodes which are
not relatives of current are not visible). Component consists of zone which
is reloaded after user clicks on any of visible nodes. 

Component template looks like this:

t:container xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  
  t:zone t:id=nodesZone visible=literal:true
t:delegate to=nodesBlock/
  /t:zone

  t:block t:id=nodesBlock
 !-- tree markup --
  /t:block

/t:container

I think most natural tree markup will be nested
ulli...ulli/lili/li.../ul/li/ul.
But how can I create recurrent ul markup? Of course I can prepare markup
in component class and
write it out using t:outputRaw component. But I want each node title be
enclosed by t:actionLink.
Is that possible?
Can I create a link with createEventLink method and use toRedirectURI()
method to get href for a...?
(I tried but it didn't work)

please help...

-- 
View this message in context: 
http://www.nabble.com/Component-with-recurrent-markup-tp20506638p20506638.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: Component with recurrent markup

2008-11-14 Thread shymon



Thiago H. de Paula Figueiredo wrote:
 
 Use a MarkupWriter instead:
 
 @BeginRender
 public void render(MarkupWriter writer) {
   // read the MarkupWriter section in  
 http://tapestry.apache.org/tapestry5/guide/dom.html.
 }
 


But can I use @BeginRender if i use template? 
And i have to use template because I need to use t:zone. As I know it is
not possible to write tapestry components through Writer.

My question is: is it possible to use template and write only part of markup
with Writer?

-- 
View this message in context: 
http://www.nabble.com/Component-with-recurrent-markup-tp20506638p20506979.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]



Form elements in Zones

2008-11-12 Thread shymon

I have written an ajax component: kind of tree which shows current node and
all its parent ind child nodes (but only for current node - nodes which are
not relatives of current are not visible). Component consists of zone which
is reloaded after user clicks on any of visible nodes.

I want this component to be a form element (it implements Field interface).
How can I pass current node id?
My idea was that html which is returned after ajax request (zone reload)
contains not only nodes to show but also hidden form field containing id.

Doesn't work. I get exception: No object of type
org.apache.tapestry5.services.FormSupport is available from the
Environment.

It seems other people also face this problem:
http://www.nabble.com/-T5--Ajax-And-Zones---Missing-FormSupprt-td20373776.html
http://www.nabble.com/-T5--Ajax-And-Zones---Missing-FormSupprt-td20373776.html 

If form elements are not allowed in zones, what is the solution?

PS: missing hidden form element in core tapestry library is bad idea. But
that was discussed in other threads.


-- 
View this message in context: 
http://www.nabble.com/Form-elements-in-Zones-tp20464921p20464921.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: Form elements in Zones

2008-11-12 Thread shymon



Thiago H. de Paula Figueiredo wrote:
 
 
 If form elements are not allowed in zones, what is the solution?
 
 This is not strictly true. Form elements are allowed in zones as long as  
 they're inside a form that is completely enclosed in a Zone.
 
 

Of course, I was not precise.
The problem is that I can't place form in zone. Only one form element should
be ajax reloaded - not whole form.

Any help? ...


-- 
View this message in context: 
http://www.nabble.com/Form-elements-in-Zones-tp20464921p20466370.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: Form elements in Zones

2008-11-12 Thread shymon



Thiago H. de Paula Figueiredo wrote:
 
 
 Of course, I was not precise.
 The problem is that I can't place form in zone. Only one form element  
 should be ajax reloaded - not whole form.
 
 If there's not a JIRA filed for it, we should file one, because this  
 limitation can be quite annoying sometimes.
 
 

I have created issue:
https://issues.apache.org/jira/browse/TAP5-351

-- 
View this message in context: 
http://www.nabble.com/Form-elements-in-Zones-tp20464921p20467502.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: Multiple handlers for one event - calling order

2008-10-30 Thread shymon



Thiago H. de Paula Figueiredo wrote:
 
 
 When your page class ends up having more than one onActivate method, most  
 of the time it is a better idea to have a single onActivate(EventContext  
 e). Take a look at  
 http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/EventContext.html.
 
 

I was just playing with activation context. Finally I replaced all
onActivate methods with one
taking object array as argument: onActivate(Object[] aParams). But now I
will give EventContext a try.

Thanks once again :),
Shymon

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Multiple-handlers-for-one-event---calling-order-tp20239292p20251045.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: Multiple handlers for one event - calling order

2008-10-30 Thread shymon



Thiago H. de Paula Figueiredo wrote:
 
 
 You're welcome again!
 
 Is it just me or this message list has been having an increase in new  
 members? This is very good news, IMHO. :)
 
 

I'm totally new member so

this._messageListUsers++;   ;)

After about two years of dealing with servlets and JSP I was looking around
for
some nice framework. I must admit that I was captivated by T5. Captivated
mostly by it's 
ideological simplicity. I think T5 singles out from the rest of java
frameworks :)

Hope I will not change my opinion after next 1000 lines of code :)


-- 
View this message in context: 
http://www.nabble.com/T5%3A-Multiple-handlers-for-one-event---calling-order-tp20239292p20253040.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: Multiple handlers for one event - calling order

2008-10-29 Thread shymon

In comments to
http://tapestryjava.blogspot.com/2007/08/handling-direct-urls-in-tapestry-5.html
Lewis has written that:



 When a single method is overloaded with different parameters, the order of
 invocation is fewest parameters to most parameters.
 So onActivate() will be invoked before onActivate(String, String).
 

But I have noticed calling order is exactly opposite: onActivate(String,
String) is called before onActivate(). Excerpt from log follows:


...
[INFO] AppModule.TimingFilter Request time: 2609 ms
[DEBUG] pages.Index Dispatch event: ComponentEvent[activate from (self)]
[DEBUG] pages.Index Invoking:
myapp.webclient.pages.Index.onActivate(java.lang.String, java.lang.String)
(at Index.java:261)
[DEBUG] pages.Index Invoking: myapp.webclient.pages.Index.onActivate() (at
Index.java:252)
[DEBUG] pages.Index Dispatch event: ComponentEvent[passivate from (self)]
[DEBUG] pages.Index Dispatch event: ComponentEvent[passivate from (self)]
...


Where is the truth? (except, it's out there ;))

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Multiple-handlers-for-one-event---calling-order-tp20239292p20239292.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


Re: T5: Multiple handlers for one event - calling order

2008-10-29 Thread shymon

hmmm, what to say... thanks :)

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Multiple-handlers-for-one-event---calling-order-tp20239292p20239594.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.0.15, NetBeans 6.1 and Hibernate ClassNotFound exception

2008-10-27 Thread shymon


akochnev wrote:
 
 Shymon,
I'm not sure what the solution to your problem is going to be. The
 reason
 why things worked in the original setup is that when you specify
 archiveClasses to false, when the app is deployed in Glassfish, it's
 deployed as an exploded war; thus, when you update the class files, T5 is
 able to automatically reload them.
 
Now, when you add your library in a module, it doesn't make much sense
 to
 have it not be in a jar (hence, there is no archiveClasses option for
 that). T5 doesn't does not do live reloading of the contents of the jar
 file, and because java caches the index of the jar file, when you
 redeploy,
 you get the exception.
 

Thanks for explanation.


akochnev wrote:
 
Do you really have to restart tomcat or can you get away w/ just
 redeploying the app to Tomcat ?
 

I use netbeans and for maven projects I don't have Deploy/Redeploy option. I
only have Run option
which, as I suppose, does deployment. So repeating Run option doesn't change
anything - every attempt throws exception. Even Clean and Build option
doesn't help, only Tomcat restart does.


akochnev wrote:
 
Maybe one of the more experienced folks on the list can chime in on how
 best to handle the development workflow with a module that's still under
 development.
 

Would be nice. For now I moved all components to main app ...components
package :(
But it is not what I want. So I consider to abandon maven. I will have some
extra config work 
in the begining, but at least there are no issues with jar dependencies.

But if somebody could help... :)

Shymon
-- 
View this message in context: 
http://www.nabble.com/Tapestry-5.0.15%2C-NetBeans-6.1-and-Hibernate-ClassNotFound-exception-tp19757952p20197738.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.0.15, NetBeans 6.1 and Hibernate ClassNotFound exception

2008-10-26 Thread shymon



akochnev wrote:
 
 Shymon,
I think your issue with the missing jar entry might have to do with how
 Maven deploys the war
 In the meantime, try switching the archiveClasses  option to false (by
 default it's true).
 
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-war-plugin/artifactId
 configuration
 archiveClasses*false*/archiveClasses
 /configuration
 /plugin
 

Ok, setting archiveClasses to false helped, but now I have very similiar
problem.
I created tapestry components library (jar file as maven project). Main app
depends 
on this library which is still under developement. When I change something
in library,
rebuild it, and try to run main app I get exception:

java.lang.RuntimeException: Exception loading module(s) from manifest
jar:file:/P:/myapp/src/myapp/target/myapp/WEB-INF/lib/t5-nrs-components-1.0-SNAPSHOT.jar!/META-INF/MANIFEST.MF:
JAR entry META-INF/MANIFEST.MF not found in
P:\myapp\src\myapp\target\myapp\WEB-INF\lib\t5-nrs-components-1.0-SNAPSHOT.jar

then I have to restart tomcat to run app.

maven-jar-plugin doesn't have archiveClasses option right? 
How can I resolve this problem?

shymon
-- 
View this message in context: 
http://www.nabble.com/Tapestry-5.0.15%2C-NetBeans-6.1-and-Hibernate-ClassNotFound-exception-tp19757952p20178222.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: String encoding in activation context

2008-10-21 Thread shymon



shymon wrote:
 
 
 ...
 [INFO] AppModule.TimingFilter Request time: 1 ms
 [INFO] AppModule.TimingFilter Request time: 3 ms
 [INFO] AppModule.TimingFilter Request time: 0 ms
 
 When onPassivate method is called for the first time all characters are
 ok, but in the subsequent onActivate it's not.
 
 I don't know Tapestry very well yet, so my another question is why
 onPassivate is called so many times?
 
 BTW: if _userQuery is passed via persistent member (@Persist) everything
 is ok. But it will not work for me.
 
 This problem occured when I deployed app on linux server. On Windows
 everything works fine.
 Application source and output encoding is set to UTF-8.
 
 

Ok, of course I should have url-encoded string returned from onPassivate.
Or rather according to 
https://issues.apache.org/jira/browse/TAPESTRY-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12640867#action_12640867
I should have used any different encoding - not url...

Shouldn't it be a Tapestry's responsibility?
For me it's inconsistency in Tapestry's logic.


-- 
View this message in context: 
http://www.nabble.com/String-encoding-in-activation-context-tp20075742p20088179.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]



String encoding in activation context

2008-10-20 Thread shymon
. But it will not work for me.

This problem occured when I deployed app on linux server. On Windows
everything works fine.
Application source and output encoding is set to UTF-8.

thanks in advance for any help.
Shymon

-- 
View this message in context: 
http://www.nabble.com/String-encoding-in-activation-context-tp20075742p20075742.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: Grid component and available rows number

2008-10-14 Thread shymon



Renat Zubairov wrote:
 
 Hello
 
 You may have a look on the implementation of the GridDataSource for
 Hibernate
 
 http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-hibernate/src/main/java/org/apache/tapestry5/hibernate/HibernateGridDataSource.java?view=markup
 
 BR
 Renat
 
 

Not very helpful. I don't know Hibernate but as I understand there are two
methods used in this impl. of GridDataSource: 

Integer result = (Integer) criteria.uniqueResult(); - which returns
number of rows

and 

 preparedResults = crit.list(); - which do the actual query.

As I mentioned in my first post, search engine which I use doesn't have
suchmethods. The only one I have is Query({query_params}) which returns
given portion of results and the total number of results.

I can perform Query in getAvailableRows(), but then I would have to send ALL
results through XML-RPC and limit them in prepare method - I don't think
it's a good idea...

regards,
Shymon
-- 
View this message in context: 
http://www.nabble.com/Grid-component-and-available-rows-number-tp19964529p19968644.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: Grid component and available rows number

2008-10-14 Thread shymon



Andy Huhn-3 wrote:
 
 Hi Shymon,
 
 If you don't want the pager to show up at all on the grid component, you
 can set
 
   pagerPosition=none
 
 on the grid.  This might prevent the row count from being generated at
 all.
 
 Andy
 
 


Uhmmm... you are kidding, right? :)
Dou you think I should display all results on one page? :)
Of course I need a pager.

Maybe I could use Grid component w/o pager and create my own one, but id
doesn't make much sense for me. Pager is 50% of why I want to use grid. :)

Shymon

-- 
View this message in context: 
http://www.nabble.com/Grid-component-and-available-rows-number-tp19964529p19969457.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]



Grid component and available rows number

2008-10-13 Thread shymon


I wanted to use a grid component to display search results. So I tried to
define a class which implements GridDataSource interface. Unfortunatelly
getAvailableRecords() method is called by T5 before prepare(...) method.
This doesn't suit me as I receive total record number with search results
only.

My search engine is accessed through XML-RPC and has a Query(...) method
which performs the search. This method returns a dictionary (or hashtable)
containing search results and some other info including total number of
records matching given query.

Of course I can trigger Query(...) method from getAvailableRecords() or even
before, but I don't have information about indexFrom, indexTo and
sortConstraints and don't want to send all records (without limit) through
XML-RPC.

Is there any reasonable solution or do I have to write my own grid
component?
-- 
View this message in context: 
http://www.nabble.com/Grid-component-and-available-rows-number-tp19964529p19964529.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]



BeanEditForm and Date problem

2008-10-10 Thread shymon


I have a bean with property of type java.util.Date. There is also a
constructor getting Date value as parameter. When I try to use BeanEditForm
with this bean RenderQueueException is thrown saying: 

...(for service 'BeanModelSource'): No service implements the interface
java.util.Date


Another problem is with DateField component. First date selection works
fine, edit box is filled with selected date but then when I click on
calendar icon empty calendar window is opened. (ie. NaN in place of year,
undefined in place of month and so on).

Thanks in advance for your help.

(Tapestry 5.0.15)



-- 
View this message in context: 
http://www.nabble.com/BeanEditForm-and-Date-problem-tp19922063p19922063.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]



Tapestry 5.0.15, NetBeans 6.1 and Hibernate ClassNotFound exception

2008-10-01 Thread shymon


I'm trying to create my first simple application using Tapestry 5.015. My
IDE is NetBeans 6.1, and app is deployed to Glassfish v2ur2. 

I have created web application, added Tapestry to project libraries,
configured web.xml, created Start.tml and Start class. But when I deploy app
to appserver I got the following message:

deployed with moduleid = SimpleT5
WebModule[/SimpleT5]PWC1270: Exception starting filter app
java.lang.NoClassDefFoundError: org/hibernate/Session
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.getMethods(Class.java:1410)
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.grind(DefaultModuleDefImpl.java:137)
at
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.init(DefaultModuleDefImpl.java:106)
at
org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:122)
at
org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:149)
at
org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.java:137)
at
org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:107)
at
org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.java:77)
at
org.apache.tapestry5.internal.TapestryAppInitializer.init(TapestryAppInitializer.java:75)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:76)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:257)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:369)
at
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:103)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4389)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5189)
at com.sun.enterprise.web.WebModule.start(WebModule.java:326)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688)
at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1584)
at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1222)
at
com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182)
at
com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:974)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464)
at
com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)
at
com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
at
com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226)
at
com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
at
com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:591)
at
com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:635)
at
com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:744)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at
com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at

Re: Tapestry 5.0.15, NetBeans 6.1 and Hibernate ClassNotFound exception

2008-10-01 Thread shymon



kristian.marinkovic wrote:
 
 you have to remove the dependency to tapestry-hibernate
 
 g,
 kris
 

Didn't help.
Now, I added only one dependency to tapestry-core-5.0.15.jar.
And the problem remains the same:

java.lang.NoClassDefFoundError: org/hibernate/Session
...
Caused by: java.lang.ClassNotFoundException: org.hibernate.Session
...

any other ideas?
-- 
View this message in context: 
http://www.nabble.com/Tapestry-5.0.15%2C-NetBeans-6.1-and-Hibernate-ClassNotFound-exception-tp19757952p19758666.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.0.15, NetBeans 6.1 and Hibernate ClassNotFound exception

2008-10-01 Thread shymon



kristian.marinkovic wrote:
 
 do you have the library in your classpath?
 

Now it works.
I removed only tapestry-hibernate... jars.
tapestry-spring-5.0.15.jar also had to be removed.
Thanx!

-- 
View this message in context: 
http://www.nabble.com/Tapestry-5.0.15%2C-NetBeans-6.1-and-Hibernate-ClassNotFound-exception-tp19757952p19759413.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]