Uh -- skip the word "However,". I restructed and rewrote the e-mail.
Forgot to check that before sending it.
Josh
--
Joshua Hansen
Up Bear Enterprises
(541) 760-7685
Joshua Hansen wrote:
> Hi Geert,
>
> However, I just ran into a feature where the annotations @Elem
> definition of pathinfo="strict", or rather the lack thereof, overrides
> the setting in the site file. The result is that the pathinfo mappings
> get honored, but with a "loose" matching.
>
> I don't think I would have normally encountered this, except that I used
> the 1.6.1 Jumpstart build, and just copied Home.java to edit for my new
> class without noticing the annotation there. Confusing as heck since
> some of the attributes (id, url) are honored, and the pathinfo mapping
> itself is honored.
>
> =============================
> <element id="MY_PATHINFO" pathinfo="strict" url="/pathinfo/add/*"
> implementation="com.upbear.lab.Pathinfo">
> <pathinfo mapping="$contentItemId"/>
> </element>
> =============================
>
> @Elem
> public class Pathinfo extends Element {
>
> public void processElement() {
> Template template = getHtmlTemplate("admin.pathinfotest");
> if( hasInputValue("contentItemId") ) {
> template.setValue("contentItemId",
> this.getInput("contentItemId"));
> } else {
> template.setBlock("content", "content_no_input");
> }
> print(template);
> }
> }
> =============================
>
> It seems like the XML declaration is the authoritative source (indeed,
> it defines the implementation class), so it makes sense for it to
> override most settings in the source when there is a conflict.
>
> What do you think?
>
> BTW -- the Jumpstart 1.6.1 build is really nice! Having the test
> targets, samples, and launchers is really helpful for getting a start on
> things.
>
> Josh
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---