Submit component and Zone Component

2008-04-13 Thread jgn

Hi. I have a page where I use the Zone component. Something like this:



 

...
...

...
...

...
...




As you can see, I have 2 Submit buttons. So I have these functions on my
page:

void onSelectedFromGrabar() {
...
}

void onSelectedFromCopiardir(){
...
}

The problem is that pressing any of the 2 submit buttons The function that
is called is onSelectedFromCopiardir(). If I do not use the Zone component
every thing works fine.

Any Idea ?

Thanks
-- 
View this message in context: 
http://www.nabble.com/Submit-component-and-Zone-Component-tp16670494p16670494.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: session-less forms

2008-04-13 Thread nicholas Krul
the @Meta("tapestry.persistence-strategy=X") works beautifully... no more
sessions till logged in.


On Mon, Apr 7, 2008 at 7:14 PM, Robert Zeigler <[EMAIL PROTECTED]> wrote:

>
> On Apr 7, 2008, at 4/712:53 PM , Fernando Padilla wrote:
>
> > so.. the "client" strategy stores it in a cookie?
> >
> >
> Client strategy stores it in the url.
> Not sure how that would play out for myspace, etc.
>
> Robert
>
>
>
>  Yeah, I don't really have access to those either :)
> >
> > ps - This is for integration with GoogleGadgets/OpenSocial/MySpace/Hi5.
> >  So it's basically a portlet hosted on a different site.  And the requests
> > to my server are being proxied by MySpace/Hi5 so we don't have access to
> > cookies from the client side..
> >
> > pps - I am using Zones and Form/Zones, so I'm rendering on the same
> > request as the submit, and at first glance that seems to be working.  I just
> > wanted to make sure "persist"/"session" requirement wasn't going to bite me
> > later..
> >
> > ppps - So if we're doing the render on the same request as submit, we
> > don't really have to store the Validation object in the session right?
> >
> > Howard Lewis Ship wrote:
> >
> > > The approach I would take would be to configure the Form to store its
> > > persistent fields on the client, rather than in the Session.
> > > On your PAGE, you can add a @Meta annotation for this:
> > > @Meta("tapestry.persistence-strategy=client")
> > > public class MyPage { ...
> > > This sets the default persistence strategy for the entire page to be
> > > "client".  Since in most cases, @Persist is used without a specific
> > > strategy, even nested components (such as Form) will inherit a default
> > > persistent strategy from their container.
> > > I haven't tried this yet myself ... give it a try and report back!
> > > On Mon, Apr 7, 2008 at 5:05 AM, Peter Stavrinides
> > > <[EMAIL PROTECTED]> wrote:
> > >
> > > > If I understand correctly you need to pass data completely
> > > > independent of
> > > > session state... then your options are hidden form fields, and or
> > > > URL
> > > > parameters. Of course then you would have to reinitialize your
> > > > properties
> > > > manually after posting, which is not such big a deal!
> > > >
> > > >
> > > >
> > > > Fernando Padilla wrote:
> > > >
> > > >  I have a requirement to not depend on HttpSession, but the Form
> > > > > component
> > > > >
> > > > has a @Persist field that Tapestry wants to store in a session.
> > > >  What are
> > > > some options to avoid this?
> > > >
> > > > >
> > > > >
> > > > > -
> > > > > 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]
> > > >
> > > >
> > > >
> > -
> > 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: Problem with page life cycle

2008-04-13 Thread Joost Schouten (ml)
Assuming this is about T5 as I know nothing of earlier versions, I would 
personally have the done as follows:


@Persist
private YourQuestionObj actualQuestion;

@SetupRender
private void setup() {
   actualQuestion = genereateSimpleMathQuestion();
}

SetupRender is only called to prepare for render and thus is not called 
on a form submit, only again once the formAction would decide to forward 
to the same page again.


Cheers,
Joost

Tomasz Dziurko wrote:

It didn't solved my problem, but I found another way of doing it.

Simplfied code:

onActivate() {
oldSimpleMathQuestion = new
SimpleMathQuestion(actualQuestion.question, actualQuestion.answer));
actualQuestion = genereateSimpleMathQuestion();
}

onSuccess {
if(oldSimpleMathQuestion.answer==getUserInput()) {
// do normal action
}
else
  // perform error message, etc.
}

  



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



Re: Problem with page life cycle

