Geert, thanx a lot for your very quick answers!
My use case is the following:
I want to dynamically build dialogues (e.g. for maintenance,
comparable to CRUD). So instead of writing
<input type="text" name="..." value=".."/>
or
<r.v name="FORM:INPUT:...">
I have to dynamically add the content. Of course I could just add all
text into one single r:v tag, but I want to define the structure of
the output within the template, such as:
<html>
<bod<>
Here is my dialogue.
<r:v name="inputfields"/>
<r:b name="inputfield">
<r:v name="fieldname"/>:
<r.v name="inputcomponent"/>
</r:b>
</html>
So I want to replace the inputcomponent tag with the component to be
inserted, like this:
<r:v name="FORM:INPUT..."/>
or maybe
<input type="text" name="<r:v name=\"fieldname\"/>">
I think that I could use a embedded element, but this seems quite
complicated and would not so something different than what I would
like to do by replacing the tag.
The reason I want to use dynamic tags is that I want to "reuse" the
fieldname-tag.
How would you do this?
Best
Klaus
On 27 Aug., 09:14, Geert Bevin <[EMAIL PROTECTED]> wrote:
> Sorry, forgot to ask, what is your use-case Klaus? Maybe that will
> help us figure out what the best approach is for you.
>
> On 27 Aug 2007, at 09:08, Mork0075 wrote:
>
>
>
>
>
>
>
> > Hello Klaus,
>
> > you want to mix template code and element code, i could not imagine
> > that
> > this is supported by rife. The concept separation of concerns means
> > that
> > you neven should mix template code and java code.
>
> > Klaus schrieb:
> >> It seems not possible with standard means to add value tags (r:v) to
> >> templates at runtime. Basically I want to do the following in
> >> processElement():
> >> --
> >> template = getTemplate();
> >> ...
> >> template.setValue("dynamicValueTag","<r:v name=\"MARK:myField\"\>");
> >> ...
> >> print(template);
> >> ---
> >> Instead of the above given r:v tag text, any other one could be
> >> imaginable (e.g. RIFE built-in or custom control text).
>
> >> I don't want to use embedded elements in this case as this seems
> >> to be
> >> an overkill to me.
>
> >> As I found out, the r:v tags in the template are determined somewhen
> >> and no public methods are available with Element subclasses to add
> >> new
> >> r:v tags later on.
>
> >> Could you help me out with a solution? Am I wrong with my
> >> assumptions?
>
> >> Best
>
> >> Klaus
>
> --
> Geert Bevin
> Terracotta -http://www.terracotta.org
> Uwyn "Use what you need" -http://uwyn.com
> RIFE Java application framework -http://rifers.org
> Music and words -http://gbevin.com- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---