Rob, thanks for the link and the info

I will read it now! :D


G



On Mon, Oct 5, 2009 at 12:13 PM, [email protected] <
[email protected]> wrote:

> Hi Gustavo,
> I tend to work at a fairly low level with WO so you may get a nicer
> solution from someone else, but the basics are as follows:
>
> You create a direct action by adding a method to the DirectAction.java
> file. WebObjects expects the method names to end in the word Action. So say
> you want a direct action called "userInfo" you would create a method called
> userInfoAction:
>
> public WOComponent userInfoAction() {
> }
>
> In order to generate the content you can create a WOComponent lets say you
> named it "UserInfoPage" and then you fetch the component using
> pageWithName() and return it as follows:
>
> public WOComponent userInfoAction()
> {
> WOComponent nextPage;
> nextPage = pageWithName("UserInfoPage");
>         return nextPage;
> }
>
> When you request the page you must leave off the word "Action" so the url
> would be:
>
> http://www.mydomain.com/cgi-bin/WebObjects/my.woa/wa/userInfo
>
> I would then pass in parameters on the url like userid:
>
> http://www.mydomain.com/cgi-bin/WebObjects/my.woa/wa/userInfo?userid=10
>
> and then read the form value using formValueForKey():
>
> public WOComponent userInfoAction()
> {
> WOComponent nextPage;
>
> String userID = request().formValueForKey("userid"); // Get the user ID.
> System.out.println("User ID: " + userID); //Print the user ID.
>
> nextPage = pageWithName("UserInfoPage");
>         return nextPage;
> }
>
> This is all probably lower level than you need as you may not need to
> generate the url yourself, there is more info at
> http://en.wikibooks.org/wiki/WebObjects/Web_Applications/Development/Direct_Actions
>
> Regards,
>
> Rob.
>
>
>
>
> On 5 Oct 2009, at 10:07, Gustavo Pizano wrote:
>
> mmm yes, I remember now,
>
> what should how should I call the DA from outside the WOApp?
>
> so far I have been working form within the WOApp but now I need to access
> from outside, so this is completly new. :P.
>
>
> Thanks for the info
>
> :D
>
> g.
>
>
> On Mon, Oct 5, 2009 at 10:58 AM, [email protected] <
> [email protected]> wrote:
>
>> Hi Gustavo,
>>
>> You can use a Direct Action if you don't have a session.
>>
>> Rob.
>>
>>
>> On 5 Oct 2009, at 09:04, Gustavo Pizano wrote:
>>
>>  Hello, this is what I need to achieve.
>>>
>>> I have an J2ee app running on apache, and I have a WOApp running on a G5.
>>> Now, I want to show in the j2ee app in an iframe a WOComponent that will
>>> show a list of items from the database based on a selected User, user is an
>>> Enterprise Object.
>>>
>>> I read somwhwere, but I cant recall where, that I can acces the WO
>>> without the neeed of a session ID, or even authenticating, as I said I can't
>>> find where I read about it.
>>>
>>> Questions, will this approach, will allow me to do fetch to the DB even
>>> without a SessionID?, (silly question, I know but as you know im still new
>>> to some things).
>>> Will this approach be better than doing WebServices with WO?....
>>>
>>> What will be your suggestions.? thinking that I need to select a user and
>>> filter the query. ?, should the user selection pop up be inside the
>>> WOComponent, or should it be sent somehow to the WOComponent from the j2ee?
>>>
>>> confused here. :S//...
>>>
>>> any help as alwasy will be very very appreciate it.
>>>
>>> Im in the mood today to make things work... :P :P :D
>>>
>>> thx
>>>
>>> G.
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> http://lists.apple.com/mailman/options/webobjects-dev/rob%40synapticstorm.com
>>>
>>> This email sent to [email protected]
>>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>>
>> http://lists.apple.com/mailman/options/webobjects-dev/webobjectspicora%40gmail.com
>>
>> This email sent to [email protected]
>>
>
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to