2008-04-13 Thread Tomasz Dziurko
It didn't solved my problem, but I found another way of doing it.

Simplfied code:

onActivate() {
oldSimpleMathQuestion = new
SimpleMathQuestion(actualQuestion.question, actualQuestion.answer));
actualQuestion = genereateSimpleMathQuestion();
}

onSuccess {
if(oldSimpleMathQuestion.answer==getUserInput()) {
// do normal action
}
else
  // perform error message, etc.
}

-- 
Tomasz Dziurko

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



RE: Problem with page life cycle

2008-04-13 Thread Jonathan Barker

Try using the @Persist("flash") to store your real answer.  The flash
persistence strategy covers the situation where you only want the value to
be stored until the next request.

Jonathan



> -Original Message-
> From: Tomasz Dziurko [mailto:[EMAIL PROTECTED]
> Sent: Sunday, April 13, 2008 12:52 PM
> To: Tapestry users
> Subject: Problem with page life cycle
> 
> I encountered some problem connected with page life cycle.
> 
> There is a page examplePage.java, which should on every refresh
> generate new simple math question to check against spam bots.
> Generating is done in onActivate() method. But problem is that when
> user submits form, method onActivate is called again (question is
> re-generated) and checking is done between different
> simpleMathQuestion than user calculated result.
> 
> Questions:
> 1. Is there any method called after user clicks 'Submit' and before
> onActivate(), where I could put my validation logic?
> 2. Maybe I should choose different solution? Maybe put
> simpleMathQuestionGenerate() in other place?
> 
> Thank you in advance for your help
> 
> --
> Tomasz Dziurko
> 
> -
> 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]



Problem with page life cycle

2008-04-13 Thread Tomasz Dziurko
I encountered some problem connected with page life cycle.

There is a page examplePage.java, which should on every refresh
generate new simple math question to check against spam bots.
Generating is done in onActivate() method. But problem is that when
user submits form, method onActivate is called again (question is
re-generated) and checking is done between different
simpleMathQuestion than user calculated result.

Questions:
1. Is there any method called after user clicks 'Submit' and before
onActivate(), where I could put my validation logic?
2. Maybe I should choose different solution? Maybe put
simpleMathQuestionGenerate() in other place?

Thank you in advance for your help

-- 
Tomasz Dziurko

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



Re: [T 5.0.11] Problem with localizing error message in bean edit form

2008-04-13 Thread Tomasz Dziurko
It's rather brute-force solution, but it works :)

-- 
Tomasz Dziurko

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



Re: Index page context and 404 response

2008-04-13 Thread Imants Firsts
Thanks! This seems like a very good workaround.
I am not sure that the default behavior should be like
it is now, though.

Quoting "Filip S. Adamsen" <[EMAIL PROTECTED]>:
> Hi,
> 
> I had this problem too so I decided to do something
about it. What I 
> have done is to create a new class, HttpStatusCode,
that wraps an HTTP 
> status code and a message, and then contributing a 
> ComponentEventResultProcessor that sends an error
with the given status 
> code and message.
> 
> public class HttpStatusCode
>  implements Serializable {
> 
>private final int statusCode;
>private final String message;
> 
>public HttpStatusCode(int statusCode) {
>  this.statusCode = statusCode;
>  this.message = "";
>}
> 
>public HttpStatusCode(int statusCode, String
message) {
>  this.statusCode = statusCode;
>  this.message = message;
>}
> 
>public int getStatusCode() {
>  return statusCode;
>}
> 
>public String getMessage() {
>  return message;
>}
> }
> 
>public static void
contributeComponentEventResultProcessor(
>MappedConfiguration 
> configuration, final Response response) {
>  configuration.add(HttpStatusCode.class, new 
> ComponentEventResultProcessor() {
>public void processResultValue(HttpStatusCode
value) throws 
> IOException {
>  response.sendError(value.getStatusCode(),
value.getMessage());
>}
>  });
>}
> 
> In my Index page I then use it like this:
> 
>Object onActivate(Object obj) {
>  return new
HttpStatusCode(HttpServletResponse.SC_NOT_FOUND);
>}
> 
> This triggers if there's any context for the page.
You could use this to
> 
> return other status codes in other places as well.
> 
> -Filip
> 
> On 2008-04-12 13:20, Imants Firsts wrote:
> > Hello!
> > 
> > I changed my application to use the Index.tml instead
> > of Start.tml, because pagelink component for index page
> > renders www.mydomain.com/, which looks much better than
> > www.mydomain.com/start 
> > 
> > However now there is a problem that all the invalid
> > tapestry URLs are rendered as my index page with
> > everything that comes after mydomain.com/ treated as
> > context to the index page.
> > 
> > I would like to render the standard 404 http response
> > for invalid URLs or pass them through to servlet
> > container to return 404. Is this possible with
index pages?
> > 
> > Thanks in advance,
> > Imants
> > 
> > 
> >
-
> > 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]


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



