cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Klaus Bertram" <bert...@n-bis.de>
Subject wrong java code in sidemap,java
Date Thu, 23 Aug 2001 14:06:40 GMT
Hi all,

here are code form the sitemap.xmap and the corosponding sitemap_xmap.java
The sessionstate & next-page-page match can't redirect.
the sides always redirect to "dynamic-page2"
the java file test if(true) .. but on what
I cant find the generated file to fix it, so its your turn

Klaus Bertram



  <map:match pattern="session-state/example">
   <map:act type="session-isvalid">

    <map:match type="sessionstate" pattern="1">
	   <map:match type="next-page" pattern="1">
<!-- ***************** from here ************ -->
      <map:redirect-to resource="dynamic-page1"
target="docs/samples/session-state"/>
<!-- **************************************** -->
	   </map:match>
...
    <map:redirect-to resource="dynamic-page2"
target="docs/samples/session-state/state0"/>
   </map:act>

   <map:redirect-to resource="dynamic-page"
target="docs/samples/session-state/start"/>
  </map:match>



// method for handling "session-state/example"
  private boolean wildcardMatchN1FF(SitemapRedirector redirector,
                                    Environment environment, StreamPipeline
pipeline,
                                    EventPipeline eventPipeline, boolean
internalRequest,
                                    List listOfMaps) throws
ConnectionResetException,
  ResourceNotFoundException, Exception {
    Map map;
    Parameters param;
    Map objectModel = environment.getObjectModel();
    String cocoon_view = environment.getView();
    String cocoon_action = environment.getAction();

    if ((map = wildcardMatch(matcher_wildcard_N1FF_expr, objectModel,
                             emptyParam)) != null) {
      getLogger().debug("Matched wildcardmatcher_wildcard_N1FF
pattern:session-state/example");
      listOfMaps.add (map);
      Action action_N202 = (Action) this.actions.select("session-isvalid");
      try {
        if ((map = action_N202.act(redirector, environment,
                                  objectModel, substitute(listOfMaps, null),
                                   emptyParam)) != null) {
          if (redirector.hasRedirected()) {
            return true;
          }
          getLogger().debug("Action session-isvalid");
          listOfMaps.add (map);
          // handling "1"
          if ((map = sessionstateMatch(
                       matcher_sessionstate_N205_expr, objectModel,
                       emptyParam)) != null) {
            getLogger().debug("Matched sessionstate
matcher_sessionstate_N205 pattern:1");
            listOfMaps.add (map);
            // handling "1"
            if ((map = next_pageMatch(
                         matcher_next_page_N209_expr, objectModel,
                         emptyParam)) != null) {
              getLogger().debug("Matched next-page matcher_next_page_N209
pattern:1");
              listOfMaps.add (map);


              map = new HashMap(1);
              map.put("target",substitute(listOfMaps,
"docs/samples/session-state"));
              listOfMaps.add(map);

              Class[] argTypes = new Class[]{StreamPipeline.class,
                                             EventPipeline.class,
List.class,
                                             Environment.class,
String.class, Boolean.TYPE};
              Object[] argValues = new Object[]{pipeline,
                                            eventPipeline, listOfMaps,
environment,cocoon_view,
                                                new
Boolean(internalRequest)};
              String methodName = "resource_" +
                                  substitute(listOfMaps, "dynamic_page1");

//---------------------------- thats it what ? -------------------
              if (true)
                return invokeMethod(methodName, argTypes,argValues);
//---------------------------------------
             listOfMaps.remove (listOfMaps.size() - 1);
            }


nbis - Röttgerweg 10 - 51371 Leverkusen
phone: +49-214-206494-0
fax:   +49-214-206494-44
email: bertram@n-bis.de


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


Mime
View raw message