Hi LoneWolf,
> Well, I know these questions are stupid and no one is forced to answer
> but I didn't really know how to implement them...
> Thanks in advance.
First off, I want to say that I think your questions are legitimate
questions. :)
I started writing a very long reply to your questions yesterday, and
realized that I was revisiting questions I encountered when I first
began using RIFE, as well as building my own knowledge of the framework.
The overall result was an awareness of the complexity of writing web
applications. :)
I'll try to address the questions that I can. :)
>> I have a couple of unrelated questions and I decided to group them
>> into one thread.
>> 1. I'm trying to store some data in the session scope but the RIFE way
>> (using a global variable).
>> So, I declared a global variable in the XML document.
>> How to assign a value to this global variable?
>>
>> 2. Now the global var has a value, how to display it in the templates?
>> I don't think passing a global var between elements is practical.
>> I find -some how- hard to grasp this concept as I'm used to use:
>> ${sessionScope.visit.email} in JSP
1 & 2. Globalvars don't correspond to objects in an HttpSession. There
is an explanation of globalvars and some info in this article:
http://www.nabble.com/Using-%22globalvar%22-as-session-variable-declaration-tf3830019s9330.html#a10842526
It also provides a few links to cookbook articles.
Since there aren't strong/easy examples on the wiki of how to implement
some of this stuff, it will probably take some working through.
It also helps a lot to download the source and look through some of the
test cases.
>> 3. Suppose my application supports three locales.
>> How to change the locale (I don't mean a button to be sure :))
>> I mean where to store the new locale?
>> How to use it?
3. It seems there are three parts to solving your problem:
a) "How do I get a locale into the system from the user?" Via form
selection, a user option, or just using the header info provided by the
browser. Maybe you have this figured out since you say "I don't mean a
button to be sure :)"
b) "How do I carry it around and remember it?" This is the same sort of
question as 1 & 2.
c) "How do I use a selected locale to provide localized output?" This
requires standard knowledge of Java ResourceBundles, and searching the
cookbook for 'Localization'. In particular, you'll find:
http://rifers.org/wiki/display/RIFE/Localization+through+ResourceBundles
>> 4. I have been reading "Paged navigation builder" wiki page.
>> Consider this line:
>> t.appendBlock("articles", "article");
>> How the template look like?
>> <!--V 'articles'--><!--/V-->
>> <!--B 'article'-->
>> <tr valign="top">
>> <td><!--V 'title'/--></td>
>> <td><!--V 'author'/--></td>
>> <td><a href="[!V 'url'/]"><!--V 'description'/--></a></td>
>> </tr>
>> <!--/B-->
>> Right?
>> Thanks.
4. Did you try it? How did it go? :)
I haven't used the paged navigation code yet, but it looks like your
template code is good as long as you also include the rest of the paged
navigation template code, such as the template block following the text
"A very basic paged navigation could for example be defined like this:"
Josh
--
Joshua Hansen
Up Bear Enterprises
(541) 760-7685
"A journey of a thousand miles begins with the first step."
-- Chinese proverb
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"rife-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---