Message Boards

« Back to 2.- Usage ( From Xml file to CRUD Portlet)

Problems with "Master and Validation" portlet

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hello,

I have develop the "Master and Validation" example successfully and others similar to it, but there are a kind of portlets that I can't compile.

Let me put an example to explain me better:

architectsMaintenance.xml has

 1
 2         <application>
 3            <classDef>
 4                <name>Architects</name>
 5                <title>ArchitectsMaintenance</title>
 6                <restrictBy>
 7                        <userId>false</userId>
 8                </restrictBy>
 9            </classDef>
10            <fileDef>
11                <name>architects</name>
12                <fields>
13                    ...
14                    <field>
15                        <name>astId</name>
16                        <title>Situacion</title>
17                        <type>
18                            [b]<long>[/b]
19                                <length>[b]5[/b]</length>
20                                <signed>false</signed>
21                                <nullable>false</nullable>
22                            </long>
23                        </type>
24                        <showFieldInView>true</showFieldInView>
25                        <required>false</required>
26                        <validation>
27                            <className>[b]architectSituations[/b]</className>
28                            <fieldName>[b]architectSituationsIdId[/b]</fieldName>   <!-- double "Id" is necessary -->
29                            <orderByField>[b]astDesc[/b]</orderByField>
30                        </validation>
31                    </field>
32                    ...
33                </fields>
34            </fileDef>
35        </application>
36
37        <application>
38            <classDef>
39                <name>[b]architectSituations[/b]</name>
40                <title>Situaciones de Arquitecto</title>
41                <restrictBy>
42                        <userId>false</userId>
43                </restrictBy>
44            </classDef>
45            <fileDef>
46                <name>architectsituations</name>
47                <fields>
48                    <field>
49                        <name>[b]architectSituationsId[/b]</name>
50                        <title>architectSituations PK Id</title>
51                        <type>
52                            [b]<long>[/b]
53                                <length>[b]5[/b]</length>
54                                <signed>false</signed>
55                                <nullable>false</nullable>
56                            </long>
57                        </type>
58                        <showFieldInView>false</showFieldInView>
59                    </field>
60                    <field>
61                        <name>astId</name>
62                        <title>Id</title>
63                        <type>
64                            <varchar>
65                                <length>10</length>
66                            </varchar>
67                        </type>
68                        <showFieldInView>true</showFieldInView>
69                        <required>true</required>
70                    </field>
71                    <field>
72                        <name>[b]astDesc[/b]</name>
73                        <title>Description</title>
74                        <type>
75                            <varchar>
76                                <length>50</length>
77                                <order>true</order>
78                                <filter>true</filter>
79                            </varchar>
80                        </type>
81                        <showFieldInView>true</showFieldInView>
82                        <required>true</required>
83                    </field>
84                </fields>
85            </fileDef>
86        </application>



This is the compiling error :

1    [javac] E:\proyectos\coavn-biz\visado_telem\tmp\liferay-plugins-sdk-6.0.5\portlets\architectsMaintenance-portlet\docroot\WEB-INF\src\org\xmlportletfact
2ory\portal\coavnbiz\ArchitectsComparator.java:475: cannot find symbol
3    [javac] symbol  : variable architectSituationsLocalServiceUtil
4    [javac] location: class org.xmlportletfactory.portal.coavnbiz.OrderByArchitectsAstId
5    [javac]                             String s01 = architectSituationsLocalServiceUtil.getarchitectSituations(lo1).getAstDesc();
6    [javac]                                          ^




Saludos,

David.

RE: Problems with "Master and Validation" portlet
Answer
12/1/11 9:34 PM as a reply to David Navarro.
Hola David,


I dont understand the double ID "architectSituationsIdId", can you send me "architectsMaintenance.xml" and I will generate it from here. This is very strange behaviour, and called my curiosity

Saludos, Jack.

RE: Problems with "Master and Validation" portlet
Answer
12/2/11 7:47 AM as a reply to Jack A. Rider.
Sure Jack,

I'll send the XML file to test it by mail. I've used "double Id" with more than 10 portlets with relationship.


Saludos,

David.

(SOLVED) RE: Problems with "Master and Validation" portlet
Answer
12/2/11 8:21 AM as a reply to David Navarro.
Hi,

This problem was related with this bug:

http://www.xmlportletfactory.org/forum/-/message_boards/view_message/15882


David.