Hi Dan,

you can't initialize a RIFE element yourself, there's too much that has to be setup for everything to work correctly. One thing that you can look for is to use RIFE's out-of-container testing to achieve what you need:
http://rifers.org/wiki/display/RIFE/Out+of+container+testing

Your site is already setup, so you can just do:
MockConversation conversation = new MockConversation (Site.getRepInstance());

Then when you get the MockResponse after you simulate a request, you can obtain the template that was printed: http://rifers.org/docs/api/com/uwyn/rife/test/ MockResponse.html#getTemplate()

Could that work?

Best regards,

Geert


On 30 Jan 2007, at 20:05, Dan Check wrote:

Hi,

I'm adding AJAX support to an application via DWR, and I've run into a
problem with templating. Specifically, I'd like to populate and return some context-sensitive HTML (including exits) via DWR calls. This would enable me to reuse pre-existing RIFE templates rather than rewriting the templates
in javascript.

The problem that I run into is that on a DWR call, I can't retrieve a
HtmlTemplate (my DWR class hasn't been initialized in a complete context), meaning that I can't fill out a template, and then get the contents and
return them as a string.

What I'd like to do would be to initialize an element in a context other than the current one, and then retrieve templated HTML from it. Is this
possible?

Thanks,
Dan


-----
CONFIDENTIALITY NOTICE: The information contained in this message
may be privileged and confidential and protected from disclosure.
 If the reader of this message is not the intended recipient, or
responsible for delivering it to the intended recipient, please
be advised that any distribution, dissemination, copying or other
transmission or use of the information contained in this message
or its enclosed attachments is strictly prohibited.  Please
notify us immediately if you have received this message in error
by replying to the sender of the message and deleting it from
your computer.  Thank you.


_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to