cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JACOB, ERIC" <eric.ja...@bell.ca>
Subject RE: Portal - Problem when loading profiles
Date Thu, 26 Aug 2004 16:52:36 GMT
Hi,

Is someone knows why the parameter elements are not saved correctly in the
new portal engine? Look at the previous mail (below) to know the full story.

Here the parameter element in my original profile layout:

<parameter name="width" value="33%"/>

Here what I got after the profile layout is saved (portal-save-profile
action):

<parameter xsi:type="map-item"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <name>width</name> 
  <value name="width" value="33%" xsi:type="attributed-map-item" /> 
</parameter>

Any help would be appreciated.

Thanks,

Eric

-----Original Message-----
From: JACOB, ERIC [mailto:eric.jacob@bell.ca] 
Sent: Friday, August 20, 2004 12:09 PM
To: users@cocoon.apache.org
Subject: Portal - Problem when loading profiles

Hi,

Here my problem. I have a default portal layout (profiles/layout/portal.xml)
that looks like this:

<composite-layout name="tab" id="maintab">
  <named-item name="Main">
    <composite-layout name="row">
      <item>
        <composite-layout name="column">
          <item>
            <parameter name="width" value="50%"/>
            <composite-layout name="row">
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>MyPage-1</coplet-instance-data>
                </coplet-layout>
              </item>
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>Dilbert-1</coplet-instance-data>
                </coplet-layout>
              </item>
            </composite-layout>
          </item>
          <item>
            <parameter name="width" value="50%"/>
            <composite-layout name="row">
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>CiscoNews-1</coplet-instance-data>
                </coplet-layout>
              </item>
              <item>
                <coplet-layout name="coplet">
 
<coplet-instance-data>NortelNetworksTechnology-1</coplet-instance-data>
                </coplet-layout>
              </item>
            </composite-layout>
          </item>
        </composite-layout>
      </item>
    </composite-layout>
  </named-item>
</composite-layout>

Into the sitemap, I uncommented these lines to save the user's profile when
he logs out:

<map:act type="portal-save-profile">
  <map:parameter name="portal-name" value="portal"/>
</map:act>

Everything is fine until I log in again. I got this error:
org.apache.avalon.framework.CascadingRuntimeException: Exception during
loading of profile.

cause: org.xml.sax.SAXException: unable to add 'parameter' to <null> due to
the following exception: >>>--- Begin Exception ---<<<
java.lang.ClassCastException at
org.apache.cocoon.portal.util.ParameterFieldHandler.setValue(ParameterFieldH
andler.java:56) at
org.exolab.castor.mapping.loader.FieldHandlerImpl.setValue(FieldHandlerImpl.
java:433) at
org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:970)
at
...

Now, when I looked at the saved profile
(profiles/layout/portal-user-eric.jacob.xml), the parameters tags has been
altered:

<composite-layout id="maintab" name="tab">
  <named-item name="Main">
    <composite-layout name="row">
      <item>
        <composite-layout name="column">
          <item>
            <parameter xsi:type="map-item"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <name>width</name> 
              <value name="width" value="50%" xsi:type="attributed-map-item"
/> 
            </parameter>
            <composite-layout name="row">
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>MyPage-1</coplet-instance-data>
                </coplet-layout>
              </item>
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>Dilbert-1</coplet-instance-data>
                </coplet-layout>
              </item>
            </composite-layout>
          </item>
          <item>
            <parameter xsi:type="map-item"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <name>width</name> 
              <value name="width" value="50%" xsi:type="attributed-map-item"
/> 
            </parameter>
            <composite-layout name="row">
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>CiscoNews-1</coplet-instance-data>
                </coplet-layout>
              </item>
              <item>
                <coplet-layout name="coplet">
 
<coplet-instance-data>NortelNetworksTechnology-1</coplet-instance-data>
                </coplet-layout>
              </item>
            </composite-layout>
          </item>
        </composite-layout>
      </item>
    </composite-layout>
  </named-item>
</composite-layout>

Any idea on how I could avoid this? Is it a bug or I missed something?

Thanks,

Eric




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message