Problems with the Palette component

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with the Palette component

Berghoff, Benjamin

Hi,

 

I’m using tapestry-jpa 5.3.8. I use Eclipse JavaEE Kepler, the jre is oracle 1.7.0_51.

The used pom.xml is attached. The project is built upon the project created by “mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org”.

When I tried to implement the example on, http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Palette.html, I got stuck as the example doesn’t works as expected.

At first it seemed to work, the component has been displayed correctly, but when I select one of the available items the corresponding button is still disabled. See PaletteError.jpg for a snapshot.

This behavior is the same for Opera 12. 17, Firefox 34.0.5 and Chrome 39.0.2171.95 m.

 

Does anybody has a clue what’s wrong?

If my description lacks any required information I will be glad to provide it, to get my problem solved.

 

Thanks and Regards

Benjamin B.

 

 

My Java File Dummy.java:

package ****.pages;

 

import java.util.List;

 

import org.apache.tapestry5.SelectModel;

import org.apache.tapestry5.ValueEncoder;

import org.apache.tapestry5.annotations.Persist;

import org.apache.tapestry5.annotations.Property;

import org.apache.tapestry5.ioc.Messages;

import org.apache.tapestry5.ioc.annotations.Inject;

import org.apache.tapestry5.ioc.services.TypeCoercer;

import org.apache.tapestry5.util.EnumSelectModel;

import org.apache.tapestry5.util.EnumValueEncoder;

 

import ****.DMS;

 

public class Dummy {

               

    @Property

    @Persist

    private List<DMS> handling;

 

    @Inject

    private Messages messages;

               

   @Inject

    private TypeCoercer typeCoercer;

   

    @Property

    private final ValueEncoder<DMS> encoder = new EnumValueEncoder(typeCoercer, DMS.class);

 

    @Property

    private final SelectModel model = new EnumSelectModel(DMS.class, messages);

}

 

My tml (1:1 copy) :

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">

    <body>

        <h1>Special Handling</h1>

 

        <t:form>

 

            <t:palette t:id="handling" encoder="encoder" model="model"/>

 

            <br/>

 

            <input type="submit" value="Continue"/>

 

        </t:form>

 

    </body>

</html>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

