JSF Datatable row data - Expand/Collapse

Hi,
I just started learning the JSF concepts. I read articles by BalusC which are very clear and easily understandable. Thanks to BalusC.
I have a requirement to implement expand and collapse data using JSF datatable. The data comes from the backing bean is in the form of java.util.List which contains StudentInfo. I will have to display following data from the list.
*{color:#0000ff}name {color}(this is to be displayed a link), firstname, lastname, dob*
I am able to display the data in a nice formatted table using h:datatable. My main hurdle is to display an expanded info when the name link is clicked. The expanded info should be displayed below the row spanning all columns. The additional info being the comments, instructions whic are the part of the row data. Here is the code describing the StudentInfo.
Appreciate if someone help me with suggestions. Very helpful if any sample code is avaialble.
Regards,
Smitha
public class StudentInfo {
//Following fields to be shown in row data
private String name;
private String firstname;
private String lastname;
private String dob;
//Following fields to be shown in expanded form
private String comments;
private String instructions;
public String getName() {
return name;
public void setName(String name) {
this.name = name;
public String getFirstname() {
return firstname;
public void setFirstname(String firstname) {
this.firstname = firstname;
public String getLastname() {
return lastname;
public void setLastname(String lastname) {
this.lastname = lastname;
public String getDob() {
return dob;
public void setDob(String dob) {
this.dob = dob;
public String getComments() {
return comments;
public void setComments(String comments) {
this.comments = comments;
public String getInstructions() {
return instructions;
public void setInstructions(String instructions) {
this.instructions = instructions;
}

That's not possible with plain h:dataTable.
Consider Tomahawk t:dataList where in you can specify rows and colspans yourself using plain HTML. Show/hide rows should be easy with JavaScript.

Similar Messages

  • Powerpivot excel pivot-tables with multiple rows (problem expand / collapse)

    Hello, 
    I made a pivot table with powerpivot so I get kind of data: 
    The problem I have is that when I reduced the city of Bordeaux for example, given this city are reduced both that really interests me as the other non-company (all cities Bordeaux are reduced). 
    I would like to know how to get it is there that the city which interests me is reduced?

    Hi,
    As I have no idea of your PowerPivot data. And I have a litter confused about 
    'the city which interests me is reduced' .
    Did you want to get the city whose volume(maybe sales volume) is reduced than last year ?
    If so,I suggest you create a calculated column in PowerPivot to get the YTD of previous year using DAX. then in pivot table you can use this dimension to do a filter.
    http://www.powerpivotblog.nl/get-the-ytd-of-same-period-last-year-using-dax/
    If I misunderstand you, please let me know. And if it is convenient for you, please share your workbook here.
    Wind Zhang
    TechNet Community Support

  • Can please tell me how to implement expand and collapse table row data?

    i am trying implement expand and collapse table row data but i do not get any ideas..can please any one help me its an urgent requirement

    Yes, we can.   
    I think the best place for you to start for this is the NI Developer Zone.  I recommend beginning with these tutorials I found by searching on "data log rio".  There were more than just these few that might be relevant to your project but I'll leave that for you to decide.
    NI Compact RIO Setup and Services ->  http://zone.ni.com/devzone/cda/tut/p/id/11394
    Getting Started with CompactRIO - Logging Data to Disk  ->  http://zone.ni.com/devzone/cda/tut/p/id/11198
    Getting Started with CompactRIO - Performing Basic Control ->  http://zone.ni.com/devzone/cda/tut/p/id/11197
    These will probably give you links to more topics/tutorials/examples that can help you design and implement your target system.
    Jason
    Wire Warrior
    Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!

  • How to obtain the row data in the component datatable?

    if I want to edit a row data, and then know which row is edited in the component datatable, and how to do?
    How to obtain the row data in the component datatable, and update it to database, not simplely edit a simple table
    Any ideas? Thanks

    Thank you very much for your help Alexander !
    It's quite confusing when you leave Struts and try to adapt your projects for JSF for the first time...
    I wanted to click on a row with a "onMouseClick" on the TR tag like I used to do in Struts/JSTL. But it seems to be impossible in a dataTable.
    Ok then. I've added a column at the end of the row with an icon.
    But eventually I didn't need to declare link parameters.
    In my BackingBean I did like this :
    public String selectEventForUpdate() throws IllegalAccessException, InvocationTargetException {
            PortletAgenda event = (PortletAgenda) JSFUtils.getInRequestMap("event");
            BeanUtils.copyProperties(this, event);
            return null;
       }JSFUtils.getInRequestMap(...) is a method I wrote in a util object :
    public static Object getInRequestMap(String name) {
            Object res = null;
            Map requestMap=FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
            if (requestMap!=null) {
                res=requestMap.get(name);
            return res;
    }  " event " is the name of the item in my dataTable list.
    My backingBean has the same attributes as "event".
    So when the page is reloaded I have a backingBean full with the selected properties to edit/update.
    Thanks to your reply I realized that putting this form in the middle of the dataTable seems to be impossible.
    So I put this form in a floating DIV in front of the table with a shadow.
    It works :o) !
    But I'm a little bit disapointed to be honest...
    I used to build my web applications with Struts and JSTL and doing this kind of interface was really easy.
    I've decided 3 days ago to convert into JSF because the "GUI Layer" seemed to be improved.
    But now I realize that I cannot put a onMouseOver and onMouseClick on a row and I cannot display a different row in the middle of a table....
    I think it's a shame because there is a facet for header and footer.
    And it would be great if we could create our own personal facet that appears only if a condition is true.
    For exemple " if the current item id is the same as the request parameter id then display the following facet content ....... (with a panel group and a form inside to update the row) "
    It's easy to do that with JSTL thanks to c:forEach and c:if but it seems to be impossible to use JSTL tags like this during the dataTable iteration.
    And JSF tags seems to have no logical tags like " if " or loops that can be nested in dataTable.
    I really need to realize this interface (you click on a row then an edit form appears where you clicked).
    Do I have to write a component myself that extends dataTable?
    Do you know if writing such a component is hard to do for a beginner like me?
    (I've juste discovered JSF 3 days ago and I've used Struts/JSTL for 2 years til now)
    I'd be glad to have much advices from you about that.
    Regards

  • JSF dataTables - Problem during retrieving data from bean

    Hi, Below is the Stack Trace got on displaying data using JSF datatables.
         This error occurs somtimes and is not very frequent.We are using jboss seam, jboss-4.0.5.GA server and Hibernate.
         Anyone knows about this problem and how it can be resolved?
         Thanks in advance
         javax.faces.el.EvaluationException: Cannot get value for expression '#{loc.companyName}'
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
              at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1075)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:508)
              at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:433)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:216)
              at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:98)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
              at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
              at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
              at org.apache.myfaces.shared_impl.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:54)
              at org.apache.jsp.menu_jsp._jspx_meth_h_panelGrid_0(menu_jsp.java:225)
              at org.apache.jsp.menu_jsp._jspx_meth_f_subview_0(menu_jsp.java:118)
              at org.apache.jsp.menu_jsp._jspService(menu_jsp.java:87)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
              at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
              at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
              at org.apache.jsp.finish_005fregistration_jsp._jspx_meth_h_form_0(finish_005fregistration_jsp.java:263)
              at org.apache.jsp.finish_005fregistration_jsp._jspx_meth_f_view_0(finish_005fregistration_jsp.java:139)
              at org.apache.jsp.finish_005fregistration_jsp._jspService(finish_005fregistration_jsp.java:93)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
              at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
              at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
              at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
              at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at com.kmedia.filter.RequestFilter.doFilter(RequestFilter.java:184)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:595)
         Caused by: java.lang.NullPointerException
              at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:620)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
              at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
              at org.jboss.seam.jsf.SeamApplication11.getPropertyResolver(SeamApplication11.java:197)
              at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
              at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
              at org.apache.commons.el.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:154)
              at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
              ... 70 more
         10:23:55 Servlet.service() for servlet jsp threw exception
         Also check the JSF page, Backing bean, and VO
         JSF page
         <h:dataTable value="#{finishedRegistrationBean.list}" var = "loc" >
                        <h:column>
         <f:facet name="header">
                        <h:outputText value="#{displaymessages.registrationDate}" />
                        </f:facet>
                        <span class="bodylighttext"> <h:outputText value="#{loc.registrDate}" /> </span>
                                                                                                   </h:column>
                        <h:column>
                        <f:facet name="header">
                        <h:outputText value="#{displaymessages.companyName}" />
                        </f:facet>
                        <span class="bodylighttext"> <h:outputText
                        value="#{loc.companyName}" /> </span>
                        </h:column>
                        <h:column>
                        <f:facet name="header">
                             <h:outputText value="#{displaymessages.Address}" />
                             </f:facet>
                        <span class="bodylighttext"> <h:outputText
                        value="#{loc.address}" /> </span>
                        </h:column>
                        <h:column>
                        <f:facet name="header">
                        <h:outputText value="#{displaymessages.Action}" />
                        </f:facet>
                        <h:commandLink target="_blank"
                        action="#{finishedRegistrationBean.viewFinishedRegistrationPage(loc)}">
                        <h:graphicImage value="images/view_icon.gif"
                        alt="#{displaymessages.info_tooltip_view}"
                        width="17" height="17" style="border:0" />
                        </h:commandLink>
                        </h:column>
    </h:dataTable>
    Backing bean
                        @Name("finishedRegistrationBean")
                        public class FinishedRegistrationBean {
                             @In
                             private User user;
                             @In
                             private FacesMessages facesMessages;
                             private List<FinishedRegistrationVO> list;
                             public FinishedRegistrationBean() throws KMException {
                                  filterFinishedRegistration();
                             public void filterFinishedRegistration() throws KMException
                             list = new ArrayList<FinishedRegistrationVO>();
                             finished_list = userDAO.searchFinishedRegistrationDetails(country_code,uniqueID, companyName, user.getUserName());
                             public void setList(List<FinishedRegistrationVO> list) {
                                  this.list = list;
                             public List<FinishedRegistrationVO> getList() {
                             return list;
    FinishedRegistrationVO
         public class FinishedRegistrationVO {
              private String uniqId;
              private String companyName;
              private Date registrDate;
              private String address;
              public String getCompanyName() {
                   return companyName;
              public void setCompanyName(String companyName) {
                   this.companyName = companyName;
              public String getAddress() {
                   return address;
              public void setAddress(String address) {
                   this.address = address;
              public String getUniqId() {
                   return uniqId;
              public void setUniqId(String uniqId) {
                   this.uniqId = uniqId;
              public Date getRegistrDate() {
                   return registrDate;
              public void setRegistrDate(Date registrDate) {
                   this.registrDate = registrDate;
         }

    Could you please post your
    -HBM
    -faces-config.xml

  • How to expand/collapse detail rows per each row in APEX reports

    Hi
    I want to add functionality to my APEX classic reports which allows me to expand/collapse rows using something like +/- buttons. Please let me know how to achieve this.
    Thanks
    Hina

    Hi,
    This Carls example might help
    http://htmldb.oracle.com/pls/otn/f?p=11933:1
    See also post relating that sample
    Re: Question for Carl Backstrom
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Selecting multiple rows from jsf datatable

    Hi
    i am working on jsf,ejb3.0 .my requirement is to select the multiple rows usng checkboxes from jsf datatable. i am workng on this for last two days. early response is appreciated.please hel me.
    Thanks
    KRamu

    Hi!
    You could enhance your collection item with a boolean. On your interface you then insert a checkbox column that you bind to the boolean property. on any given action you can go thru your collection and check which item has been selected. In case of doubt go to [http://balusc.blogspot.com/] -i'm sure you'll find some samples/tuts there.

  • ADF TreeTable: selective expand/collapse of rows

    Hi
    I have a query. How can i selectively expand or collapse nodes in a Tree Table. I have got the tree model but i need to expand even further so that the nodes can be expanded/collapsed initially based on some logic.
    It would be of great hhelp if any1 has some solution to it

    This doesnt work
    What i am doing:
    1. I have a TreeTable
    2. Its value is a TreeModel whose each node is my customized Object : MyObject
    So if i use this kinda code which is in ur tutorial
    CollectionModel model = (CollectionModel)tree1.getValue();
    treeBinding = (JUCtrlHierBinding)model.getWrappedData();
    I get a classcastexception:
    MyObject cannot be cast to oracle.jbo.uicli.binding.JUCtrlHierBinding
    since model.getWrappedData(); returns the root node of the tree which should be of my customized Object type

  • Remove the expand/collapse image for af:treeTable

    I am showing some data in a treeTable, which some rows will not have any further childs. How can I remove the expand/collapse image for those rows in the component <af:treeTable> ?
    Regards,
    Uday

    Hi,
    according to http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/treeTable.html you can only hide the expand/hide all link
    Frank

  • Expand/Collapse feature in table maintenance view

    Hello experts,
    We have created a custom table and maintenace view.   For some table rows, the only key value difference is an EFFECTIVE DATE.   The generated table maintenace dialog by default "Collapses" the rows that only differ by Effective Date.  Using the Expand <-> Collapse button, we can see the missing detail for individual rows.
    Can the maintenace dialog be expanded by default?

    Hi,
    See the given link, It may help to you.
    maintenance view
    Regards,
    Shamma

  • [Forum FAQ] How to use parameter to control the Expand/Collapse drill-down options in SSRS report?

    In SQL Server Reporting Services (SSRS), drill-down is an action we can apply to any report item to hide and show other report items. They all are ways that we can organize and display data to help our users understand our report better. In this article,
    we are talking about how to use parameter to control the Expand/Collapse drill-down options in SSRS report.
    Consider that the report has a dataset (dsSales) with following fields: SalesTerritoryGroup, SalesTerritoryCountry, CalendarYear, SalesAmount.
    1. The report has the following group settings:
    Parent Group: SalesTerritoryGroup
     Child Group: SalesTerritoryCountry
      Child Group: CalendarYear
       Details: SalesAmount
    2. Add three parameters in the report:
    GroupExpand:
    Available Values: “Specify values”
    Label: Yes           Value: Yes
    Label: No            Value: No
    Default Values: “Specify values”
    Value: Yes
    CountryExpand:
    Available Values: “Specify values”
    Label: Yes           Value: =IIF(Parameters!GroupExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No","No","Yes")
    YearExpand:
    Available Values: “Specify values”
    Label: Yes          
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No","No","Yes")
    3. Right click SalesTerritoryCountry icon in the Row Groups dialog box, select Group Properties.
    4. Click Visibility in the left pane. Select “Show or hide based on an expression” and type with following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", False, True)
    Select “Display can be toggled by this report item” option, and select “SalesTerritoryGroup” in the drop down list.
    5. Use the same method setting CalendarYear, (Details) drill-down with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", False, True)
    =IIF(Parameters!YearExpand.Value="Yes", False, True)
    6. Click SalesTerritoryGroup text box in the tablix. Select InitialToggleState property in the Properties dialog box, and type following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", True, False)
    7. Use the same method setting SalesTerritoryCountry, CalendarYear text box with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", True, False)
    =IIF(Parameters!YearExpand.Value="Yes", True, False)
    After that, when we preview the report, we can use these three parameters to expand/collapse drill-down.
    Note:
    In our test, we may meet following issue. We can check the expression of InitialToggleState property to troubleshooting the issue.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012

    In SQL Server Reporting Services (SSRS), drill-down is an action we can apply to any report item to hide and show other report items. They all are ways that we can organize and display data to help our users understand our report better. In this article,
    we are talking about how to use parameter to control the Expand/Collapse drill-down options in SSRS report.
    Consider that the report has a dataset (dsSales) with following fields: SalesTerritoryGroup, SalesTerritoryCountry, CalendarYear, SalesAmount.
    1. The report has the following group settings:
    Parent Group: SalesTerritoryGroup
     Child Group: SalesTerritoryCountry
      Child Group: CalendarYear
       Details: SalesAmount
    2. Add three parameters in the report:
    GroupExpand:
    Available Values: “Specify values”
    Label: Yes           Value: Yes
    Label: No            Value: No
    Default Values: “Specify values”
    Value: Yes
    CountryExpand:
    Available Values: “Specify values”
    Label: Yes           Value: =IIF(Parameters!GroupExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No","No","Yes")
    YearExpand:
    Available Values: “Specify values”
    Label: Yes          
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No","No","Yes")
    3. Right click SalesTerritoryCountry icon in the Row Groups dialog box, select Group Properties.
    4. Click Visibility in the left pane. Select “Show or hide based on an expression” and type with following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", False, True)
    Select “Display can be toggled by this report item” option, and select “SalesTerritoryGroup” in the drop down list.
    5. Use the same method setting CalendarYear, (Details) drill-down with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", False, True)
    =IIF(Parameters!YearExpand.Value="Yes", False, True)
    6. Click SalesTerritoryGroup text box in the tablix. Select InitialToggleState property in the Properties dialog box, and type following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", True, False)
    7. Use the same method setting SalesTerritoryCountry, CalendarYear text box with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", True, False)
    =IIF(Parameters!YearExpand.Value="Yes", True, False)
    After that, when we preview the report, we can use these three parameters to expand/collapse drill-down.
    Note:
    In our test, we may meet following issue. We can check the expression of InitialToggleState property to troubleshooting the issue.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012

  • Command Link usage in JSF datatable

    Hi,
    Following is my requirement. Can any one help me in resolving the issue.
    I hava a JSF page which displays a datatable. One of the columns in the datatable displays a command link. When the user clicks the link in a particular row. Details correpsonding to the particular row have to be displayed in another page. I am using action attribute to perform the navigation from first page to next. Inside action method in the backing, is there any other means to get the row data from the datatable for which the link is clicked.
    Please help.

    You may find this article useful: http://balusc.blogspot.com/2006/06/using-datatables.html

  • How to dynamically create a JSF dataTable from a String[][] array

    Hi, I�m developing an application that uses columns, rows and data instead of any other attributes, so I got from a database Resultset a String[] array with the rows headers, other String[] array with the columns headers, and a String[][] array with the information between every row[] and column[] header al this String arrays depend on a method that receives the group title as a parameter so they are dynamically created, anyway I can display this information in a jsp page but I don�t know how to display this information in a JSF dataTable.
    Does anybody knows how I could do this? and which is the proper way to create a dynamically rows and columns dataTable?

    Hi, I�m developing an application that uses columns, rows and data instead of any other attributes, so I got from a database Resultset a String[] array with the rows headers, other String[] array with the columns headers, and a String[][] array with the information between every row[] and column[] header al this String arrays depend on a method that receives the group title as a parameter so they are dynamically created, anyway I can display this information in a jsp page but I don�t know how to display this information in a JSF dataTable.
    Does anybody knows how I could do this? and which is the proper way to create a dynamically rows and columns dataTable?

  • Problem with jsf DataTable

    when data is fetch using user criteria:
    i have a problem with jsf DataTable. I use e request bean to populate the datatable and i insert a commandButton column. The data dispay successfully into the datatable, but when a push the button on the row...the page simply refresh and notinhg else
    when data is fetch using constants:
    The data dispay successfully into the datatable, when a push the button on the row...the action execute OK

    Hi,
    I don't think that with this description only anybody on this list is able to help you.
    I use e request bean to populate the datatable and i insert a commandButton column
    What is a command button column and what does it do ?
    but when a push the button on the row...the page simply refresh and notinhg else
    What did you do to debug the problem ?
    when data is fetch using constants
    What does this mean ?
    Frank

  • Expand/Collapse a block in a selection screen

    Hey Folks,
    I have a requirement , where I have a selection screen, with 3 selection blocks. I have a requirement that I need to make 2 of these blocks expandible/collapsible on the toggle of a button.. How can this be achieved.
    In case of a normal screen, I would have had to create the blocks as subscreens (one type of screen for expanded state...another for collapsed state) and called it from the main screen. But how do I achieve the same using the selection screens?
    I was considering creating the blocks as subscreens in the selection screen and calling them in the PBO of the main selection screen. However, I am unsure if thats a wise thing to do since the screen is generated automatically in case of a selection screen and I do believe its not a good idea to manually alter it.
    Does anyone has any pointers on this?
    Thanks and Best Regards,
    Puja.

    Hi,
    I have modified the code to show the expand/collapse ICON accordingly..Please check..
    TABLES sscrfields.
    TYPE-POOLS icon.
    * Expand/collapse buttons.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 2(23)  b1 USER-COMMAND usr1.
    SELECTION-SCREEN END OF LINE.
    * Block 1
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    PARAMETERS: p_test1 TYPE char10  MODIF ID m1,
                p_test2 TYPE char10  MODIF ID m1.
    SELECT-OPTIONS  s_date  FOR sy-datum MODIF ID m1.
    SELECTION-SCREEN END OF BLOCK b1.
    * Block 2
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 2(23)  b2 USER-COMMAND usr2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b2.
    PARAMETERS: p_test3 TYPE char10  MODIF ID m2,
                p_test4 TYPE char10  MODIF ID m2.
    SELECTION-SCREEN END OF BLOCK b2.
    * Declarations
    DATA: v_flag, v_flag1.
    INITIALIZATION.
      b1 = 'Button1'.
      b2 = 'Button2'.
      v_flag = 'X'.
      v_flag1 = 'X'.
    AT SELECTION-SCREEN.
    * Check the user command.
      IF sy-ucomm = 'USR1'.
        IF v_flag IS INITIAL.
          v_flag = 'X'.
        ELSE.
          CLEAR v_flag.
        ENDIF.
      ELSEIF sy-ucomm = 'USR2'.
        IF v_flag1 IS INITIAL.
          v_flag1 = 'X'.
        ELSE.
          CLEAR v_flag1.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN OUTPUT.
      IF v_flag1 = 'X'.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_expand
            text   = 'Button 2'
            info   = 'Button 2'
          IMPORTING
            RESULT = b2
          EXCEPTIONS
            OTHERS = 0.
      ELSEIF v_flag1 IS INITIAL.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_collapse
            text   = 'Button 2'
            info   = 'Button 2'
          IMPORTING
            RESULT = b2
          EXCEPTIONS
            OTHERS = 0.
      ENDIF.
      IF v_flag = 'X'.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_expand
            text   = 'Button 1'
            info   = 'Button 1'
          IMPORTING
            RESULT = b1
          EXCEPTIONS
            OTHERS = 0.
      ELSEIF v_flag IS INITIAL.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_collapse
            text   = 'Button 1'
            info   = 'Button 1'
          IMPORTING
            RESULT = b1
          EXCEPTIONS
            OTHERS = 0.
      ENDIF.
      LOOP AT SCREEN.
    * Expand collapse block1
        IF v_flag = 'X' AND screen-group1 = 'M1'.
          screen-active = 0.
        ELSEIF v_flag IS INITIAL AND screen-group1 = 'M1'.
          screen-active = 1.
        ENDIF.
    * Expand collapse block2
        IF v_flag1 = 'X' AND screen-group1 = 'M2'.
          screen-active = 0.
        ELSEIF v_flag1 IS INITIAL AND screen-group1 = 'M2'.
          screen-active = 1.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    Thanks
    Naren

Maybe you are looking for

  • Help:Unable to get the Current Month Data

    Hello Folks, Hello Folks i have this scenario where i need to modify this code so that it has to return data from the Current month First Day to the previous Day if its a daily report and previous month data if its a monthly report. BEGIN if v_lowdat

  • IPhoto Crashes during Upgrade at Thumbnails

    I have searched this discussion group and found many suggestions to overcome my problem with iPhoto 5.0.4, but none are working. I installed iLife '05 yesterday. My entire purpose in purchasing this software was to organize my extensive photo library

  • Show list of OS files in Form

    Hi I have to show list of all files residing in a particular directory on DB server using a oracle forms 6i deployed on application server.How can I achive this .Please advise. Thanks Prashant

  • CLOB vs BLOB

    Hi all, I was wondering what are the main advantages in using CLOB instead of BLOB for storing long texts in rtf format? Could I have problems in migrating such data to a different database (with imp / exp or impdp / expdp)? Could I lose some "specia

  • How do I use 5th Gen iPod and 2009 Civic USB?

    I tried everything I can think of to get my iPod working with my 2009 Civic. From what I've read in the manual, I just be able to plug it into the USB and the car finds it, displays the Honda "H" logo/mark on the screen and away I go. I wish it were