Hi again,

I have solved this like that:

I removed the following code from JahiaApplicationField.load(...)

      logger.debug("Loading application field...");
      ContentApplicationField contentApplicationField = (ContentApplicationField)ContentApplicationField
        .getField(fieldBean.getId());
      logger.debug("value=" + value);

      String val = contentApplicationField.getValue(jData.params());

      value = JahiaTools.replacePattern(FormDataManager.getInstance()
        .htmlEncode(val), "@", "@");

and moved it to ApplicationFieldTag.readValue(...). This way the dispatching to the application works only with the <content:application> tag if the display flag is set to true [default]. For now I haven't encountered any problems, but I wonder if this solution can be contributed as you have to care about migration of existing applications and maybe somebody uses the integration of applications without the <content:application> tag, but using the JahiaApplicationField.getValue() directly.

Greetings,
Benjamin

----- Forwarded by Benjamin Papez/COMMARO/AT on 01.06.2005 07:47 -----
Benjamin Papez/COMMARO/AT

30.05.2005 15:07

To
<[email protected]>
cc
Subject
Re: How to prevent triggering a request to application on application loadFieldLink






Hello Serge,


well, we could contribute, but moving the dispatching from load() to getValue() is not helping as in JahiaField.loadField(...) you first call


theField.load (loadFlag, jParams);


and right afterwards you call


       if (theField.getValue () != null && theField.getValue ().equals ("<empty>")) {

           theField.setValue ("");

       }


So if we just move the dispatching to getValue() it will still be dispatched everytime a JahiaField.loadField() is called. Can you give us some more hints, how we could solve that and what we should care about.


Greetings,

Benjamin



Serge Huber <[EMAIL PROTECTED]>

26.05.2005 11:48

Please respond to
<[email protected]>

To
[email protected]
cc
Subject
Re: How to prevent triggering a request to application on application loadField








Unfortunately not with the current implementation. This is one thing
that has been on my todo list for some time but I never found the time
to do it. My idea was to move the dispatching to the getValue call in
the application field. I don't know when I'll get around to do this, but
another way to speed it up is to contribute it :)

cheers,
Serge...

[EMAIL PROTECTED] wrote:

>
> Similar to the site settings we have on the startpage a container with
> web application fields, which we set with specific webapps to allow
> absolute field addressing from several other pages. On the startpage
> there is only the container with the application field, but this web
> application itself is not displayed on the startpage. Nevertheless
> when accessing the startpage, loadField is called for the "hidden"
> webapp field and there a request is sent to the servlet of the
> application. Is it possible to prevent triggering this request if the
> field is not shown really?
>
> Benjamin Papez

Reply via email to