Announcement Announcement Module
Collapse
No announcement yet.
TileConfigurer for portlet Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • TileConfigurer for portlet

    I am using WebLogic Portal 10.3.2, Spring 3, Webflow 2.1.0 and Tiles 2.1.2.

    I have used TilesConfigurer withing portlet config xml and its working fine for the single portlet. TilesConfigurer loaded definition1 for portlet1.

    When I add second portlet, it has its own TilesConfigurer for definition2.

    Portlet1 is placed in page1 and 2 in page2. When you open page1, its loads the portlet1 without error. When you open page2, it loads portlet2 without error. Now go back to page1, it loads with following error,

    Code:
    org.apache.tiles.definition.NoSuchDefinitionException: upcomingDeposit
    	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:623)
    	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:322)
    When portlet2 loads its overriding the portlet1 definition. That means for me, TileConfigurer is global and all view states should be unique across the applications!

    Is the above statement true?

    How can I do portlet specific tiles configurer?

    Thanks in advance.

  • #2
    Yes, it's true. Tiles definition names need to be unique and are globally accessible.
    You can use names such as "page1.definitionA", "page2.definitionA" as definition names.

    Comment


    • #3
      Thanks for the reply

      Here is the problem. I have a baseFlow and its has viewState id="orderEntry". Flow1 & Flow2 extends baseFlow. I have 2 orderEntry.jsp in flow1 folder and flow2 folder.

      How to write the tiles configuration for this scenario?

      Thanks again.

      Comment


      • #4
        if you define the view names for the three flows, parent, flow1, and flow2, as "orderEntry-parent", "orderEntry-flow1", "orderEntry-flow2"

        the following flow definition should work.
        Code:
        <view-state id="orderEntry" view="orderEntry-#{flowExecutionContext.activeSession.definition.id}" />

        Comment


        • #5
          Thanks Zenith. I did same thing. view="flow1.orderEntry" and put the definition in tiles.xml.

          You are updating view name at runtime. Since we are going to hard code the tiles definition name in tiles.xml. Is there good reason to make it at runtime? Just want to understand your approach

          Comment


          • #6
            From my understanding of your question, you have three flows parent, flow1, and flow2. flow1 and flow2 inherits the parent flow. So, all the three flows have a state named "orderEntry". But you want to map the state to flow specific views (i.e., three orderEntry jsps for the three flows).

            My solution is to differentiate the three views in tiles definitions (as you said, hard code view names in tiles definitions). To be able to map flow states to views on the fly, we name views as stateId+"-"+flowId (for sure you can name views in other way you like as long as you use stateIds and flowIds as parameters). By this means, you can map states with the same id to distinct jsps using parametrized view names in flow definitions.
            Last edited by zenith.fox; Jan 10th, 2011, 10:17 AM.

            Comment


            • #7
              Thank you very much. I got it.

              Comment

              Working...
              X