Can't create new page - fitnesse-slim

I tried doing url.NewPageName (http://localhost:3434/root.MyNewPage)
I get The requested resource: FrontPage.mynewpage was not found.
I also tried the [add child] linkwhich gives a popup, and here I get Invalid Child Name.
How can I do this?

Use http://localhost:3434/MyNewPage

When you click on the [add child] link, be sure to enter it in Pascal case - like camel case but starting with a capital. For example: MyLocalTestPage

Related

WinUI PasswordBox Text Resources

I am trying to define a setting page that includes a PasswordBox element. When I Rebuild the app, the defined Text resources do not show properly. However, if I remove the:
x:Uid="/resources/db_pwd"
definition (see below) then it Rebuilds the view OK. If I try to initialize the view with the resource link defined then I get the error below. It appears as if a Text property for the PasswordBox ... but it does not have this property. Very confused!
Resources
|Name | Value |
|-----------------------|---------------------------|
|db_pwd.Header |Password (default password)|
|db_pwd.PlaceholderText |Enter your password |
|db_pwd.Text |Password (default pwd) |
Password Box
<PasswordBox x:Name="dbpwd" Width="300" x:Uid="/resources/db_pwd"
Header="Database Password"
PlaceholderText="Enter password"
PasswordChanged="PasswordBox_PasswordChanged"
HorizontalAlignment="Left" Margin="40,5,0,0" />
Error Initializing View
Windows.UI.Xaml.Markup.XamlParseException
HResult=0x802B000A
Message=The text associated with this error code could not be found.
Unable to resolve property 'Text' while processing properties for Uid '/sql/db_pwd'. [Line: 38 Position: 68]
Source=Windows
StackTrace:
at Windows.UI.Xaml.Application.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
at WeeWX.Views.SettingsPage.InitializeComponent() in D:\Dave\Documents\Visual Studio\WeeWX\obj\x86\Debug\Views\SettingsPage.g.i.cs:line 49
at WeeWX.Views.SettingsPage..ctor() in D:\Dave\Documents\Visual Studio\WeeWX\Views\SettingsPage.xaml.cs:line 49
at WeeWX.Views.MainPage.SetSettings(Object sender, TappedRoutedEventArgs e) in D:\Dave\Documents\Visual Studio\WeeWX\Views\MainPage.xaml.cs:line 350
This exception was originally thrown at this call stack:
[External Code]
WeeWX.Views.SettingsPage.SettingsPage() in SettingsPage.xaml.cs
WeeWX.Views.MainPage.SetSettings(object, Windows.UI.Xaml.Input.TappedRoutedEventArgs) in MainPage.xaml.cs
Questions
Why is it looking for a Text property, Password Box does not have this property!?
It fails even if I add a Text entry in the resources file as shown. Why?
What is the root cause of this error, and the fix?
To answer your questions:
1.Why is it looking for a Text property, Password Box does not have this property!?
2.It fails even if I add a Text entry in the resources file as shown. Why?
The PasswordBox control doesn't have a Text property. It has a Password property.
3.What is the root cause of this error, and the fix?
To fix this error you need to change your resource:
db_pwd.Text -> db_pwd.Password
Finally fixed this issue, but the scenario is important:
The original definition was a TextBox, which I then changed to PasswordBox
This is when Visual Studio (VS) was still looking to resolve a Text property (of the TextBox I assume vs the PasswordBox.Content property), therefore I thought there must be some caching going on.
I tried to do the Build/Clean Solution thing, with no success
I then did #3 again, restarted VS, still no success
I then did #3 again, changed the name of the db_pwd resources and reference to db_pswd, deleted db_pwd.Text, rebuilt the solution and ... success!
Not sure exactly what steps are required to fix this sort of issue, but the bottom line is that VS has some really dumb (overly optimistic) caching going on! Comments or advice?
PS: Now have a similar issue after changing a TextBox to HyperlinkButton. Fixed through a similar process (step #5)!

How debug and use grabAttributeFrom in codeceptjs?

In my case all identifiers in a page is generated dynamically. So I can't use xpath.
I've found method in the documentation: grabAttributeFrom.
How I can see what's inside, when I using cmd in --debug mode?
Can I use grabAttributeFrom for extracting xpath's from a page when I searching inputs?
How I can get access to inputs which have name and they xpath generates dynamically and I can't use xpath's?
I tried this code:
I.fillField(locate('input').inside('.jq-panel-body-default').at(2),'John');
but it doesn't work correct and generate exception:
FAIL Field "{"type":"xpath","output":null,"strict":true,"locator":{"xpath":".//input[ancestor::*[contains(concat(' ', normalize-space(./#class), ' '), ' jq-panel-body-default ')]][position()=2]"},"value":".//input[ancestor::*[contains(concat(' ', normalize-space(./#class), ' '), ' jq-panel-body-default ')]][position()=2]"}" was not found by text|CSS|XPath
How I can see what's inside, when I using cmd in --debug mode?
Inside.. what?
If you want to log value of attribute, grab it and log:
Scenario("test", async (I) => {
...
const attributeValue = await I.grabAttributeFrom(<locator>, <attribute>);
console.log(attributeValue);
...
});
Can I use grabAttributeFrom for extracting xpath's from a page when I searching inputs?
grabAttributeFrom is for grabbing of attributes value, not for xpath finding.
But if you ask, can you use xpath in locator argument, yes you can.
How I can get access to inputs which have name and they xpath generates dynamically and I can't use xpath's?
This is not enough to ask you. Share some DOM part or something to understand.
If you mean name attribute, you can use filtering by name: //input[#name="<your element name>"]

Docusign API PHP adding listitem to document causes error

I am sure I am not the first to encounter this, but I was unable to find a solution while Googling.
I am trying to add a drop-down list to my document. At the top of my model I am adding these namespaces:
use \DocuSign\eSign\Model\List;
use \DocuSign\eSign\Model\ListItem;
When doing so I get this error because "List" is a reserved word in PHP.
A PHP Error was encountered
Severity: Parsing Error
Message: syntax error, unexpected List (T_LIST), expecting identifier (T_STRING)
Filename: models/Docusign_model.php
Line Number: 19
I tried changing the name of the class from List to Elist but then I got errors from ObjectSerializer that it could not find Elist:swaggerType.
What am I missing on how to add a list to my document?
Thom
#thom I think this is really a "PHP" parsing question as is answered here for you Parse error: syntax error, unexpected (T_STRING), expecting variable (T_VARIABLE)
So I think the $ missing is your real issue as discussed in the referenced article above and below from PHP Manual.
http://www.php.net/manual/en/language.oop5.basic.php
Recommend you look at GIT example from SDK using CustomFieldList at https://github.com/docusign/docusign-php-client/blob/ccc86ac37334f34728361d73b2f8c4592225b8d2/src/Model/CustomFieldsEnvelope.php
excerpt
protected static $swaggerTypes = [
'list_custom_fields' => '\DocuSign\eSign\Model\ListCustomField[]',
'text_custom_fields' => '\DocuSign\eSign\Model\TextCustomField[]'
];
http://www.php.net/manual/en/language.oop5.basic.php
Also, maybe the first place to validate if you even need a specific "use" is by reviewing this PHP sample code from a good friend Ergin https://gist.github.com/Ergin008/d4a8b9210fbea41414b0
As I see it with most of the DocuSign SDK's, you have the client and specific services you want to use per excerpt below:
// Download PHP client: https://github.com/docusign/DocuSign-PHP-Client
require_once './DocuSign-PHP-Client/src/DocuSign_Client.php';
require_once './DocuSign-PHP-Client/src/service/DocuSign_RequestSignatureService.php';
require_once './DocuSign-PHP-Client/src/service/DocuSign_ViewsService.php';
Regardless if I am right or wrong, let us know if this helped you go in the right direction :-)

Access document when I have the UID

I have a combobox on my form that loads client names from a view using the format "name | UID" - this displays the client name on the form but saves the UID in the field.
I now want to use the UID to lookup the name for the client and save it in a field on the XPage that is not visible using the following code:
// ignore when UID is null
if (getComponent("parentUID").getValue() == null)
return false;
var UID:string = getComponent("parentUID").getValue();
var doc:NotesDocument = database.getDocumentByUNID(UID);
// now set your fields
document1.setValue("nachname", doc.getItemValueString ("nachname"));
document1.setValue("vorname", doc.getItemValueString ("vorname"));
I do this in a simple action attached to a button. The next simple action is a Save.
The code crashes with the following error:
Error while executing JavaScript action expression
Script interpreter error, line=8, col=42: [TypeError] Exception occurred calling method NotesDatabase.getDocumentByUNID(java.lang.String) null
I have copied the parentUID to a field on the document and I am getting the correct UID and the document exists in the database?
Any ideas?
PS: I am adding this to an existing application and the current document is not a response document - cannot change that unfortunately :o(
OK, I have found my problem - XPages returned the UID but it included a leading space. When I concatenated the values I did the following: "name | UID" i.e. I added a leading and trailing space to the pipe symbol to make the code legible - this was causing the problems.
It looks like you are missing the get.Value() in your getComponent line
Try getComponent("parentUID").getValue() == null
My guess is that this is causing the code to run when the UID is null. This means that the code is running when it really is null, and your effort to check for that isn't working.
Thanks for checking that.
Can you put in a print() statement and ensure that you have a value in the var UID.
Another thing, please capitalize the word "String" since java classes are capitalized.

Grocery crud : How to get the current id that had been used when editing and viewing a record?

How to get the current id that had been used when editing and viewing a record?
I am currently following the instruction by Alfonso Secas that he posted in this topic..
http://www.grocerycrud.com/forums/topic/1326-how-to-use-grocery-crud-and-image-crud-together/page-2
And now on the part where he said "When editing a record, get the current ID from $this->getStateInfo(); to compose the iframe's source url."
It seems like getStateInfo doesn't exist yet so it shows an error "Fatal error: Call to undefined method Examples::getStateInfo() "
http://www.grocerycrud.com/documentation/options_functions/getState
this will do what u want . give it a try
u need to use the CRUD object to call this function instead of $this ..
You have some options:
Primary key
getStateInfo()->get_primary_key
Last uri segment
end($this->uri->segments)
Does not work in list action.
As a workaround you can use one of CodeIgniter's methods to get id from page url
https://www.codeigniter.com/userguide3/libraries/uri.html
You need to take last segment from URI
$segmentsCount = $this->uri->total_segments();
$itemID = intval($this->uri->segment($segmentsCount));
p.s. it is not best solution but it can do the trick

Resources