T5: obtaining a list of valid pages

2008-04-13 Thread Angelo Chen

Hi,

Is there a way to obtain a list of pages in the app? Thanks.

Angelo
-- 
View this message in context: 
http://www.nabble.com/T5%3A-obtaining-a-list-of-valid-pages-tp16659716p16659716.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.11] Problem with localizing error message in bean edit form

2008-04-13 Thread Filip S. Adamsen

Hi Tomasz,

You can localize the banner by putting an Errors.properties file in 
org.apache.tapestry.corelib.components containing the key 
default-banner. Saves you the hassle of doing it everytime and I believe 
this will work with BeanEditForm as well.


-Filip

On 2008-04-13 14:48, Tomasz Dziurko wrote:

I am trying to localize message saying, that there are errors in the
form. In normal form everything works as expected. I have:

//file app.properties
error-occured=Popraw następujące błędy

// in page file


...


and it works. But when I try to do the same in beanEditForm:

// in page file




I still get default "You must correct the following errors before you
may continue."

Anyone have idea how to fix this?



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



[T 5.0.11] Problem with localizing error message in bean edit form

2008-04-13 Thread Tomasz Dziurko
I am trying to localize message saying, that there are errors in the
form. In normal form everything works as expected. I have:

//file app.properties
error-occured=Popraw następujące błędy

// in page file


...


and it works. But when I try to do the same in beanEditForm:

// in page file




I still get default "You must correct the following errors before you
may continue."

Anyone have idea how to fix this?

-- 
Tomasz Dziurko


Exception while executing Integration Test Case

2008-04-13 Thread Stellit

When I execute the test class, I got the following exception

java.lang.RuntimeException: Failure starting Jetty instance:
org.mortbay.util.MultiException[java.lang.SecurityException: sealing
violation: package org.mortbay.jetty.servlet is sealed]
...
I have two Jetty in my eclipse Maven Dependencies, 5.1.10 and 6.0.1 . 
It seems that the Tapestry test needs
org.mortbay.jetty.servlet.DefaultServlet and this package is contained in
Jetty 6.
But when the test started, test case start jetty 5 service. So it throw this
exception.

My Maven repository looks like this,


org.apache.tapestry
tapestry-core
${tapestry-release-version}


org.apache.tapestry
tapestry-test
${tapestry-release-version}


org.testng
testng
5.1
jdk15
test


tomcat
jasper
3.3.2


javax.servlet
servlet-api
2.5


tomcat
core_util
3.3.2


javax.servlet.jsp
jsp-api
2.1


tomcat
tomcat-util
5.5.23


jetty
jetty
6.0.0beta6

--
Is there something wrong with my dependencies? How can remove jetty 5 from
my maven dependencies?


regard,
Thank you
-- 
View this message in context: 
http://www.nabble.com/Exception-while-executing-Integration-Test-Case-tp16656758p16656758.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: Index page context and 404 response

2008-04-13 Thread Filip S. Adamsen

Hi,

I had this problem too so I decided to do something about it. What I 
have done is to create a new class, HttpStatusCode, that wraps an HTTP 
status code and a message, and then contributing a 
ComponentEventResultProcessor that sends an error with the given status 
code and message.


public class HttpStatusCode
implements Serializable {

  private final int statusCode;
  private final String message;

  public HttpStatusCode(int statusCode) {
this.statusCode = statusCode;
this.message = "";
  }

  public HttpStatusCode(int statusCode, String message) {
this.statusCode = statusCode;
this.message = message;
  }

  public int getStatusCode() {
return statusCode;
  }

  public String getMessage() {
return message;
  }
}

  public static void contributeComponentEventResultProcessor(
  MappedConfiguration 
configuration, final Response response) {
configuration.add(HttpStatusCode.class, new 
ComponentEventResultProcessor() {
  public void processResultValue(HttpStatusCode value) throws 
IOException {

response.sendError(value.getStatusCode(), value.getMessage());
  }
});
  }

