Error on PF5 showcase example in Mobile Browsers

UI Components for JSF
Post Reply
gsuarez
Posts: 16
Joined: 18 Oct 2012, 09:18

24 Jul 2014, 22:53

Hi everyone,

I have used Primefaces for long time now and this is my first app using primefaces-mobile extension.

I have built a simple aplication and I am getting an error when I try to use it on a mobile browser. At first I thougt that it might be some problem in my app but then I have noticed that the showcase-5.0.war has the same problem.

Here is a screenshot of the error. Notice that I am trying to acces to the "twitter search" example of the primefaces mobile showcase.

Image

If I click "Reparse document as HTML" it seems that I can use the app as normal. But, you know, users get freaked out when they see red pages of warning like this, so using the app like this is not a solution for me.

PS: I've deployed the showcase-5.0.war in a Tomcat 7.0.

Thanks in advance!

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

25 Jul 2014, 13:10

http://code.google.com/p/primefaces/iss ... il?id=7087

And did you have a look at the other posts? One almost similar just beneath (and now above yours)

gsuarez
Posts: 16
Joined: 18 Oct 2012, 09:18

25 Jul 2014, 16:25

Great! Thank you very much kukeltje.

So I tried with 5.1-SNAPSHOT and the error is gone but now I am getting "Attribute type redefined" which is the exact same problem that I get when I try the examples of the showcase (Running PrimeFaces-5.0.5-SNAPSHOT) on my mobile navigator (Andoid).

Here is an screenshot:

Image

Do you have any idea where is the problem and if there is a way to fix it? By the way, is this mobile extension ready to be used? I mean I am afraid of building a whole app and then getting this red error page at the last part of my development. Don't get me wrong I love Primefaces I use it a lot and I' ve promoted it as much as I can I am just asking cause I am having the idea to build an app using PF Mobile.

Thanks in advance!

PS: I looked at issues but I didnt find anyone related to this one.

---------- UPDATE ----------------

It seems that the p:commandButton it is not well rendered and it has defined type attribute twice:

<button id="first:main:j_idt8" name="first:main:j_idt8" type="submit" class="ui-btn ui-shadow ui-corner-all search ui-btn-icon-left" onclick="PrimeFaces.ab({s:'first:main:j_idt8',u:'first:main:tweets first:main:search'});return false;" type="submit">Search</button>

This only seems to happend when mobile rendered kit is used do you have any idea how can I fix it?

Thanks in advance!

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

25 Jul 2014, 18:55

gsuarez wrote: do you have any idea how can I fix it?
Looking in the source (which you already have) and seeing where the type is added twice. After that post the results back here and maybe as an issue in the issue list

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

25 Jul 2014, 19:20

hmmm if I look at the twitter example in the mobile showcase with firefox mobile on android it works. If I look at it with my desktop firefox ('faking being a mobile browser') it also works and I do not see duplicate 'type="submit"' there

gsuarez
Posts: 16
Joined: 18 Oct 2012, 09:18

25 Jul 2014, 21:14

You can test the page here:

http://webdesign.about.com/od/validator ... dation.htm

I validate by URL the twitter example (http://www.primefaces.org/showcase/mobile/twitter.xhtml)

Here is the link of the whole operation:

http://validator.w3.org/check?uri=http% ... tter.xhtml

You can see the second error:

Error Line 8, Column 842: Duplicate attribute type.

I ll check the code and try to see why the attribute is being add twice.

Thanks in advance!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests