how to return the response directly?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

how to return the response directly?

ryan-116

I want to be able to have the request handler pass the response from the
event handler directly back to the client.  In this case, the request
handler is just sending back simple strings.  I'd like to be able to
either just pass these directly back to the client, or pass them through a
StringViewHandler class if I have to have a view handler.

From going through RequestHandler it doesn't seem like <response
type="none"> does what I want.

In this particular case, I don't need freemarker templates or any other
munging of the response data, and so I'm reluctant to setup the normal
pile of views/templates.  Is there a way in controller.xml to tell the
ControlServlet to just pass on the values spit out by the request handler?

If not, is there a way to setup the <response/> element such that name=
can match whatever is returned (ie default response if no match on name is
found)?

Does that make sense?

regards,
-Ryan
Reply | Threaded
Open this post in threaded view
|

Re: how to return the response directly?

BJ Freeman
not sure why you can't pass it back thru the controller and specify the
view you want to use.
it would seem a lot less efforts and keep it simple.
When you say client, are you speaking of a http client of some other.


Ryan Sweet sent the following on 3/27/2008 10:25 AM:

>
> I want to be able to have the request handler pass the response from the
> event handler directly back to the client.  In this case, the request
> handler is just sending back simple strings.  I'd like to be able to
> either just pass these directly back to the client, or pass them through
> a StringViewHandler class if I have to have a view handler.
>
>> From going through RequestHandler it doesn't seem like <response
> type="none"> does what I want.
>
> In this particular case, I don't need freemarker templates or any other
> munging of the response data, and so I'm reluctant to setup the normal
> pile of views/templates.  Is there a way in controller.xml to tell the
> ControlServlet to just pass on the values spit out by the request handler?
>
> If not, is there a way to setup the <response/> element such that name=
> can match whatever is returned (ie default response if no match on name
> is found)?
>
> Does that make sense?
>
> regards,
> -Ryan
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: how to return the response directly?

ryan-116


On Thu, 27 Mar 2008, BJ Freeman wrote:

> not sure why you can't pass it back thru the controller and specify the
> view you want to use.
> it would seem a lot less efforts and keep it simple.
> When you say client, are you speaking of a http client of some other.

an http client (another app, not a browser).

I think I got it worked out:

I went ahead and changed my request handler to put the return values in
the session object, and return success/error and then built a ViewHandler
that gets the values from the session.

Seems like extra lifting but maybe it will make sense to me later.

thanks,
-Ryan

>
>
> Ryan Sweet sent the following on 3/27/2008 10:25 AM:
>>
>> I want to be able to have the request handler pass the response from the
>> event handler directly back to the client.  In this case, the request
>> handler is just sending back simple strings.  I'd like to be able to
>> either just pass these directly back to the client, or pass them through
>> a StringViewHandler class if I have to have a view handler.
>>
>>> From going through RequestHandler it doesn't seem like <response
>> type="none"> does what I want.
>>
>> In this particular case, I don't need freemarker templates or any other
>> munging of the response data, and so I'm reluctant to setup the normal
>> pile of views/templates.  Is there a way in controller.xml to tell the
>> ControlServlet to just pass on the values spit out by the request handler?
>>
>> If not, is there a way to setup the <response/> element such that name=
>> can match whatever is returned (ie default response if no match on name
>> is found)?
>>
>> Does that make sense?
>>
>> regards,
>> -Ryan
>>
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

org.ofbiz.minerva.pool.jdbc.xa

SkipDever
Anyone know where I can find the source for the
org.ofbiz.minerva.pool.jdbc.xa and decendant packages?

I find the class files in ofbiz-minerva.jar, but can't find the source
anywhere.

Skip
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
4:43 PM

Reply | Threaded
Open this post in threaded view
|

Re: org.ofbiz.minerva.pool.jdbc.xa

BJ Freeman
https://svn.hotwaxmedia.com/crucible/browse/ofbizext/minerva/src/org/ofbiz/minerva/pool/ObjectPool.java

skip@thedevers sent the following on 3/27/2008 1:59 PM:

> Anyone know where I can find the source for the
> org.ofbiz.minerva.pool.jdbc.xa and decendant packages?
>
> I find the class files in ofbiz-minerva.jar, but can't find the source
> anywhere.
>
> Skip
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
> 4:43 PM
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

RE: org.ofbiz.minerva.pool.jdbc.xa

SkipDever
Thanks BJ

However, I was looking for the source to download.  This is a fisheye view.
Is this the only way to look at the source?

Anyway, thanks for this.  This fisheye is so slick, I think I am gonna go
buy it.

Skip

-----Original Message-----
From: BJ Freeman [mailto:[hidden email]]
Sent: Thursday, March 27, 2008 8:34 PM
To: [hidden email]
Subject: Re: org.ofbiz.minerva.pool.jdbc.xa


https://svn.hotwaxmedia.com/crucible/browse/ofbizext/minerva/src/org/ofbiz/m
inerva/pool/ObjectPool.java

skip@thedevers sent the following on 3/27/2008 1:59 PM:

> Anyone know where I can find the source for the
> org.ofbiz.minerva.pool.jdbc.xa and decendant packages?
>
> I find the class files in ofbiz-minerva.jar, but can't find the source
> anywhere.
>
> Skip
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
> 4:43 PM
>
>
>
>


No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
4:43 PM

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
4:43 PM

Reply | Threaded
Open this post in threaded view
|

RE: org.ofbiz.minerva.pool.jdbc.xa

SkipDever
In reply to this post by BJ Freeman
BJ

Hmmm, I see how to download the file now, but am I supposed to?  Looks like
hotwaxmedia source to me.

Skip

-----Original Message-----
From: BJ Freeman [mailto:[hidden email]]
Sent: Thursday, March 27, 2008 8:34 PM
To: [hidden email]
Subject: Re: org.ofbiz.minerva.pool.jdbc.xa


https://svn.hotwaxmedia.com/crucible/browse/ofbizext/minerva/src/org/ofbiz/m
inerva/pool/ObjectPool.java

skip@thedevers sent the following on 3/27/2008 1:59 PM:

> Anyone know where I can find the source for the
> org.ofbiz.minerva.pool.jdbc.xa and decendant packages?
>
> I find the class files in ofbiz-minerva.jar, but can't find the source
> anywhere.
>
> Skip
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
> 4:43 PM
>
>
>
>


No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
4:43 PM

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
4:43 PM

Reply | Threaded
Open this post in threaded view
|

Re: org.ofbiz.minerva.pool.jdbc.xa

Jacques Le Roux
Administrator
Yes, you can : MIT licence

Jacques

From: "skip@thedevers" <[hidden email]>

> BJ
>
> Hmmm, I see how to download the file now, but am I supposed to?  Looks like
> hotwaxmedia source to me.
>
> Skip
>
> -----Original Message-----
> From: BJ Freeman [mailto:[hidden email]]
> Sent: Thursday, March 27, 2008 8:34 PM
> To: [hidden email]
> Subject: Re: org.ofbiz.minerva.pool.jdbc.xa
>
>
> https://svn.hotwaxmedia.com/crucible/browse/ofbizext/minerva/src/org/ofbiz/m
> inerva/pool/ObjectPool.java
>
> skip@thedevers sent the following on 3/27/2008 1:59 PM:
>> Anyone know where I can find the source for the
>> org.ofbiz.minerva.pool.jdbc.xa and decendant packages?
>>
>> I find the class files in ofbiz-minerva.jar, but can't find the source
>> anywhere.
>>
>> Skip
>> No virus found in this outgoing message.
>> Checked by AVG.
>> Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
>> 4:43 PM
>>
>>
>>
>>
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
> 4:43 PM
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
> 4:43 PM
>
Reply | Threaded
Open this post in threaded view
|

Re: org.ofbiz.minerva.pool.jdbc.xa

Jacques Le Roux
Administrator
In reply to this post by SkipDever
I sent this mail more than 7h ago, it has still not reached the ML, any ideas why ?

Jacques

From: "Jacques Le Roux" <[hidden email]>
To: <[hidden email]>
Sent: Friday, March 28, 2008 12:00 AM


> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Source+Repository+and+Access#OFBizSourceRepositoryandAccess-TheOldOFBizSVNRepository
>
> IIRW, it comes from ObjectWeb but was patched for OFBiz
>
> Jacques
>
> From: "skip@thedevers" <[hidden email]>
>> Anyone know where I can find the source for the
>> org.ofbiz.minerva.pool.jdbc.xa and decendant packages?
>>
>> I find the class files in ofbiz-minerva.jar, but can't find the source
>> anywhere.
>>
>> Skip
>> No virus found in this outgoing message.
>> Checked by AVG.
>> Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
>> 4:43 PM
>>
Reply | Threaded
Open this post in threaded view
|

Moving Next and Previous through a ordered table/view using an ftl

SkipDever
In reply to this post by ryan-116
I have create a Jira issue here:

https://issues.apache.org/jira/browse/OFBIZ-1723

Included is code to allow you to create a ftl/widget based screen to allow
users to move through an arbitrary ordered list using next and previous
buttons.

This code creates a self-referencing hash table.  The entries are removed on
a timer after 5 minutes and the class is garbage collected.  It would be way
nicer to be able to have a listener on the servlet controller so that when
the user moved to a different url base, the container could kill itself.
Alas, I can find no such interface and would love to hear from someone that
knows of a way to do this.  Fortunately, the unused overhead is under a
hundred bytes and only hangs around for 5 minutes.

This could be improved on very large tables on some DBs using a binary
search in find() instead of the current sequential one.  However, the last()
call required to determine the size reads the entire table on some DBs, so I
didn't think it prudent, and the time consumption on a 10k record table is
more than adequately small in my testing.

The code likely has some tabs in it and does have the opening { on the next
line unlike the ofbiz guidelines, but it is still entirely functional as
well as easier to me to read.

Skip


No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
4:43 PM

Reply | Threaded
Open this post in threaded view
|

RE: org.ofbiz.minerva.pool.jdbc.xa

SkipDever
In reply to this post by Jacques Le Roux
Jacques

Don't know why it took so long, but the source I wanted is in this old
repository.  Didn't think to look there.

Thanks a load

Skip

-----Original Message-----
From: Jacques Le Roux [mailto:[hidden email]]
Sent: Thursday, March 27, 2008 11:39 PM
To: [hidden email]
Subject: Re: org.ofbiz.minerva.pool.jdbc.xa


I sent this mail more than 7h ago, it has still not reached the ML, any
ideas why ?

Jacques

From: "Jacques Le Roux" <[hidden email]>
To: <[hidden email]>
Sent: Friday, March 28, 2008 12:00 AM


>
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Source+Repository+and+Access#OF
BizSourceRepositoryandAccess-TheOldOFBizSVNRepository

>
> IIRW, it comes from ObjectWeb but was patched for OFBiz
>
> Jacques
>
> From: "skip@thedevers" <[hidden email]>
>> Anyone know where I can find the source for the
>> org.ofbiz.minerva.pool.jdbc.xa and decendant packages?
>>
>> I find the class files in ofbiz-minerva.jar, but can't find the source
>> anywhere.
>>
>> Skip
>> No virus found in this outgoing message.
>> Checked by AVG.
>> Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date:
3/22/2008
>> 4:43 PM
>>

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
4:43 PM

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
4:43 PM