Oracle WebCenter Sites (MOSC)

MOSC Banner

Searchstate question - declarative vs java

edited Apr 3, 2014 9:16AM in Oracle WebCenter Sites (MOSC) 4 commentsAnswered ✓

Hello guys, we are running WebCenter SItes 11G R1, and we are trying to "migrate" some search declarative xml code, into the API:


From this:

       <searchstate:create name="ss" op="and"/>
       <searchstate:addhasancestorconstraint    name="ss" 
                                                immediateonly="true" 
                                                assetid='<%=ics.GetVar("categoryId")%>' 
                                                assettype='<%=ics.GetVar("categoryType")%>'  
                                                bucket="ss2" />            
       <assetset:setsearchedassets name="foundProducts" constraint="ss" assettypes="product_C"/> 
       <assetset:getassetlist name="foundProducts" listvarname="productResultList" immediateonly="true"/>
       <ics:listloop listname="productResultList">
              …
              …
       </ics:listloop>


Into This API code:


SearchState ss = new Searchstate();
ss.addHasAncestorConstraint("ss2", ics.GetVar("categoryId"), <%=ics.GetVar("categoryType")%>, true);
AssetSet assetSet = new AssetSet(ics);
assetSet.setSearchedAssets("SideId?", "ILits", ss, true);

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center