5 Replies Latest reply on Aug 16, 2008 2:57 PM by Razia Bhayani

    Problem in displaying right output

    Razia Bhayani Newbie
      Hey All,

      Just getting this weird problem. In my .xhtml page I am listing few entries, the list of items User bought. There's an option to delete the same by the user at the side of the list. Now when I delete anything from top or between all goes well. However when I delete sometime from bottom the entire list disappear and it says no items in the list. And when I refresh the page I can see other items.

      Can someone explain whats the issue?

      here's the snippet:

                          <s:div id="voicemessage" rendered="#{uservoicemessages.rowAvailable}">
                               <h:dataTable value="#{uservoicemessages}"  var="phone">
                                         <f:facet name="header">Read</f:facet>
                                         <h:outputText value="#{phone.read}"></h:outputText>
                                         <f:facet name="header">From</f:facet>
                                         <h:outputText value="#{phone.phoneAddress}"></h:outputText>

                                         <f:facet name="header">Date</f:facet>
                                         <h:outputText value="#{phone.dateAddedOn}"></h:outputText>

                                         <s:button value="Delete" action="#{showuservoicemessage.delete}" />

                                         <s:button value="Play" action="#{showuservoicemessage.play}"></s:button>

      PLease help....ASAP

        • 1. Re: Problem in displaying right output
          Daniel Hinojosa Master

          <s:button> doesn't submit the form. Was that intentional?
          Can we also see your backing beans (uservoicemessages, showuservoicemessage) for that?

          • 2. Re: Problem in displaying right output
            Razia Bhayani Newbie
            here's the backing bean

            @Out(required = false)
            private UserVoiceMessage uservoicemessage;

            public class VoiceMessageAction implements VoiceMessage, Serializable {

            public String delete() {
                            if (uservoicemessage != null) {
                                    uservoicemessage = null;
                            return findVoiceMessage();

                    public String findVoiceMessage() {
                            uservoicemessages = em.createQuery(
                                            "select o from UserVoiceMessage o where o.user = :user")
                                            .setParameter("user", user).getResultList();

                            uservoicemessage = null;

                            return "voicemessage";
                    public void play() {
                            if (uservoicemessage != null) {
                                    String muccWebAudioDir = null;
                                    String MUCC_WEB_AUDIO_WAR = "mucc-web-audio.war";

                                    String JBOSS_BIND_ADDRESS = System.getProperty(
                                                    "jboss.bind.address", "");
                                    String fileName = uservoicemessage.getFileName();
                                    muccWebAudioDir = (new StringBuffer("http://").append(
                                    System.out.println("The muccWebAudioDir is:" +muccWebAudioDir);
            • 3. Re: Problem in displaying right output
              Razia Bhayani Newbie

              Can anyone please help me on this ASAP?

              It's getting a bit critical for me.


              • 4. Re: Problem in displaying right output
                Nicklas Karlsson Master

                s:button still doesn't submit the form.

                • 5. Re: Problem in displaying right output
                  Razia Bhayani Newbie

                  I am using this and form does get submitted...