pom.xml (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

AW: Problems with the Palette component

Berghoff, Benjamin
I use java 32 bit.
The "Dms" class is a Simple Enumeration class.

Regards
Benjamin B.

Von: B, Benjamin
Gesendet: Montag, 15. Dezember 2014 16:32
An: [hidden email]
Betreff: Problems with the Palette component

Hi,

I'm using tapestry-jpa 5.3.8. I use Eclipse JavaEE Kepler, the jre is oracle 1.7.0_51.
The used pom.xml is attached. The project is built upon the project created by "mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org".
When I tried to implement the example on, http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Palette.html, I got stuck as the example doesn't works as expected.
At first it seemed to work, the component has been displayed correctly, but when I select one of the available items the corresponding button is still disabled. See PaletteError.jpg for a snapshot.
This behavior is the same for Opera 12. 17, Firefox 34.0.5 and Chrome 39.0.2171.95 m.

Does anybody has a clue what's wrong?
If my description lacks any required information I will be glad to provide it, to get my problem solved.

Thanks and Regards
Benjamin B.


My Java File Dummy.java:
package ****.pages;

import java.util.List;

import org.apache.tapestry5.SelectModel;
import org.apache.tapestry5.ValueEncoder;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.ioc.services.TypeCoercer;
import org.apache.tapestry5.util.EnumSelectModel;
import org.apache.tapestry5.util.EnumValueEncoder;

import ****.DMS;

public class Dummy {

    @Property
    @Persist
    private List<DMS> handling;

    @Inject
    private Messages messages;

   @Inject
    private TypeCoercer typeCoercer;

    @Property
    private final ValueEncoder<DMS> encoder = new EnumValueEncoder(typeCoercer, DMS.class);

    @Property
    private final SelectModel model = new EnumSelectModel(DMS.class, messages);
}

My tml (1:1 copy) :
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
    <body>
        <h1>Special Handling</h1>

        <t:form>

            <t:palette t:id="handling" encoder="encoder" model="model"/>

            <br/>

            <input type="submit" value="Continue"/>

        </t:form>

    </body>
</html>
Reply | Threaded
Open this post in threaded view
|

Re: Problems with the Palette component

Chris Poulsen
I have never used the palette, but have you had a look at the
tapestry-5\tapestry-core\src\test\java\org\apache\tapestry5\integration\app1\pages\PaletteDemo.java
file?

On Mon, Dec 15, 2014 at 4:38 PM, Berghoff, Benjamin <
[hidden email]> wrote:

>
> I use java 32 bit.
> The "Dms" class is a Simple Enumeration class.
>
> Regards
> Benjamin B.
>
> Von: B, Benjamin
> Gesendet: Montag, 15. Dezember 2014 16:32
> An: [hidden email]
> Betreff: Problems with the Palette component
>
> Hi,
>
> I'm using tapestry-jpa 5.3.8. I use Eclipse JavaEE Kepler, the jre is
> oracle 1.7.0_51.
> The used pom.xml is attached. The project is built upon the project
> created by "mvn archetype:generate -DarchetypeCatalog=
> http://tapestry.apache.org".
> When I tried to implement the example on,
> http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Palette.html,
> I got stuck as the example doesn't works as expected.
> At first it seemed to work, the component has been displayed correctly,
> but when I select one of the available items the corresponding button is
> still disabled. See PaletteError.jpg for a snapshot.
> This behavior is the same for Opera 12. 17, Firefox 34.0.5 and Chrome
> 39.0.2171.95 m.
>
> Does anybody has a clue what's wrong?
> If my description lacks any required information I will be glad to provide
> it, to get my problem solved.
>
> Thanks and Regards
> Benjamin B.
>
>
> My Java File Dummy.java:
> package ****.pages;
>
> import java.util.List;
>
> import org.apache.tapestry5.SelectModel;
> import org.apache.tapestry5.ValueEncoder;
> import org.apache.tapestry5.annotations.Persist;
> import org.apache.tapestry5.annotations.Property;
> import org.apache.tapestry5.ioc.Messages;
> import org.apache.tapestry5.ioc.annotations.Inject;
> import org.apache.tapestry5.ioc.services.TypeCoercer;
> import org.apache.tapestry5.util.EnumSelectModel;
> import org.apache.tapestry5.util.EnumValueEncoder;
>
> import ****.DMS;
>
> public class Dummy {
>
>     @Property
>     @Persist
>     private List<DMS> handling;
>
>     @Inject
>     private Messages messages;
>
>    @Inject
>     private TypeCoercer typeCoercer;
>
>     @Property
>     private final ValueEncoder<DMS> encoder = new
> EnumValueEncoder(typeCoercer, DMS.class);
>
>     @Property
>     private final SelectModel model = new EnumSelectModel(DMS.class,
> messages);
> }
>
> My tml (1:1 copy) :
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <body>
>         <h1>Special Handling</h1>
>
>         <t:form>
>
>             <t:palette t:id="handling" encoder="encoder" model="model"/>
>
>             <br/>
>
>             <input type="submit" value="Continue"/>
>
>         </t:form>
>
>     </body>
> </html>
>
Reply | Threaded
Open this post in threaded view
|

Re: Problems with the Palette component

bobharner
Benjamin,

I can't reproduce your problem. I just created a new project using the
Maven Archetype for Tapestry 5.3.8, then added the OrderHandling page
exactly as described at
http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Palette.html
and it worked fine. (I could move items between the left and right
lists with no problems.) Then I upgraded to Tapestry 5.3.8 (by editing
the version in the pom.xml file) and it still worked fine.

I suggest you look for JavaScript errors in your browser's console.
Something you've added might be messing with the JavaScript that the
Palette component uses.


On Mon, Dec 15, 2014 at 10:45 AM, Chris Poulsen <[hidden email]> wrote:

> I have never used the palette, but have you had a look at the
> tapestry-5\tapestry-core\src\test\java\org\apache\tapestry5\integration\app1\pages\PaletteDemo.java
> file?
>
> On Mon, Dec 15, 2014 at 4:38 PM, Berghoff, Benjamin <
> [hidden email]> wrote:
>>
>> I use java 32 bit.
>> The "Dms" class is a Simple Enumeration class.
>>
>> Regards
>> Benjamin B.
>>
>> Von: B, Benjamin
>> Gesendet: Montag, 15. Dezember 2014 16:32
>> An: [hidden email]
>> Betreff: Problems with the Palette component
>>
>> Hi,
>>
>> I'm using tapestry-jpa 5.3.8. I use Eclipse JavaEE Kepler, the jre is
>> oracle 1.7.0_51.
>> The used pom.xml is attached. The project is built upon the project
>> created by "mvn archetype:generate -DarchetypeCatalog=
>> http://tapestry.apache.org".
>> When I tried to implement the example on,
>> http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Palette.html,
>> I got stuck as the example doesn't works as expected.
>> At first it seemed to work, the component has been displayed correctly,
>> but when I select one of the available items the corresponding button is
>> still disabled. See PaletteError.jpg for a snapshot.
>> This behavior is the same for Opera 12. 17, Firefox 34.0.5 and Chrome
>> 39.0.2171.95 m.
>>
>> Does anybody has a clue what's wrong?
>> If my description lacks any required information I will be glad to provide
>> it, to get my problem solved.
>>
>> Thanks and Regards
>> Benjamin B.
>>
>>
>> My Java File Dummy.java:
>> package ****.pages;
>>
>> import java.util.List;
>>
>> import org.apache.tapestry5.SelectModel;
>> import org.apache.tapestry5.ValueEncoder;
>> import org.apache.tapestry5.annotations.Persist;
>> import org.apache.tapestry5.annotations.Property;
>> import org.apache.tapestry5.ioc.Messages;
>> import org.apache.tapestry5.ioc.annotations.Inject;
>> import org.apache.tapestry5.ioc.services.TypeCoercer;
>> import org.apache.tapestry5.util.EnumSelectModel;
>> import org.apache.tapestry5.util.EnumValueEncoder;
>>
>> import ****.DMS;
>>
>> public class Dummy {
>>
>>     @Property
>>     @Persist
>>     private List<DMS> handling;
>>
>>     @Inject
>>     private Messages messages;
>>
>>    @Inject
>>     private TypeCoercer typeCoercer;
>>
>>     @Property
>>     private final ValueEncoder<DMS> encoder = new
>> EnumValueEncoder(typeCoercer, DMS.class);
>>
>>     @Property
>>     private final SelectModel model = new EnumSelectModel(DMS.class,
>> messages);
>> }
>>
>> My tml (1:1 copy) :
>> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>>     <body>
>>         <h1>Special Handling</h1>
>>
>>         <t:form>
>>
>>             <t:palette t:id="handling" encoder="encoder" model="model"/>
>>
>>             <br/>
>>
>>             <input type="submit" value="Continue"/>
>>
>>         </t:form>
>>
>>     </body>
>> </html>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Problems with the Palette component

bobharner
To be clear, I first tried Tapestry 5.3.7, then 5.3.8, and both worked fine.

On Mon, Dec 15, 2014 at 12:07 PM, Bob Harner <[hidden email]> wrote:

> Benjamin,
>
> I can't reproduce your problem. I just created a new project using the
> Maven Archetype for Tapestry 5.3.8, then added the OrderHandling page
> exactly as described at
> http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Palette.html
> and it worked fine. (I could move items between the left and right
> lists with no problems.) Then I upgraded to Tapestry 5.3.8 (by editing
> the version in the pom.xml file) and it still worked fine.
>
> I suggest you look for JavaScript errors in your browser's console.
> Something you've added might be messing with the JavaScript that the
> Palette component uses.
>
>
> On Mon, Dec 15, 2014 at 10:45 AM, Chris Poulsen <[hidden email]> wrote:
>> I have never used the palette, but have you had a look at the
>> tapestry-5\tapestry-core\src\test\java\org\apache\tapestry5\integration\app1\pages\PaletteDemo.java
>> file?
>>
>> On Mon, Dec 15, 2014 at 4:38 PM, Berghoff, Benjamin <
>> [hidden email]> wrote:
>>>
>>> I use java 32 bit.
>>> The "Dms" class is a Simple Enumeration class.
>>>
>>> Regards
>>> Benjamin B.
>>>
>>> Von: B, Benjamin
>>> Gesendet: Montag, 15. Dezember 2014 16:32
>>> An: [hidden email]
>>> Betreff: Problems with the Palette component
>>>
>>> Hi,
>>>
>>> I'm using tapestry-jpa 5.3.8. I use Eclipse JavaEE Kepler, the jre is
>>> oracle 1.7.0_51.
>>> The used pom.xml is attached. The project is built upon the project
>>> created by "mvn archetype:generate -DarchetypeCatalog=
>>> http://tapestry.apache.org".
>>> When I tried to implement the example on,
>>> http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Palette.html,
>>> I got stuck as the example doesn't works as expected.
>>> At first it seemed to work, the component has been displayed correctly,
>>> but when I select one of the available items the corresponding button is
>>> still disabled. See PaletteError.jpg for a snapshot.
>>> This behavior is the same for Opera 12. 17, Firefox 34.0.5 and Chrome
>>> 39.0.2171.95 m.
>>>
>>> Does anybody has a clue what's wrong?
>>> If my description lacks any required information I will be glad to provide
>>> it, to get my problem solved.
>>>
>>> Thanks and Regards
>>> Benjamin B.
>>>
>>>
>>> My Java File Dummy.java:
>>> package ****.pages;
>>>
>>> import java.util.List;
>>>
>>> import org.apache.tapestry5.SelectModel;
>>> import org.apache.tapestry5.ValueEncoder;
>>> import org.apache.tapestry5.annotations.Persist;
>>> import org.apache.tapestry5.annotations.Property;
>>> import org.apache.tapestry5.ioc.Messages;
>>> import org.apache.tapestry5.ioc.annotations.Inject;
>>> import org.apache.tapestry5.ioc.services.TypeCoercer;
>>> import org.apache.tapestry5.util.EnumSelectModel;
>>> import org.apache.tapestry5.util.EnumValueEncoder;
>>>
>>> import ****.DMS;
>>>
>>> public class Dummy {
>>>
>>>     @Property
>>>     @Persist
>>>     private List<DMS> handling;
>>>
>>>     @Inject
>>>     private Messages messages;
>>>
>>>    @Inject
>>>     private TypeCoercer typeCoercer;
>>>
>>>     @Property
>>>     private final ValueEncoder<DMS> encoder = new
>>> EnumValueEncoder(typeCoercer, DMS.class);
>>>
>>>     @Property
>>>     private final SelectModel model = new EnumSelectModel(DMS.class,
>>> messages);
>>> }
>>>
>>> My tml (1:1 copy) :
>>> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>>>     <body>
>>>         <h1>Special Handling</h1>
>>>
>>>         <t:form>
>>>
>>>             <t:palette t:id="handling" encoder="encoder" model="model"/>
>>>
>>>             <br/>
>>>
>>>             <input type="submit" value="Continue"/>
>>>
>>>         </t:form>
>>>
>>>     </body>
>>> </html>
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

AW: Problems with the Palette component

Berghoff, Benjamin
In reply to this post by Berghoff, Benjamin
First of all, thank you for your help.
The problem has been the Tapestry5-jQuery dependency.
If I would have read the tapestry5-jQuery site, http://tapestry5-jquery.com/ under Usage, it say:s
" How to use it

 Just add tapestry5-jquery to your classpath (see Maven dependency snippet below)!

 Then use components like you would normally do. For Autocomplete and Palette use "jquery" namespace:
"

Regards
Benjamin B.

-----Urspr√ľngliche Nachricht-----
Von: Berghoff, Benjamin [mailto:[hidden email]]
Gesendet: Montag, 15. Dezember 2014 16:38
An: Tapestry users
Betreff: AW: Problems with the Palette component

I use java 32 bit.
The "Dms" class is a Simple Enumeration class.

Regards
Benjamin B.

Von: B, Benjamin
Gesendet: Montag, 15. Dezember 2014 16:32
An: [hidden email]
Betreff: Problems with the Palette component

Hi,

I'm using tapestry-jpa 5.3.8. I use Eclipse JavaEE Kepler, the jre is oracle 1.7.0_51.
The used pom.xml is attached. The project is built upon the project created by "mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org".
When I tried to implement the example on, http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Palette.html, I got stuck as the example doesn't works as expected.
At first it seemed to work, the component has been displayed correctly, but when I select one of the available items the corresponding button is still disabled. See PaletteError.jpg for a snapshot.
This behavior is the same for Opera 12. 17, Firefox 34.0.5 and Chrome 39.0.2171.95 m.

Does anybody has a clue what's wrong?
If my description lacks any required information I will be glad to provide it, to get my problem solved.

Thanks and Regards
Benjamin B.


My Java File Dummy.java:
package ****.pages;

import java.util.List;

import org.apache.tapestry5.SelectModel; import org.apache.tapestry5.ValueEncoder;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.ioc.services.TypeCoercer;
import org.apache.tapestry5.util.EnumSelectModel;
import org.apache.tapestry5.util.EnumValueEncoder;

import ****.DMS;

public class Dummy {

    @Property
    @Persist
    private List<DMS> handling;

    @Inject
    private Messages messages;

   @Inject
    private TypeCoercer typeCoercer;

    @Property
    private final ValueEncoder<DMS> encoder = new EnumValueEncoder(typeCoercer, DMS.class);

    @Property
    private final SelectModel model = new EnumSelectModel(DMS.class, messages); }

My tml (1:1 copy) :
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
    <body>
        <h1>Special Handling</h1>

        <t:form>

            <t:palette t:id="handling" encoder="encoder" model="model"/>

            <br/>

            <input type="submit" value="Continue"/>

        </t:form>

    </body>
</html>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]