In my Index page I then use it like this:

  Object onActivate(Object obj) {
return new HttpStatusCode(HttpServletResponse.SC_NOT_FOUND);
  }

This triggers if there's any context for the page. You could use this to 
return other status codes in other places as well.


-Filip

On 2008-04-12 13:20, Imants Firsts wrote:

Hello!

I changed my application to use the Index.tml instead
of Start.tml, because pagelink component for index page
renders www.mydomain.com/, which looks much better than
www.mydomain.com/start 


However now there is a problem that all the invalid
tapestry URLs are rendered as my index page with
everything that comes after mydomain.com/ treated as
context to the index page.

I would like to render the standard 404 http response
for invalid URLs or pass them through to servlet
container to return 404. Is this possible with index pages?

Thanks in advance,
Imants


-
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: t5: logging pages

2008-04-13 Thread Filip S. Adamsen

Hi Angelo,

I don't Dispatcher is the most convenient place to put this, a 
RequestFilter seems like a better option since you have easy access to 
the name of the page, parameters, and whatnot.


It'd basically be the same as creating an authentication filter but you 
would do logging instead.


-Filip

On 2008-04-13 01:34, Angelo Chen wrote:

Hi,

I would like to keep a log of visits made by viewers, what page he goes,
from what IP he comes, etc. what is a good place to do this, a dispatcher?
or any good suggestions in adding a logging facility in T5? Thanks,

Angelo


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



Re: T5: Return javascript in zone markup

2008-04-13 Thread Filip S. Adamsen

Hi,

On 2008-04-12 22:18, Andrew Court wrote:

Hi all,

I don't know if this functionality has been built into the zone component
yet (using 5.0.11 release), but what I'm trying to do is return additional
javascript along with html markup in an ajax response. Is this possible, and
if so how would one go about doing it?


I don't think support for this is built in at this point.


And while I'm here, I've noticed what seems to be an issue with the @Secure
forced redirect from http to https. Any querystring parameters appended to
the url are dropped. It seems to me that it would be useful if these could
be passed along too.


I would create an issue in JIRA for this if I were you.


Thanks for any help,
Andrew


-Filip

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



Re: RequestGlobals in a PersistentFieldStrategy

2008-04-13 Thread Filip S. Adamsen

Hi Nicholas,

@Inject doesn't work in services, you'll have to inject RequestGlobals 
through your service's constructor instead:


  public CookiePersistentFieldStrategy(RequestGlobals requestGlobals, 
...) {

this.requestGlobals = requestGlobals;
...
  }

That should work.

-Filip

On 2008-04-12 23:04, nicholas Krul wrote:

Hi guys.

I have implemented a new PersistentFieldStrategy (cookie based), and am
having just one problem...

@Inject
private RequestGlobals requestGlobals

isn't processed... and I know of no other way to get it into the strategy to
make it work (it is from the base package).

I don't care how, just need access to RequestGlobals... for access to
servlet cookie control (T5 cookies doesn;t have a 'list' ability).

Thanks

--nK



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



Re: [T5] [FAQ] Form and old errors/data

2008-04-13 Thread Filip S. Adamsen
Sounds reasonable to me, is there a JIRA issue somewhere that I can vote 
on? :D


-Filip

On 2008-04-13 06:15, Geoff Callender wrote:
It's great that we have these workarounds to prevent leaving 
ValidationTrackerImpl objects littered throughout the session, but I'm 
having trouble understanding how it came to this.  After all, I can't 
think of a single case where I'd want a form's validation errors to be 
retained after the form has been displayed.  So why not make "flash" 
persistence the default for Form's ValidationTracker so we can all 
forget about it?


Geoff

On 28/02/2008, at 11:43 PM, Robert Zeigler wrote:

You can also provide the tracker parameter to form, which looks almost 
the same as extending form, except that you don't have to extend form. :)


@Component(parameters={"tracker=customTracker"})
private Form form;

@Persist("flash")
private ValidationTracker customTracker;

public ValidationTracker getCustomTracker() {
if (customTracker == null) {
customTracker = new ValidationTrackerImpl();
   }
   return customTracker;
}

Robert

On Feb 28, 2008, at 2/283:39 AM , Christian Köberl wrote:



Q: Why does the form show old data and old errors not the newly set 
object?

(see:
http://www.nabble.com/-T5--Why-is-default-ValidationTracker-in-Form-marked-Persist-not-Persist%28%22flash%22%29-td11981083.html) 



A1: Write your own form extending the tapestry default form:
public class Form extends org.apache.tapestry.corelib.components.Form
{
@Persist("flash")
private ValidationTracker defaultTracker;

@Override
 public ValidationTracker getDefaultTracker()
{
if (defaultTracker == null)
defaultTracker = new ValidationTrackerImpl();

return defaultTracker;
}

@Override
 public void setDefaultTracker(ValidationTracker defaultTracker)
{
this.defaultTracker = defaultTracker;
}

}

A2: use @Meta("tapestry.persistence-strategy=flash") on your page to 
control
the default persistence of components below it. This will result in 
*all*

components having a default flash persistence.

@Howard: any better idea?

--
Chris
--
View this message in context: 
http://www.nabble.com/Writing-an-FAQ-for-Tapestry-5-tp15719185p15732836.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]




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



implicit and explicit knowledge in tapestry 5 t5

2008-04-13 Thread adasal
I have just written a report that strongly recommends adoption of tapestry
as an agile process in a large application.
It would substitute a forms builder and I recommend it against the next
version of this forms builder and Orbeon, an open source forms builder.
My reasoning is that the benefits of the agile process when in place are
greater than those that might come from using a forms builder.
In particular I am concerned about page flow in a rules like way that a
forms builder is supposed to implement but can prove problematic.
In t4 all of this including validation could be controlled in HiveMind
declaratively.
What is the situation with t5?
With hivemind, although complex relationships might be difficult to follow,
everything was found in these declarative files and changes could be made to
rules and interrelated validations by editing them.
I understand that t5 has a pipeline concept. What would the process of
creating, finding exiting and modifying rules in a pipe line be like
compared to using hivemind?
Can hivemind be used with t5 and would there be any point.
Any thoughts?
Adam
Adam Saltiel


Re: Component reloading is not working

2008-04-13 Thread Jakob Keres

Am Sonntag, den 13.04.2008, 02:28 -0400 schrieb Andy Huhn:
> Hi Jakob,
> 
> Well, I tried what you mentioned, and it now picks up changes to my .tml
> right away--definitely an improvement over before.  I think I am seeing
> the same problem you are seeing, though, because it is not picking up
> changes to my page classes.

Hmm...I don't have a problem with this, I mean the new compiled classes
are copied to the target directory as expected.


> If I modify a page class and save in Eclipse (3.2.2), I get this error:
> "Java HotSpot(TM) 64-Bit Server VM[localhost:8080] (may be out of synch)
> was unable to replace the running code with the code in the workspace.

I had this problem too the first time, this was due to the reason that
the target directory had old files from jetty and eclipse didn't want or
could delete them and refused to create new files and folders. After a
manual cleanup this behavior disappeared.
But I have doubt that this is the same problem you're faced with.

Jakob


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



Re: my Java EE tragic story.

2008-04-13 Thread Mohammad Shamsi
thanks Yura,

this is not jost about jndi prefix. take a look at this list :

JBOSS ::  {jar file name}/{bean name}/{local or remote}
GLASSFISH :: ejb/{bean name}
WEBLOGIC ::  {jar file name}_{bean name}_{remote or local interface name}
..
I solved this problem with one xml file for each app server. i most define
all EJB in these xml files.

any way, i don't looking for solution here. I just want to say that Java EE
portability is just in theory.

On Sat, Apr 12, 2008 at 11:20 PM, Yura Tkachenko <
[EMAIL PROTECTED]> wrote:

> Hi Mohammad,
>
> I have one suggestion to fix JNDI naming conventions on different servers.
> In general if in your code you have:
>
>   InitialContext iniCtx = new InitialContext(props);
>Context envCtx = (Context) iniCtx.lookup("java:comp/env");
>
> I suggest you to expose constant "java:/comp/env" to some configuration
> file
> (let's call it jndi_jboss.properties). So tomorrow if for some reason you
> need to run your application on new app server and this jndi name will
> look
> like: "comp/env" you just need to create another config file with specific
> settings for this particular application server
> (jndi_xxx_app_server.properties).
> Hopes this solution can address your problem with jndi.
>
> Thanks,
> Yura.
>
> On Sat, Apr 12, 2008 at 11:36 PM, Mohammad Shamsi <[EMAIL PROTECTED]>
> wrote:
>
> > No, it doesn't about Tapestry.
> >
> > its about my problems during migration from lightweight containers to
> the
> > Java EE standard world.
> >
> >
> >
> > On Sat, Apr 12, 2008 at 11:27 AM, adasal <[EMAIL PROTECTED]> wrote:
> >
> > > Your blog doesn't seem to be about Tapestry.
> > > I believe there are standards, but the standards have boarders which
> may
> > > be
> > > redefined as the standard evolves. What is inside the boarder will be
> > > interoperable, What is outside is left to the implementer.
> > > It is very possible to misunderstand the standard and find that two
> > > seeming
> > > incompatible implementations are both correct and are compatible.
> These
> > > things are complex.
> > > I don't understand your point 4. But I doubt that TopLink is short on
> > > features and capability. Maybe if you explain more fully, but this
> > doesn't
> > > belong to the Tapestry list.
> > > What may belong here is how much Tapestry falls within the boarders of
> > > J2EE
> > > conformance, or does it touch on it at all? I would have thought it
> > > doesn't
> > > and any implementation made with Tapestry will be conforment where
> > > standards
> > > dictate.
> > > Adam
> > >
> > > On 12/04/2008, Mohammad Shamsi <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi Friends,
> > > >
> > > > please take a look at my blog about Java EE and my problems with it.
> > > >
> > > > http://mhshams.blogspot.com/
> > > >
> > > >
> > > > --
> > > > sincerely yours
> > > > M. H. Shamsi
> > > >
> > >
> >
> >
> >
> > --
> > sincerely yours
> > M. H. Shamsi
> >
>



-- 
sincerely yours
M. H. Shamsi


Re: my Java EE tragic story.

2008-04-13 Thread Yura Tkachenko
Hi Mohammad,

I have one suggestion to fix JNDI naming conventions on different servers.
In general if in your code you have:

   InitialContext iniCtx = new InitialContext(props);
Context envCtx = (Context) iniCtx.lookup("java:comp/env");

I suggest you to expose constant "java:/comp/env" to some configuration file
(let's call it jndi_jboss.properties). So tomorrow if for some reason you
need to run your application on new app server and this jndi name will look
like: "comp/env" you just need to create another config file with specific
settings for this particular application server
(jndi_xxx_app_server.properties).
Hopes this solution can address your problem with jndi.

Thanks,
Yura.

On Sat, Apr 12, 2008 at 11:36 PM, Mohammad Shamsi <[EMAIL PROTECTED]>
wrote:

> No, it doesn't about Tapestry.
>
> its about my problems during migration from lightweight containers to the
> Java EE standard world.
>
>
>
> On Sat, Apr 12, 2008 at 11:27 AM, adasal <[EMAIL PROTECTED]> wrote:
>
> > Your blog doesn't seem to be about Tapestry.
> > I believe there are standards, but the standards have boarders which may
> > be
> > redefined as the standard evolves. What is inside the boarder will be
> > interoperable, What is outside is left to the implementer.
> > It is very possible to misunderstand the standard and find that two
> > seeming
> > incompatible implementations are both correct and are compatible. These
> > things are complex.
> > I don't understand your point 4. But I doubt that TopLink is short on
> > features and capability. Maybe if you explain more fully, but this
> doesn't
> > belong to the Tapestry list.
> > What may belong here is how much Tapestry falls within the boarders of
> > J2EE
> > conformance, or does it touch on it at all? I would have thought it
> > doesn't
> > and any implementation made with Tapestry will be conforment where
> > standards
> > dictate.
> > Adam
> >
> > On 12/04/2008, Mohammad Shamsi <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi Friends,
> > >
> > > please take a look at my blog about Java EE and my problems with it.
> > >
> > > http://mhshams.blogspot.com/
> > >
> > >
> > > --
> > > sincerely yours
> > > M. H. Shamsi
> > >
> >
>
>
>
> --
> sincerely yours
> M. H. Shamsi
>