0.9.0-SNAPSHOT Promblem.

UI Components for JSF
primefun
Posts: 22
Joined: 16 May 2009, 17:02

17 May 2009, 18:07

I have download the 0.9.0 SNAPSHOPT according your link. http://repository.prime.com.tr/org/prim ... -SNAPSHOT/
the modify date is :13-May-2009

I have install it to my web project. but ,when i click the ajax button, the table component disappeared;

My code :
<p:button value="Add" action="#{adminAction.createNew}" async="true" update="book">
</p:button>

<p:dataTable id="book" var="user" value="#{adminAction.users}" >
<p:column>
<f:facet name="header">
<h:outputText value="Model" />
</f:facet>
<h:outputText value="#{user.id}" />
</p:column>
</p:dataTable>


it seems do not fire my backing bean. the firebug ajax url is get method :
http://localhost:8087/studio/pages/admi ... quest=true

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

17 May 2009, 18:43

Well, snapshots are not stable :) Please try with a latest snapshot I've just deployed, I think I've fixed char encoding problem and get-post bug as well with this.

Thanks

primefun
Posts: 22
Joined: 16 May 2009, 17:02

18 May 2009, 04:28

cagatay.civici wrote:Well, snapshots are not stable :) Please try with a latest snapshot I've just deployed, I think I've fixed char encoding problem and get-post bug as well with this.

Thanks

The problem still exists.I intend to use non-ajax way to develop...

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

18 May 2009, 10:13

Have you cleaned your browser cache?

primefun
Posts: 22
Joined: 16 May 2009, 17:02

18 May 2009, 11:40

cagatay.civici wrote:Have you cleaned your browser cache?
:) thanks a lot your replay.

OK,
when i have cleaned the server cache And Client cache, it seems could access my backing bean. And the XHR url is POST from my firebug.
but... the response data is also confusion code . And could not render my datatable.(the datatable disappeared)

BTW, the confusion code problem: my chinese characters which is intent to render my datatable of client is send from my server side. not the the form data of request.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

18 May 2009, 15:12

Some source code from your pages would help.

primefun
Posts: 22
Joined: 16 May 2009, 17:02

18 May 2009, 15:39

cagatay.civici wrote:Some source code from your pages would help.

Code: Select all


				<h:form id="#{msg.user_template_infomodify}" prependId="false">
					<p:panel header="#{msg.user_template_infomodify}">
					    <div style="padding:5px 35px;color:#ff0000">
						<h:messages id="serialMessage" layout="table" for="serialMessage" showSummary="false" showDetail="true"/>
					    </div>


					            <p:button value="Add" action="#{adminAction.createNew}" async="true" update="book">
					             </p:button>


						 <p:ajaxStatus>
						     <f:facet name="start">
						         <h:graphicImage value="http://www.rehberharitam.com/prime-showcase/design/ajaxloading.gif" />
						     </f:facet>
						
						     <f:facet name="complete">
						         <h:outputText value="Ajax Request Completed" />
						     </f:facet>
						 </p:ajaxStatus>

						 <p:dataTable id="book" var="user" value="#{adminAction.users}" >
							    <p:column>
								 <f:facet name="header">
								     <h:outputText value="Model" />
								 </f:facet>
								 <h:outputText value="#{user.id}" />
							     </p:column>


							     <p:column>
								 <f:facet name="header">
								     <h:outputText value="Manufacturer" />
								 </f:facet>
								 <h:outputText value="#{user.name}" />
							     </p:column>


							     <p:column>
								 <f:facet name="header">
								     <h:outputText value="Manufacturer" />
								 </f:facet>
					     	 <h:commandButton action="#{adminAction.createNew}" value="aaa">
						 </h:commandButton>
							     </p:column>

						</p:dataTable>


					</p:panel>
				</h:form>

The server  side:

public class AdminBackingBean {
    public List<User> users;
    public User user;
    public String createNew(){

        User u1 = new User();
        u1.setId(333);
        u1.setName(new String("hello"));

        users.add(u1);

        return "";
    }

    public List<User> getUsers() {

        if(users == null){
            users = new ArrayList<User>();
            User u = new User();
            u.setId(111);
            u.setName("chris");

            User u1 = new User();
            u1.setId(222);
            u1.setName("linda");

            users.add(u);
            users.add(u1);
        }

        return users;
    }

    public void setUsers(List<User> users) {
        this.users = users;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }



}


i use JSF1.2 Facelets. is there any Special jar package between 1.8.3 and 1.90 version?

primefun
Posts: 22
Joined: 16 May 2009, 17:02

22 May 2009, 04:49

Hi, have u tested it ?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 May 2009, 01:06

No, I haven't tested it, couldn't understand the exact problem here. So datatable is not updated with ajax?

primefun
Posts: 22
Joined: 16 May 2009, 17:02

23 May 2009, 06:01

Yes, Datatable is not updated with ajax.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests