Hi Tony,
Having same problem - did you find a resolution to this?
Thanks
Sean
On Monday, December 17, 2012 5:00:25 PM UTC-5, Tony B wrote:
>
> Hello,
> I have a weird situation. I am getting the following error in my
>
>> 16:48:34.027 [ERROR] [wmsapp] Error processing @WithTokenizers, cannot
>> find type
>> com.wmsvision.wmsapp.client.activities.productsearch.ProductSummaryDetailPlace.ProductSummaryDetailPlaceTokenizer
>>
>
> The problem is that I know this exists. First of all, this happens in
> the following code:
>
>> package com.wmsvision.wmsapp.client;
>>
>> import com.google.gwt.place.shared.PlaceHistoryMapper;
>> import com.google.gwt.place.shared.WithTokenizers;
>> import
>> com.wmsvision.wmsapp.client.activities.HomePlace.HomePlaceTokenizer;
>> import
>> com.wmsvision.wmsapp.client.activities.WmsListPlace.WmsListPlaceTokenizer;
>> import
>> com.wmsvision.wmsapp.client.activities.about.AboutPlace.AboutPlaceTokenizer;
>> import
>> com.wmsvision.wmsapp.client.activities.configuration.ConfigPlace.ConfigPlaceTokenizer;
>> import
>> com.wmsvision.wmsapp.client.activities.login.LoginPlace.LoginPlaceTokenizer;
>> import
>> com.wmsvision.wmsapp.client.activities.productsearch.ProductSummaryDetailPlace.ProductSummaryDetailPlaceTokenizer;
>> import
>> com.wmsvision.wmsapp.client.activities.productsearch.ProductSummaryMasterPlace.ProductSummaryMasterPlaceTokenizer;
>> import
>> com.wmsvision.wmsapp.client.activities.productsearch.ProductSummaryPlace.ProductSummaryPlaceTokenizer;
>> import
>> com.wmsvision.wmsapp.client.activities.receiving.ReceivingPlace.ReceivingPlaceTokenizer;
>> import
>> com.wmsvision.wmsapp.client.activities.relocation.RelocationPlace.RelocationPlaceTokenizer;
>>
>> @WithTokenizers({ HomePlaceTokenizer.class,
>> LoginPlaceTokenizer.class,
>> AboutPlaceTokenizer.class,
>> WmsListPlaceTokenizer.class,
>> ReceivingPlaceTokenizer.class,
>> RelocationPlaceTokenizer.class,
>> ProductSummaryPlaceTokenizer.class,
>> ProductSummaryDetailPlaceTokenizer.class,
>> ProductSummaryMasterPlaceTokenizer.class,
>> ConfigPlaceTokenizer.class})
>> public interface AppPlaceHistoryMapper extends PlaceHistoryMapper {
>> }
>>
>
> I have a similar place defined in the same package that seems to work fine
> ( it is called "import
> com.wmsvision.wmsapp.client.activities.productsearch.ProductSummaryMasterPlace"
>
> ). Anyway, the "DetailPlace" should only be accessible from the
> "MasterPlace", so maybe I don't need it in my AppPlaceHistoryMapper above.
> But I would still like to understand why it is not working.
>
> Here is the class file in question, the one it cannot seem to find:
>
>> package com.wmsvision.wmsapp.client.activities.productsearch;
>>
>> import com.google.gwt.place.shared.Place;
>> import com.google.gwt.place.shared.PlaceTokenizer;
>>
>> public class ProductSummaryDetailPlace extends Place {
>> private String product;
>> private long index;
>> private String id;
>> private final String separator = "#:PRODUCTINDEX:#";
>>
>> public ProductSummaryDetailPlace(String product, long index) {
>> super();
>> this.product = product;
>> this.index = index;
>>
>> createId();
>> }
>>
>> public ProductSummaryDetailPlace( String id ) {
>> this( "", 0 );
>>
>> String tokens[] = ( id != null ? id.split(separator) : null );
>>
>> if( tokens != null && tokens.length >= 1 ){
>> this.product = tokens[0];
>>
>> if( tokens.length >= 2 ){
>> this.index = Long.getLong( tokens[1] );
>> }
>>
>> createId();
>> }
>> }
>>
>> private void createId( ) {
>> this.id = product.trim() + separator + index;
>> }
>>
>>
>> public String getProduct() {
>> return product;
>> }
>>
>>
>>
>> public void setProduct(String product) {
>> String oldProduct = this.product;
>>
>> this.product = product;
>>
>> // Product changed, so recalculate id
>> if( !oldProduct.equals(product)) {
>> createId();
>> }
>> }
>>
>>
>>
>> public long getIndex() {
>> return index;
>> }
>>
>>
>>
>> public void setIndex(long index) {
>> long oldIndex = this.index;
>>
>> this.index = index;
>>
>> // Index changed, so recalculate id
>> if( oldIndex != index ) {
>> createId();
>> }
>> }
>>
>>
>>
>> public String getId() {
>> return id;
>> }
>>
>> public static class ProductSummaryDetailPlaceTokenizer
>> implements PlaceTokenizer<ProductSummaryDetailPlace> {
>>
>> @Override
>> public ProductSummaryDetailPlace getPlace(String token) {
>> return new ProductSummaryDetailPlace(token);
>> }
>>
>> @Override
>> public String getToken(ProductSummaryDetailPlace place) {
>> return place.getId();
>> }
>> }
>> }
>>
>
> Thanks.
>
> Tony
>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/vM52El6CATEJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.